Vim plugin collection again
There were another vim plugin post last year for C development. The collection was somewhat out-of-date, though it does not depends on many external tools (git, python, etc). I have upgraded the collection a lot lately to make it morden, and also support development with Python.
Installation
Requirements: vim compiled with python support, git.
Optional: python-jedi, python-flake8, clang
Download this vimrc file.
Clone Vundle to vim folder
In vim command, input :PluginInstall<CR>
, the plugins should be automatically installed.
Plugins
Package management.
Manage directories, <F3>
to toggle.
Comment/uncomment codes with [NUM],cc
/ [NUM],cu
in normal mode.
Better taglist, <F4>
to toggle.
Beautiful status line.
Integration with git.
Snippet support. In insert mode, [KEYWORD]<tab>
to trigger. Customize snippet template in ~/.vim/bundle/vim-snippets/UltiSnips/*.snippets
.
General purpose auto completion, string, path etc. They have a newer version neocomplete, which requires lua support. I prefer this one. <tab>
for cycling suggestions, /
to close popup
Compiler level completion support for for C/C++/ObjC. Requires clang .so or .dylib in the PATH. Trigger with . -> ::
, manual trigger by ??
in insert mode. <F5>
checks error. Use .clang_complete
file in the project folder for flags, example
Resolve confliction between clang_complete and neocomplcache. set let g:neocomplcache_force_overwrite_completefunc=1
, and they should take over completefunc
in turn.
Completion for python, triggerred by . from xxx
etc, manual trigger ??
.
Python error and pep8 convention check <F5>
.
Buffer/MRU/File management. <C-p>
to trigger.
Alternative file switch (.c/.h). ,aa
in normal mode.
Integrate commandline into vim.
- [multi-cursor](https://github.com/terryma/vim-multiple-cursors
Multiple cursor support like sublime. <C-n>
in normal mode or visual mode to trigger.
Grep integration.
Python indention as block. [{ ]}
to jump around.
Others
jj
map to <ESC>
in insert mode.
]b [b [NUM],b
to switch buffers.
,f ,F
to cycle around quickfix entries.
<F2>
to insert time.
<F12>
to close buffer.
s
in normal mode to insert single character.
<space>
map to :
in normal mode.
<C-c>
in visual mode, <C-v>
in insert mode for system clipboard.