Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressing tab in insert-mode inserts the string <tab> #730

Closed
haf opened this issue Sep 7, 2016 · 31 comments · Fixed by #3108
Closed

Pressing tab in insert-mode inserts the string <tab> #730

haf opened this issue Sep 7, 2016 · 31 comments · Fixed by #3108

Comments

@haf
Copy link

haf commented Sep 7, 2016

What did you do?

Put the exact keys you pressed. i[TAB]

What did you expect to happen?

I expected the two spaces I have configured to be inserted.

What happened instead?

The string <tab> was inserted.

Technical details:

Running ionide-fsharp, latest version

  • VSCode Version: 1.4.0
  • VsCodeVim Version: latest, updated today
  • OS: OS X 10.11.6

screen shot 2016-09-07 at 09 57 19

screen shot 2016-09-07 at 09 24 14

@jpoon
Copy link
Member

jpoon commented Sep 7, 2016

I unfortunately can't repro this on v0.1.10 (latest). Does this happen on a new file? Can you share your user/workspace settings?

@haf
Copy link
Author

haf commented Sep 7, 2016

It happens once in a while when code is struggling to keep up with my typing and F# intellisense is also struggling to keep up and compile everything. Most of the time it works fine.

My settings:

{
  "editor.fontSize": 12,
  "editor.tabSize": 2,
  // Inserting and deleting whitespace follows tab stops
  "editor.renderWhitespace": true,
  "FSharp.linter": false,
  "editor.useTabStops": true,
  "telemetry.enableTelemetry": false,
  "telemetry.enableCrashReporter": false,
  "window.zoomLevel": -1,
  "search.exclude": {
    "**/node_modules": true,
    "**/build": true,
    "**/bower_components": true
  }
}

@rebornix
Copy link
Member

rebornix commented Sep 7, 2016

Is it a race condition while we handing the type event? I'd like to keep an eye on this issue as seems it has something to do with Code internal type

@johnfn
Copy link
Member

johnfn commented Sep 8, 2016

I can actually reproduce this trivially just by going into insert mode and holding down tab.

@rebornix
Copy link
Member

rebornix commented Sep 8, 2016

@johnfn any repro steps with env/config as I can't make it happen on my machine.

@johnfn
Copy link
Member

johnfn commented Sep 8, 2016

@rebornix osx 10.10.5, vsc insiders on latest, plugins: tslint, relative path, debugger for chrome, vim (though i doubt any of those other than vim are relevant).

I can troubleshoot this one when I have the time.

@johnfn
Copy link
Member

johnfn commented Sep 8, 2016

settings.json:

// Place your settings in this file to overwrite default and user settings.
{
    "files.exclude": {
        "out": false // set this to true to hide the "out" folder with the compiled JS files
    },
    "search.exclude": {
        "out": true // set this to false to include "out" folder in search results
    },
    "vim.insertModeKeyBindings": [
            {
                    "before": ["j", "j"],
                    "after": ["<esc>"]
            }
    ],

    "vim.hlsearch": false,

    "typescript.tsdk": "./node_modules/typescript/lib", // we want to use the TS server from our node_modules folder to control its version
    "editor.tabSize": 2,
    "editor.insertSpaces": true,
    "vim.useCtrlKeys": true,
    "files.trimTrailingWhitespace": true
}```

@octref
Copy link
Contributor

octref commented Sep 9, 2016

I also can't repro this on my machine.
Maybe the culprit is https://github.com/ionide/ionide-vscode-fsharp?

@haf
Copy link
Author

haf commented Sep 12, 2016

It happens in other files than F# ones.

@jpoon
Copy link
Member

jpoon commented Sep 12, 2016

@haf does it happen consistently on your machine? Still looking for a consistent repro.

@haf
Copy link
Author

haf commented Sep 13, 2016

@jpoon No, it's not consistent.

@octref
Copy link
Contributor

octref commented Sep 14, 2016

Today this bug also happened to me while I was working on VSCode.

Specifically, I noticed I have a watch compile, and this happened when I entered insert mode before re-compilation is done.

I can't repro is consistently, though.

@rebornix
Copy link
Member

Not sure but maybe it's related to #771

@rebornix
Copy link
Member

Since we significantly changed the behavior of special keys, I'd like to close this issue first as I don't see this in current master bits. Anyone can reopen it if running into it again with our next version.

@johnfn
Copy link
Member

johnfn commented Oct 1, 2016

Yep, can't repro this one any more. :)

@BenJBailey
Copy link

Thank you!!!

@haf
Copy link
Author

haf commented May 13, 2017

This needs to be reopened, since it's still an issue.

screen shot 2017-05-13 at 19 44 09

@Chillee
Copy link
Member

Chillee commented May 18, 2017

@haf do you have a repro? Or is it random?

@haf
Copy link
Author

haf commented May 19, 2017

It's random.

@Chillee
Copy link
Member

Chillee commented May 19, 2017

@haf Do you notice it happening in any particular scenario? Or does it just happen randomly in insert mode?

@haf
Copy link
Author

haf commented May 19, 2017

It only happens when I push the editor via other extensions. So eg if Ionide is compiling my f# after a change and there is a bit lag in vscode then it happens much more often

@ivan-baldin
Copy link

This bug also happens in search mode. Typing / tab inserts and searches for <tab> string instead of \t. Same thing with / ctrl+v tab sequence.

@bestv2
Copy link

bestv2 commented Jan 11, 2018

It also happen to me.

  • VSCode Version: Code - Insiders 1.20.0-insider (f4ed56b0d61050f6a94cfa033a058fabfdc0d651, 2018-01-09T06:08:10.994Z)
  • OS Version: Darwin x64 17.3.0
  • Extensions (12)
    Extension Author (truncated) Version
    beautify Hoo 1.1.1
    gitlens eam 7.2.0
    auto-close-tag for 0.5.5
    auto-complete-tag for 0.0.2
    auto-rename-tag for 0.0.15
    recent-files jun 1.1.9
    endwise kai 1.2.2
    code-beautifier mic 1.7.2
    color-highlight nau 2.3.0
    Ruby reb 0.15.0
    vim vsc 0.10.8
    local-history xyz 1.6.2

    (1 theme extensions excluded)

---

@trmaphi
Copy link

trmaphi commented Jan 11, 2018

I got same problem:

Version 1.19.1
Commit 0759f77bb8d86658bc935a10a64f6182c5a1eeba
Date 2017-12-19T09:41:01.414Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

Reloading vim only help temporarily

@philipmclifton
Copy link

This one is driving me crazy.

A quick fix toggle insert mode on and off.

@philipmclifton
Copy link

The steps to trigger the issue are mentioned in #1195

I always use split mode like the people in linked issue.

Maybe the fix was removed accidentally?

@jpoon
Copy link
Member

jpoon commented Jan 23, 2018

Thanks @philipmclifton for linking the history. Helped with debugging.

@philipmclifton
Copy link

Is it possible this has come back in a new version of the plugin? It has occurred a few times for me in the past week.

@philipmclifton
Copy link

Have two tabs open. Open another file. Close the file. Press tab.

https://www.icloud.com/iclouddrive/0m6znnqxbbBAcItbaMd1_i-BA#tab-issue

^^ Video of issue happening.

@shawnaxsom
Copy link
Contributor

I was able to reproduce similar to the video @philipmclifton, thanks for the video. I'll try to take a look this weekend.

I'm not sure if it could have re-emerged. There is a chance #3090 could affect the issue, which was merged and might be released this evening. It isn't the same issue fixed, but I can see how it could be relevant if there is some sort of remapping of <Tab>.

@shawnaxsom
Copy link
Contributor

This regression can be discussed in #3096.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.