Re: [問題] vim syntax highlight & cuda
※ 引述《hardcover (如是如是)》之銘言:
: 我把 cuda.vim放到 ~/.vim/syntax/ 下了,但是好像不能work
: vim syntax file 是要怎麼設或放在哪個位置才會work ?
: thanks
: ※ 引述《hardcover (如是如是)》之銘言:
: : 在cuda zone有一個cuda的vim syntax highlight
: : http://kitty.2y.idv.tw/~arney/cuda.vim
: : cuda zone上說要改/usr/share/vim/vim*/syntax
: : 不過我沒有權限動到這個位置。
: : 是不是有什麼放在 ~/.vim 之類的方法?
: : thanks
試試看是不是filetype沒有設的關係
Step 1: drop the file in ~/.vim/syntax (if the directory does not exist then
create it)
(這你已經做了)
Step 2: Append following lines in ~/.vim/filetype.vim
if exists("did_load_filetypes")
finish
endif
augroup filetypedetect
au! BufRead,BufNewFile *.cu setfiletype cuda
au! BufRead,BufNewFile *.cuda setfiletype cuda
augroup END
(副檔名如果不一樣,請自行代換,這裡只是舉例)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.169.86.9
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 3 之 3 篇):