1

I am creating a new filetype for arduino files in vim.

I looked into the ftdetect documentation and it is specified that a new file with the following content inside the .vim/ftdetect/ folder should be created

au BufRead,BufNewFile *.mine        set filetype=mine

In the above example both the file extension and filetype are same and the file is created with the name mine.vim

But for arduino the file extension (.ino and pde) is different from the filetype (arduino)

My question is what should be the filename in this case. Should it be ino or arduino?

4

1 回答 1

7

文件名应该与文件类型相同,即arduino.vim在这种情况下。为了识别这两个文件扩展名,将它们列出如下:

au BufRead,BufNewFile *.ino,*.pde set filetype=arduino
于 2013-01-13T11:07:25.253 回答