Can you have file type-specific key bindings in Vim?

后端 未结 6 1651
攒了一身酷
攒了一身酷 2020-12-04 10:54

In my .vimrc file, I have a key binding for commenting out that inserts double slashes (//) at the start of a line:

" the mappi         


        
6条回答
  •  一生所求
    2020-12-04 11:44

    This is only a partial answer for people coming here having difficulties getting any ftplugin scripts working, but remember that your .vimrc (or a file that it sources) should contain

    filetype plugin on
    

    or

    :filetype plugin on
    

    for filetype-plugins to be executed when a file of a given type is loaded.

提交回复
热议问题