vim syntax highlight & cuda - Linux

By Vanessa
at 2009-08-20T00:52
at 2009-08-20T00:52
Table of Contents
※ 引述《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
(副檔名如果不一樣,請自行代換,這裡只是舉例)
--
: 我把 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
(副檔名如果不一樣,請自行代換,這裡只是舉例)
--
Tags:
Linux
All Comments
Related Posts
SSL 找不到認証機構的問題

By Zanna
at 2009-08-19T23:04
at 2009-08-19T23:04
Apache本機端測試問題

By Catherine
at 2009-08-19T22:15
at 2009-08-19T22:15
phpMyAdmin 拒絕存取

By Skylar DavisLinda
at 2009-08-19T20:01
at 2009-08-19T20:01
Arch linux PACMAN 台灣的Mirror 站

By Puput
at 2009-08-19T19:13
at 2009-08-19T19:13
postqueue -p出現奇怪的訊息...

By Heather
at 2009-08-19T17:28
at 2009-08-19T17:28