Lucien
Lucien

Reputation: 156

Why vim source _vimrc doesn't work while deleting some configurations but work for adding some?

In my _vimrc i uncomment the line " noremap <a-j> :m+<CR>, then execute :w :so % the map works well. Whereas, the map still works when i comment the line back and execute :w :so % like before. Have i done something wrong?

Upvotes: 1

Views: 36

Answers (1)

phd
phd

Reputation: 94764

You've sourced _vimrc with a mapping (that actuated the mapping), commented out the mapping and sourced again. The mapping is still actuated because there was no command that deleted it. If you want to remove a mapping unmap it:

unmap  <a-j>

Upvotes: 2

Related Questions