gpt4 book ai didi

Vim:编辑特定文件时运行一些命令

转载 作者:行者123 更新时间:2023-12-04 14:49:16 24 4
gpt4 key购买 nike

我想让我的 Vim 运行一些命令,比如 setlocal spell spelllang=en_us当我编辑扩展名为 en 的文件时,例如abc.en .我该如何实现?

最佳答案

    augroup spell_settings
au!
" set en_us as default language (unknown extension):
au BufEnter * setlocal spell spelllang=en_us
" set en_us for en files specifically:
au BufEnter *.en setlocal spell spelllang=en_us
" to add multiple commands just append:
au BufEnter *.en setlocal syntax on
augroup END

关于Vim:编辑特定文件时运行一些命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9790663/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com