The hardest part is to get Python work with Vim for autocompletion
- Install Xcode, Command Line Tools, and home-brew, see home-brew
- Reinstall system python and vim here
- Install Vundle, and autocomplete by here
- git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
- touch ~/.vimrc
- Change the .vimrc as in the link
- Add Bundle 'Valloric/YouCompleteMe' to .vimrc
- Open vim and :PluginInstall
- Add this let g:ycm_autoclose_preview_window_after_completion=1
map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR> to .vimrc
- Go to .vim/bundle/YouCompleteMe and do ./install.py --clang-interpreter to compile
- Possible increase waiting time in ~/.vim/YouCompleteMe/python/ycm/client/completion_request.py to 2seconds
- Do other things like: check for code error (pyflake8), NerdTree for navigation files, Powerlines
No comments:
Post a Comment