:nnoremap <silent><C-j> m`:silent +g/\m^\s*$/d<CR>``:noh<CR> :nnoremap <silent><A-j> :set paste<CR>m`o<Esc>``:set nopaste<CR>
Upon saving and reloading the vimrc (
:so $MYVIMRC), only the first binding works. The second does not work. The behavior I see is like the
A-j just registers as a
j, with the cursor moving down a line. My expected behavior is to see the a new line added below the cursor and a return to normal mode.
As context: I am using OS X's Terminal.app, and I have "Use option as meta key" turned on in its settings.