Vim - mapping with an optional register prefix

前端 未结 2 374
孤城傲影
孤城傲影 2021-01-20 02:13

So I\'ve discovered that a common task for me in Vim is to PUT either to the start of the line or the end of the line. So my mapping could be:

nmap 

        
2条回答
  •  不思量自难忘°
    2021-01-20 02:47

    You can do this using mapping in one line:

    nnoremap  \p '$"'.v:register.v:count1.'p'
    nnoremap  \P '0"'.v:register.v:count1.'P'
    

提交回复
热议问题