5 ms·
I'm in a similar spot but between VS Code and vi. Have you tried the vim extension for VS Code? In theory it would be an almost perfect solution but I can't see
by nikcub 10y ago
I'm in a similar spot but between VS Code and vi. Have you tried the vim extension for VS Code? In theory it would be an almost perfect solution but I can't seem to get it to feel natural. I might just need to dedicate more time to adjusting muscle memory.
- linkregister 10y agoIt misses the : operator, which makes it impossible to do a :wq . Or rather the : operator brings up the VS code console which is completely different.
- SwellJoe 10y agoI never try to make vim keybindings work in a GUI editor. It is inevitably an uncanny valley, where it's not quite right, and I spend more time context switching between "real vim" and "this sort of vim" than I would just doing things the way the editor was built. I have spent enough time writing prose (and even coding) in more standard GUI editor environments that it doesn't feel unnatural to work in that way. There are some things that are a little painful (I'm really comfortable with, for example, complex substitutions in vim, but not so much in other editors), but most of the time I don't need those features often enough to have it be a major impediment. Like, I have no idea how to "change these two words, but only if it's at the end of a line, and keep the words in between them the same" in any editor other than vim. I'm sure it's possible, and maybe if I ever really switch off of vim, I'll figure it out. So...yeah, I use Atom and VS Code mostly stock, with a few plugins. I don't ask them to act like vim. I'd just be disappointed.
- samb1729 10y ago> "change these two words, but only if it's at the end of a line, and keep the words in between them the same" How do you do this in vim? Could you give an example? I've tried a few times to love vim but emacs keeps pulling me back.
- khedoros1 10y agoI'd think something like: :%s/word1\(.*\)word2$/word3\1word4/ Over each line in the whole file, search for word 1 and word 2 (which is at the end of the file), separated by arbitrary non-newline characters, and change them to word3 and word4.
- juki 10y agoThe Emacs equivalent would be M-x replace-regexp word1\(.*\)word2$ RET word3\1word4 RET Assuming you have `replace-regexp` bound to a key, it's practically the same. Works on the whole buffer (by default), or the region (if selected).
- SwellJoe 10y ago