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

Undo does not work after save #1783

Closed
ghost opened this issue May 30, 2017 · 23 comments
Closed

Undo does not work after save #1783

ghost opened this issue May 30, 2017 · 23 comments
Labels

Comments

@ghost
Copy link

ghost commented May 30, 2017

  • Click thumbs-up 👍 on this issue if you want it!
  • Click confused 😕 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Environment:

  • VSCode Version: Insiders
  • VsCodeVim Version: 0.8.4
  • OS: macOS 10.12.6

What happened:
After saving a file with :w I cannot undo anymore.

What did you expect to happen:
Continue undoing the horrors I inflicted on the file.

How to reproduce it:
Make some changes to a file, save it and try to undo those changes.

@Chillee
Copy link
Member

Chillee commented May 31, 2017

This issue doesn't seem to occur for me, with VSCodeVim version 0.8.4 and ArchOS.

Ah I see. Does this only happen when your save renames the file? Like, you open up a completely new file, save it with a name, and then try to undo?

@am1ko
Copy link

am1ko commented Jun 1, 2017

Happens to me also

  • VSCodeVim version 0.8.4
  • VSCode Version 1.13.0-insider (1.13.0-insider)
  • Mac OS Sierra 10.12.5

@erlais
Copy link

erlais commented Jun 7, 2017

VSCodeVim undo is totally unusable for me right now (default ctrl+z works just fine). Whenever a file is saved there is no undo history. It's not just when filename is changed, any save at all seems to erase undo history. I am using auto save after 1 second delay, so I have 1 second of undo history 😄. Turning auto save off is more usable at the moment, but doesn't fix the problem.
EDIT: Same behavior on my laptop and desktop

  • VSCodeVim version 0.8.4
  • VSCode Version 1.13.0-insider
  • Windows 10

@Chillee
Copy link
Member

Chillee commented Jun 7, 2017

@erlais @DarkerMatter Could you guys post your settings?

@ghost
Copy link
Author

ghost commented Jun 7, 2017

// Place your settings in this file to overwrite the default settings
{
    "workbench.colorTheme": "Monokai-Soft",
    "workbench.iconTheme": "vscode-simpler-icons",
    "workbench.welcome.enabled": false,
    "workbench.activityBar.visible": false,
    "workbench.colorCustomizations": {
        "statusBar.background": "#B16900",
        "statusBar.noFolderBackground": "#B16900",
        "statusBar.debuggingBackground": "#B16900"
    },
    "vim.hlsearch": true,
    "vim.statusBarColorControl": true,
    "vim.statusBarColors": {
        "normal": "#000000",
        "insert": "#B00B0B",
        "replace": "#B00B0B",
        "visual": "#B16900",
        "visualline": "#B16900",
        "visualblock": "#B16900"
    },
    "editor.fontFamily": "Monaco",
    "editor.fontSize": 12.3,
    "editor.tabSize": 2,
    "editor.lineNumbers": "relative",
    "zenMode.hideStatusBar": false,
    "problems.autoReveal": true,
    "window.titleBarStyle": "custom",
    "clock.dateFormat": "    HH:MM    ",
    "gitProjectManager.baseProjectsFolders": [
        "/Projects"
    ],
    "go.testOnSave": false,
    "go.coverageOptions": "showUncoveredCodeOnly",
    "go.lintTool": "gometalinter",
    "go.lintFlags": [
        "--vendor",
        "--disable-all",
        "--enable=errcheck",
        "--enable=vet",
        "--enable=vetshadow",
        "--enable=golint",
        "--enable=ineffassign",
        "--enable=goconst",
        "--tests"
    ],
    "go.autocompleteUnimportedPackages": true,
    "git.enableSmartCommit": true,
    "todohighlight.isEnable": true,
    "todohighlight.include": "{**/*.js,**/*.jsx,**/*.ts,**/*.html,**/*.php,**/*.css,**/*.scss,**/*.go}",
    "todohighlight.exclude": "{**/node_modules/**,**/bower_components/**,**/dist/**,**/build/**,**/.vscode/**,**/_output/**,**/*.min.*,**/*.map,**/vendor/**}",
    "editor.cursorBlinking": "solid",
    "editor.cursorStyle": "block",
    "editor.minimap.enabled": false,
    "workbench.statusBar.visible": true,
    "material-icon-theme.showUpdateMessage": false,
    "vim.foldfix": true,
    "vim.enableNeovim": true,
    "vim.neovimPath": "/usr/local/bin/nvim",
    "vim.disableAnnoyingNeovimMessage": true,
    "vsicons.dontShowNewVersionMessage": true
}

@erlais
Copy link

erlais commented Jun 7, 2017

My settings in Pastebin

Edit: I removed all my settings, keybindings, extensions. Uninstalled neovim. Did a new insiders update, Put only VSCodeVim back, opened a new window so I wouldn't be inside a project. Still the same issue. Uninstalled VSCode completely and reinstalled - still same.

Edit2: I should mention that I have had unexpected extension keybind behavior before and it was caused by some of my system/region/language settings being non-standard (Estonian). That particular issue was related to creating/editing timestamps. Not sure if undo in this case has anything to do with time or other region settings, but looks like @DarkerMatter might be Spanish and is having similar issue.

Oh and just to be clear, it did work before. Pretty sure after the nvim update it broke.

@Chillee
Copy link
Member

Chillee commented Jun 9, 2017

I was just able to replicate this issue. May have something to do with the amount of load your computer is currently under?

@ghost
Copy link
Author

ghost commented Jun 9, 2017

@erlais I have an international English keyboard with the Irish keyboard layout (generally faster for typing Spanish than a Spanish keyboard¡!¡!) and Spanish regional settings. I have never had any issues with this setup.

Also, the nvim update sounds about right.

@ghost
Copy link
Author

ghost commented Jun 9, 2017

@Chillee This happens under all load conditions.

@michaelHL
Copy link

michaelHL commented Jun 9, 2017

+1 Confirmed. 😐 Can't redo my operations after saving.

  • VSCodeVim version 0.8.4
  • VSCode Version 1.13.0
  • Windows 10 x64 1607

settings.json

@dkln
Copy link

dkln commented Jun 9, 2017

Same here. But... it does work when you use cmd+z

@michaelHL
Copy link

@dkln And cmdshiftz 😶

@bjeanes
Copy link

bjeanes commented Jun 9, 2017

Also experiencing this. No undo available directly after save.

VSCodeVim version 0.8.4
VSCode Version 1.13.0
macOS 10.12.5

settings
{
    "vim.enableNeovim": true,
    "vim.disableAnnoyingNeovimMessage": true,
    "vim.easymotion": true,
    "vim.leader": " ",
    "editor.wordWrap": "bounded",
    "editor.tabSize": 2,
    "editor.tabCompletion": true,
    "vim.hlsearch": true,
    "vim.incsearch": true,
    "vim.statusBarColorControl": true,
    "vim.useSystemClipboard": true,
    "vim.statusBarColors": {
        "normal": "#005f5f",
        "insert": "#5f0000",
        "visual": "#5f00af",
        "visualline": "#005f87",
        "visualblock": "#86592d",
        "replace": "#000000"
    },
    "workbench.colorCustomizations": {
        "statusBar.background": "#005f87",
        "statusBar.noFolderBackground": "#005f87",
        "statusBar.debuggingBackground": "#005f87"
    },
    "workbench.colorTheme": "Dark (Monokai)",
    "editor.wordWrapColumn": 100,
    "vim.textwidth": 100,
    "editor.multiCursorModifier": "ctrlCmd",
    "window.zoomLevel": -1,
    "extensions.ignoreRecommendations": false,
    "editor.renderWhitespace": "boundary",
    "files.trimTrailingWhitespace": true
}

@Chillee
Copy link
Member

Chillee commented Jun 9, 2017

Oh shit I just realized. Fuck.

This is a change to VSCode version 1.13.0. The reason @DarkerMatter, @am1ko, and @erlais reported this issue early is because they're on insiders.

Now that version 1.13.0 has dropped, everybody's getting this issue (including me). It has to do with a change to VSCode on how they're handling dirty files.

@bjeanes
Copy link

bjeanes commented Jun 9, 2017

Fixable?

@Chillee
Copy link
Member

Chillee commented Jun 9, 2017

@bjeanes Definitely. I wrote about what I figured out here: #1814

It might be worth it for me to switch to Insiders so I can see these things before they happen...

@djmurf
Copy link

djmurf commented Jun 10, 2017

Seeing issue here also.... Save file, history is gone... Please fix, I really don't want to go back to Atom...

@Chillee
Copy link
Member

Chillee commented Jun 11, 2017

We just pushed out a new release, and this problem should be fixed in v0.8.5

@Chillee Chillee closed this as completed Jun 11, 2017
@ghost
Copy link
Author

ghost commented Jun 11, 2017

I've switched to 1.13 stable and it works there.

@Chillee
Copy link
Member

Chillee commented Jun 11, 2017

@DarkerMatter it should work anywhere if you v0. 8.5 of vscodevim installed.

@dkln
Copy link

dkln commented Jun 20, 2017

👍 ❤️

@caipre
Copy link

caipre commented Dec 22, 2017

I'm on Version 1.19.1 with Vim 0.10.6 and just hit this. Possibly because I'm also using the go plugin?

@savaged
Copy link

savaged commented Feb 19, 2020

Same here. I have autosave on and hitting u does nothing

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

No branches or pull requests

9 participants