Map paste (p) to "0p

In .vimrc I tried to do

nmap p "0p

But with this line my wim just hangs. Can someone help me? What am I doing wrong?

I try to do this because when I pull the line, and if I use the del button after yanking, then the case "changes to the character I deleted. But the case" 0 remains the same.

thank

+5
source share
1 answer

Vim tries to map recursively p, resulting in an infinite loop. Use instead nnoremap:

nnoremap p "0p
+13
source

All Articles