Updated Vim Configuration on Github

Last weekend I played arround with tmux, powerline which is awesome by the way, but while experimenting with these tools I also found some new features for my Vim configuration.

Now I have the following improvements:

  • Replaced omnicomplete with clang_complete. This way you don’t need to maintain a ctags database. Clang_complete analyzes the code in the background using clang so the autocomplete information is alway up to date.
  • Using better header/source switcher: a.vim. Now it’s easy to switch between c/h or  cpp/h files without a need to change any config.
  • Added vim-airline, a lightweight powerline alternative for vim
  • Added some abbreviations to autocomplete “#i” -> “#include <>”, for-loops, etc.
  • Added macro for sourrounding Shell or Cmake variables. just place the cursor on a word and press @s (in normal mode). A variable “FOO” becomes “${FOO}” this way.
  • Added macro for implementing forward declarations. See example below.
Example: You have a header file containing this.
void foo();
int bla(int x);
double fft(char *data, int len);
You copy/paste this into your cpp file, place the cursor onto the first line and type “3@i” (implement 3 functions) to get this:
void foo()
{
}
int bla(int x)
{
}
double fft(char *data, int len)
{
}
To make the things easy for you a put my complete vim configuration to GitHub.
Advertisements

0 Responses to “Updated Vim Configuration on Github”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s





%d bloggers like this: