I'm just starting to use vim.
I would like to know if there is a simple default key binding that will allow me to add a space in normal mode.
If not what is the next best alternative?
Then, any time you type s p a c e in normal mode, it'll insert a space at the cursor. Or you could just hit i Space Esc . OK, OK. If you really want to use the space bar in normal, add <> to the above.
To insert individual spaces, click on the beginning of the line, then use cmd (for Mac) or ctrl (for Windows) and click on the beginning of other lines. It's the same way as how you select multiple files at once. Now when you add a space in front, it will add to all the lines that you selected.
:nnoremap space i<space><esc>
Then, any time you type space in normal mode, it'll insert a space at the cursor.
Or you could just hit iSpaceEsc.
OK, OK. If you really want to use the space bar in normal, add <>
to the above.
:nnoremap <space> i<space><esc>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With