74th / vscode-vim

vim emulator for Visual Studio Code
MIT License
215 stars 25 forks source link

ciw and viw doesn't work as expected. #72

Open DevotionGeo opened 6 years ago

DevotionGeo commented 6 years ago

I use these two commands very much, viw to select a single word under cursor or ciw to replace a single word under cursor (delete the word and leave the cursor in place in insert mode to type the new word). VimStyle is my favorite extension, it even alters the default behavior of u. In default Vim everything from the last mode-change will be undone with u but as in VScode we don't change modes for saving a file, so that default behavior is often dangerous, but this extension changes that behavior in a nice way. Because of this behavior this is my favorite Vim emulator for VSCode, but I miss the above two command too much.

74th commented 6 years ago

Thank you for using! ciw and caw is work in progress. https://github.com/74th/vscode-vim/tree/feature/%2368 u calls only VSCode undo function. There are many things to do for u, and it is postponed.

DevotionGeo commented 6 years ago

@74th You can also make the u command configurable. Like I suggested to the other vim emulator extension.

timtro commented 6 years ago

For what it's worth, I prefer the finer-grained undo. The ciw and viw commands, for me, are important. (I'm not suggesting, even for a moment, that my priorities should be considered above anyone else's. I merely mention it as a datum of user-feedback.)

Thank you, by the way, for the extension. I find the more popular Vim extension breaks too many native VS Code keybindings and extensions. I find yours quite intuitive in terms of what works as Vim and what works as VS Code.

timtro commented 6 years ago

I forgot to mention a workaround. For those missing ciw, you can use bcw to go to the beginning of the word before changing the word, giving the same effect. Unfortunately, bvw won't do what you want because it will select the white space between the word you're trying to select and the next.