잠시 (2 년) XCode를 사용한 후 개발/코드 편집을 위해 MacVim으로 이동하려고합니다. 대부분 비 - obj-c 프로젝트를 시작하고 코드 편집기를 계속 전환하고 싶지 않기 때문에이 작업을 수행하고 있습니다.Vim clang_complete 자동 팝업
나는 몇 가지 편리한 플러그인으로 설치 MacVim을했습니다 :
- Janus (플러그인의 호스트가, 내가 아는) 나에게 가장 중요한 일입니다
- cocoa.vim
- clang_complete, , 그것은 XCode의 코드 완성을 모방하기 때문에.
완성 상자를 자동으로 팝업하도록 구성 할 수 없다는 점을 제외하면 지금까지 모든 것이 잘 작동합니다. 코드 완성을보고 싶을 때마다 "탭"을 사용해야합니다. 차라리 단어의 특정 수를 입력 한 후 3자를 입력하면 열립니다. 나는 잠시 (몇 시간) 주변을 수색했지만 작동시키지 못했습니다.
도움을 주시면 감사하겠습니다. 감사!
""
"" Janus setup
""
" Define paths
let g:janus_path = escape(fnamemodify(resolve(expand("<sfile>:p")), ":h"), ' ')
let g:janus_vim_path = escape(fnamemodify(resolve(expand("<sfile>:p" . "vim")), ":h"), ' ')
let g:janus_custom_path = expand("~/.janus")
" Source janus's core
exe 'source ' . g:janus_vim_path . '/core/before/plugin/janus.vim'
" You should note that groups will be processed by Pathogen in reverse
" order they were added.
call janus#add_group("tools")
call janus#add_group("langs")
call janus#add_group("colors")
""
"" Customisations
""
if filereadable(expand("~/.vimrc.before"))
source ~/.vimrc.before
endif
" Disable plugins prior to loading pathogen
exe 'source ' . g:janus_vim_path . '/core/plugins.vim'
""
"" Pathogen setup
""
" Load all groups, custom dir, and janus core
call janus#load_pathogen()
colorscheme Wombat256
"clang_autocomplete options
set conceallevel=2
set concealcursor=vin
let g:clang_use_library=1
let g:clang_library_path='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib'
let g:clang_complete_auto=1
let g:clang_periodic_quickfix=1
let g:clang_snippets=1
let g:clang_conceal_snippets=1
let g:clang_snippets_engine='clang_complete'
" Show clang errors in the quickfix window
"let g:clang_complete_copen = 1
set completeopt=longest,menuone,preview
너무 늦기 전에 야누스를 제거하십시오. – romainl
@romainl Janus와 같은 vim 배포판을 사용하는 것이 나쁜 생각 일 수 있습니다. – timss
이것은 MacVim에만 해당되는 것 같지 않습니다. 질문의 제목을 변경하고자 할 수 있습니다. – timss