Alt key shortcuts not working on gnome terminal with Vim

前端 未结 6 2081
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-29 18:27

I\'m running Vim on a gnome terminal. But the alt key mappings are not working.
For example (this is just an example):

:imap  
         


        
6条回答
  •  臣服心动
    2020-11-29 18:47

    It may be that the shortcuts are actually from the Gnome Desktop. Try looking at the Gnome Keyboard Shortcuts tool (System menu, Preferences, Keyboard Shortcuts), which lets you view and modify the shortcuts defined on Gnome Desktop. If the key combination is assigned to a function on Gnome Desktop, then remove it and then that key combo should filter down to Vim properly.

    Or you may be right that it is a problem of the terminal. Not all terminals support all key combos. Your problem may be the one described in the Vim help docs at :h map-alt-keys. The docs provide a workaround, but not a very good one.

提交回复
热议问题