Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何让 vim 将 Podfile 和 podspec 文件(一些没有扩展名的文件)识别为 ruby 文件,以便 vim 使语法高亮。
将此添加到您的.vimrc:
autocmd BufNewFile,BufRead Podfile,*.podspec set filetype=ruby
这一行指示 Vim 将Podfile和具有.podspec扩展名的文件视为 Ruby 文件,以便它们继承 Ruby 语法突出显示。