Vim inoremap for specific filetypes

后端 未结 5 2133
孤独总比滥情好
孤独总比滥情好 2020-11-29 11:38

I\'ve added some simple inoremap commands to my .vimrc to help with parens and brackets completion, but I only want them to apply to php files.

5条回答
  •  感情败类
    2020-11-29 12:07

    There may be a better way to do it, but this should work:

    autocmd FileType php call Inoremaps()
    fu! Inoremaps()
       inoremap ...
    endfu
    

提交回复
热议问题