Is there a way to map Ctrl period and Ctrl comma in Vim?

后端 未结 4 429
深忆病人
深忆病人 2021-02-06 21:52

I can\'t seem to find a way to map period and comma in Vim. Is it possible?

4条回答
  •  广开言路
    2021-02-06 22:49

    Don't be so pessimistic about making a shortcut. There are outside options. Try the following code in AutoHotKey. [All you need is download and install AHK and run the following code as a script.]

    #IfWinActive ahk_class Vim
    ^+!left:: send :s/{^}/`%/g{Enter}{$}o{enter} ; This is for commenting in tex files. you may change `% to be other symbles. 
    ^,:: send ^ww
    +^,:: send ^wW
    

    Hope this would help with your problem.

提交回复
热议问题