2010年11月2日火曜日

11/2 CUDAのvimでの色分け

suで作業する
# vim /usr/share/vim/vim70/filetype.vim

C++の部分を編集
#########################################
" C++
if has("fname_case")
au BufNewFile,BufRead *.cxx,*.c++,*.C,*.H,*.hh,*.hxx,*.hpp,*.moc,*.tcc,*.inl setf cpp
else
au BufNewFile,BufRead *.cxx,*.c++,*.hh,*.hxx,*.hpp,*.moc,*.tcc,*.inl setf cpp
endif
#########################################

これの両方に*.cuを追加すればOK

#########################################
" C++
if has("fname_case")
" au BufNewFile,BufRead *.cxx,*.c++,*.C,*.H,*.hh,*.hxx,*.hpp,*.moc,*.tcc,*.inl setf cpp
au BufNewFile,BufRead *.cxx,*.c++,*.C,*.H,*.hh,*.hxx,*.hpp,*.moc,*.tcc,*.inl,*.cu setf cpp
else
" au BufNewFile,BufRead *.cxx,*.c++,*.hh,*.hxx,*.hpp,*.moc,*.tcc,*.inl setf cpp
au BufNewFile,BufRead *.cxx,*.c++,*.hh,*.hxx,*.hpp,*.moc,*.tcc,*.inl,*.cu setf cpp
endif
#########################################

色分けの恩恵をCUDAファイルでも受けられる

0 件のコメント:

コメントを投稿