It uses clang to generate a list of suggestions and works fine for both C and C++. To let clang know about your include directories custom defines, you should place your -I and -D compiler flags into the .
c (change) takes a vi/vim motion (such as w , j , b , etc.). It deletes the characters from the current cursor position up to the end of the movement. Note that this means that s is equivalent to cl (vim documentation itself claims these are synonyms). r (replace) never enters insert mode at all.
Edit: Updated as of July 2013
I'm using vim
as my C++ editor, however I'm not using many 'exotic' stuff.
^P
and ^N
.I have a bunch of user defined abbreviations for my C++ use, for example :
abbreviate bptr boost::shared_ptr
abbreviate cstr const std::string &
I have several functions for "code snippets" like things, for example :
function! IncludeGuard()
let basename = expand("%:t:r")
let includeGuard = '__' . basename . '_h__'
call append(0, "#ifndef " . includeGuard)
call append(1, "#define " . includeGuard)
call append(line("$"), "#endif /* !" . includeGuard . " */")
endfunction
The only plugin I really couldn't live without is Command-T (which requires ruby support)
.cc
to .h
switching, you can try this plugin
NERDTree http://www.vim.org/scripts/script.php?script_id=1658
Exuberant ctags (vim already supports the hotkeys natively) http://ctags.sourceforge.net/
taglist: http://vim-taglist.sourceforge.net/
snipmate: http://www.vim.org/scripts/script.php?script_id=2540
I don't do omnicompletion just the usual ^n ^p stuff but there are plenty of resources to google for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With