New answers tagged

0

To my knowledge nobody says this is "best practice," and I would advise against it. If you really want to do this, though, try this mapping: :inoremap <CR> <Esc>o There's a wealth of information in ":help map.txt" that could help you understand how to map in various modes, but briefly this sets a mapping in insert mode, doesn'...


0

None of the solutions worked for me. The problem was that I was using MobaXTerm, which replaced backspace with C-h by default, and had this line in ~/.vimrc: inoremap <C-h> <Left> as a result, effectively, all my backspaces were replaced with <Left> keypresses. The solution was to go to MobaXTerm settings -> Terminal -> Local shell ...


1

Simply because a line break in the replacement component of the substitution command is represented by \r in Vim rather than \n... :s/,/\r/gc Alernatively, you can use this: :s/,/^M/gc Where the ^M is entered by typing Ctrl+V then Enter See :h s/\r and :h s/<CR> FYI using \n will... insert a <NL> (<NUL> in the file) (does NOT break the ...


Top 50 recent answers are included