VIM: disabling the cursor/arrow keys, but only for navigation

后端 未结 7 1938
自闭症患者
自闭症患者 2021-02-01 00:52
inoremap       
inoremap     
inoremap     
inoremap    
noremap             


        
相关标签:
7条回答
  • 2021-02-01 01:26

    The code you have posted should not disable history navigation in command line mode, are you sure you don't have cnoremap <Up> <Nop> or noremap! <Up> <Nop> somewhere? Try verbose cmap <Up> it should show you whether <Up> key is redefined for command line mode.


    If when saying «command bar» you meant command-line window, you could try the following:

    nnoremap <expr> <Up> ((bufname("%") is# "[Command Line]")?("\<Up>"):(""))
    
    0 讨论(0)
提交回复
热议问题