Vim short binding for | doesn't work

前端 未结 1 1410
予麋鹿
予麋鹿 2020-12-12 04:33

Trying to map horizontal maximize to something two keystrokes less, but none of these works:

nnoremap \\ | \" Maximize horizontally
         


        
相关标签:
1条回答
  • 2020-12-12 04:54

    The bar character | is a command separator in Vim script. To use it in a mapping, use <Bar>:

    nnoremap <Leader>\ <C-W><Bar>
    

    The relevant documentation is at :h map_bar.

    0 讨论(0)
提交回复
热议问题