vimを今までプラグインなしで使ってきたのですが・・・
超不便です!!!!
というわけで色々調べたのですが・・・・全くわかりません。
sudo apt-get clang-4.0
sudo apt-get clang-format-4.0
色々調べました。
現在の設定はこんな感じです。
if &compatible set nocompatible endif set runtimepath+=~/.vim/dein/repos/github.com/Shougo/dein.vim call dein#begin(expand('~/.vim/dein')) call dein#add('Shougo/dein.vim') call dein#add('Shougo/vimproc.vim', {'build': 'make'}) call dein#add('Shougo/neocomplete.vim') call dein#add('Shougo/neomru.vim') call dein#add('Shougo/neosnippet') call dein#end() function! CPPCodeCleanup() " echo "Cleanup cpp code" let l:lines="all" let g:clang_format_fallback_style = 'Google' :pyf /usr/local/share/clang/clang-format.py endfunction command! CPPCodeCleanup call CPPCodeCleanup() autocmd BufWrite *.{cpp} :CPPCodeCleanup autocmd BufWrite *.{hpp} :CPPCodeCleanup autocmd BufWrite *.{c} :CPPCodeCleanup autocmd BufWrite *.{h} :CPPCodeCleanup " 'Shougo/neocomplete.vim' {{{ let g:neocomplete#enable_at_startup = 1 if !exists('g:neocomplete#force_omni_input_patterns') let g:neocomplete#force_omni_input_patterns = {} endif let g:neocomplete#force_overwrite_completefunc = 1 let g:neocomplete#force_omni_input_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)' let g:neocomplete#force_omni_input_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::' """}}} " 'justmao945/vim-clang' {{{ " disable auto completion for vim-clanG let g:clang_auto = 0 let g:clang_complete_auto = 0 let g:clang_auto_select = 0 let g:clang_use_library = 1 " default 'longest' can not work with neocomplete let g:clang_c_completeopt = 'menuone' let g:clang_cpp_completeopt = 'menuone' if executable('clang-3.6') let g:clang_exec = 'clang-3.6' elseif executable('clang-3.5') let g:clang_exec = 'clang-3.5' elseif executable('clang-3.4') let g:clang_exec = 'clang-3.4' else let g:clang_exec = 'clang' endif if executable('clang-format-3.6') let g:clang_format_exec = 'clang-format-3.6' elseif executable('clang-format-3.5') let g:clang_format_exec = 'clang-format-3.5' elseif executable('clang-format-3.4') let g:clang_format_exec = 'clang-format-3.4' else let g:clang_exec = 'clang-format' endif let g:clang_c_options = '-std=c11' let g:clang_cpp_options = '-std=c++11 -stdlib=libc++' " }}} function! CPPCodeCleanup() " echo "Cleanup cpp code" let l:lines="all" let g:clang_format_fallback_style = 'Google' :pyf /usr/local/share/clang/clang-format.py endfunction command! CPPCodeCleanup call CPPCodeCleanup() autocmd BufWrite *.{cpp} :CPPCodeCleanup autocmd BufWrite *.{hpp} :CPPCodeCleanup autocmd BufWrite *.{c} :CPPCodeCleanup autocmd BufWrite *.{h} :CPPCodeCleanup
なにも起きません・・・・
さっぱりやり方がわかりません。
シンタックスハイライトや入力補完機能が欲しいです。
どなたか教えてください。
環境はLinux です。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/07/21 03:22
2017/07/21 06:24
2017/07/23 12:44