I have the following mappings in my ~/.vimrc
:
" Add new lines and spaces without changing the mode
nmap <leader>j mvo<Esc>`v
nmap <leader>k mvO<Esc>`v
nmap <leader>h i<space><esc>l
nmap <leader>l a<space><esc>h
All shortcuts work, but I can't get consistent behavior with leader+h/l commands.
For example, here is the word and cursor is at h:
Floccinaucinihilipilification
When we press leader+l, one space gets instantly added to the right and cursor stays at h:
Floccinaucinih ilipilification
Pressing u moves cursor one position to the right, which is unexpected.
Next, when we press leader+h, space gets added to the left with approximately 3 seconds delay:
Floccinaucini hilipilification
However, this time pressing u leaves cursor at h as expected.
NVIM v0.2.2
Any clues?