How to remap <Ctrl-Home> to go to first line in file?

此生再无相见时 提交于 2019-12-24 09:03:43

问题


How to remap Ctrl+Home to go to first line in file? I tried the following command, but it doesn't work (environment is xterm in KDE). Vim recognises the Home key and goes to beginning of line, but looks like it doesn't recognized Ctrl+Home combo.

noremap <Ctrl-Home> gg

回答1:


  1. Vim does not know <Ctrl- modifier. It calls it <C-. Try

    inoremap <C-Home> gg
    
  2. If that does not help, then see whether there is some difference between what vim shows when you press <C-v><C-home> and <C-v><Home>, post both results here. If there is no difference, then it maybe is not possible.



来源:https://stackoverflow.com/questions/3503252/how-to-remap-ctrl-home-to-go-to-first-line-in-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!