I am trying to customize the behaviour of Enter
key in Normal
mode in Vim.
Here is my .vimrc
:
nmap <CR> o<Esc>
nmap <S-CR> i<CR><Esc>
I am trying to make Enter simply append a newline after the current line when pressed. However, when the Shift-Enter
combination is pressed, I want to break the current line at the cursor.
The latter does not work. Whenever I press Shift-Enter
it just appends a line without breaking it at the cursor.