如果文件是乳胶文件,我想在 .vimrc 中运行命令。我想我的语法有问题,但它不起作用。有什么线索吗?
if &filetype=='tex' set spell endif
您可以使用自动命令来实现您想要的:
autocmd BufNewFile,BufRead *.tex set spell