3 ms·
I respect Vim, I've seen it used with impressive speed, BUT I am so used to command-s to save, that I don't feel ready to :w enter all the time. VS Code is powe
by adamredwoods 6y ago
I respect Vim, I've seen it used with impressive speed, BUT I am so used to command-s to save, that I don't feel ready to :w enter all the time. VS Code is powerful, and learning the keyboard shortcuts for that are getting better every day (command-shift-p format-selection enter).
- pokernaming 6y agoVScode has a vim plugin. You can easily customise your key bindings as well.
- Exuma 6y agomacvim still supports command+S
- Ingon 6y agoYou can put something like this in your .vimrc: " save with ctrl+s nmap <c-s> :w<CR> imap <c-s> <Esc>:w<CR>a Edit: I guess it should be: nmap <D-s> :w<CR> imap <D-s> <Esc>:w<CR>a
- kdheepak 6y agoYou can also use imap <C-s> <C-o>:w<CR> <C-o> in insert mode can be used to execute normal mode commands.
- jchook 6y agoYou get over it fast. 1. You can bind save to any key combo you want. I personally use <leader>w. I find it more ergonomic, fast, and portable than command-s. 2. Every action in vim reads like a little story. You start to speak the stories to yourself. For example: Select the entire line (V), move to the end of the line ($), move to the matching end brace (%), delete (d) 3. Then you realize you can store those stories into a macro and execute them ad hoc, and the world becomes amazing. The things you learn are cumulative. You begin to expect the pattern to continue and more often than not it does.
- feute 6y agoI used to have something like nmap ,w :w<cr> in my vimrc so I can only press two keys to save the file. I think the colon character (:) adds a little overhead to such a common command because one has to press shift with the colon/semicolon key (depending on the keyboard layout), and then release them to continue pressing the remaining keys. And this is if you're already in normal mode; if you're in visual/insert mode you'd have to press Esc or Ctrl+[ first. Of course, these are small details that you don't normally think about, but it does feel a little cumbersome when coming from an editor where you can just press Ctrl+s or C-x C-s (in the case of Emacs) and continue working. In the end, vim doesn't stop you from defining key bindings to improve your workflow.