My Vim configuration files

Vim Logo

Some people in the comments of this article and this article requested my vimrc file. Rather than just providing it, I think it is better to check it into a source repository so people can get the latest version. You can get all my Vim files here:

GitHub Repository

I prefer to keep the vimrc and gvimrc in the vim folder, then symlink them to my home folder. I think this keeps things more organized. The commands are (on a *nix system):

ln -s ~/vim/vimrc ~/.vimrc
ln -s ~/vim/gvimrc ~/.gvimrc

I mod these files all the time, and sometimes I break stuff, however I usually fix them quickly as Vim is my main editor. Here are a few things to note:

  • My main platforms are OS X and Linux (Debian based in command-line, not XWindows), so if your platform differs you may have issues (most likely not)
  • I'm using the latest version of Vim, and my config expects it
  • Somethings require ruby to be compiled into Vim (this is default in MacVim), however there are no major errors if it isn't, as I use these Vim files all the time in vanilla Vim

Let me know if you find any problems, or there is a better way to do something that I did, I'm always interested in learning more about Vim. Happy coding.

  1. Appler November 18, 2008 01:17 

    Thank you so much!!

    ^_^

  2. Sam December 26, 2008 17:35 

    Thanks for sharing the files and your color scheme is awesome. It is so comfortable on my poor eyes.

  3. Rana November 25, 2009 10:59 

    The link to git hub repository doesn't, do you have any other link where your "vimrc" is uploaded?

  4. yaar December 21, 2009 10:25 

    can't thank you enough!! :)
    I got a mac,
    I embraced your terminal IR_black theme (lovin it!), and also wanted it for my vim,
    I didn't have a ~/.vim dir nor the .vimrc and .gvimrc files at all, so I just created it all and copied your settings from the repository you gave above, again lots of thanks.
    I got one question, after doing this all, I'm getting this warning when opening vim:
    "
    Error detected while processing /Users/<myusername>/.vimrc:
    line 100:
    E28: No such highlight group name: LongLineWarning
    "
    how can I fix it?
    (assuming I want this line length formatting warning to be set)

  5. Olmo Maldonado December 26, 2009 20:47 

    @yaar. You'll need to have it defined in the ir_*.vim files inside of etc/colors folder.

    I did the following (which works):

    mkdir ~/sources; cd ~/sources;
    git checkout git://github.com/twerth/dotfiles.git
    cd ..
    ln -s ~/sources/dotfiles/etc/vim ~/.vim/
    ln -s ~/.vim/vimrc ~/.vimrc
    ln -s ~/.vim/gvimrc ~/.gvimrc

  6. jurlan January 10, 2010 09:19 

    @Olmo

    I am having the same problem as yaar.
    Your solution seems perfectly logic, but I'm stuck at the git part
    I installed git-core through sudo port install git-core
    but when I run git checkout git://github.com/twerth/dotfiles.git it tells me:
    fatal: Not a git repository (or any of the parent directories): .git
    so I run git init in the ~/sources dir, run the checkout commang again and then it tells me:
    error: pathspec 'git:/github.com/twerth/dotfiles.git' did not match any file(s) known to git.

    Thanks in advance for helping me out here.

  7. Nicolas March 03, 2010 15:35 

    @jurlan

    try : git clone git://github.com/twerth/dotfiles.git
    it should work.

  8. Matt March 27, 2010 23:41 

    Does anyone have a good tutorial on changing the shell colors in ubuntu? I love this color scheme but really prefer working in the shell as opposed to gvim.

    Thanks!

  9. Matt March 28, 2010 00:36 

    Does anyone have a good tutorial on changing the shell colors in ubuntu? I love this color scheme but really prefer working in the shell as opposed to gvim.

    Thanks!

  10. Matt March 28, 2010 01:29 

    Does anyone have a good tutorial on changing the shell colors in ubuntu? I love this color scheme but really prefer working in the shell as opposed to gvim.

    Thanks!

  11. Matt March 28, 2010 01:35 

    Geezus, sorry about the crazy multi-post. Also, should have done my research earlier, as I found your article on editing .bashrc! Thanks a bunch.

  12. ed May 17, 2010 23:20 

    This is a really slick theme. Loving it :)

  13. V October 25, 2010 12:46 

    'syntax on' in .vimrc, that's the trick! Finally, I can edit stuff from command line on my Mac.

    Thank you, so very much!!!!

  14. DrLaban November 06, 2010 14:25 

    I'm using vim through Windows 7 and Putty and I'm getting a bit of a problem when I'm trying to paste text into vim's buffer from the windows clipboard.
    Every single new line gets indented +1 for each row, which makes pasting a lot of lines a literal hell.
    Just an example would be pasting three lines of text and get this result;
    1: Line one
    2: __Line two
    3: ____Line three
    and so on. I'm guessing this could be a setting within vimrc but I'm not sure. I know I didn't have this issue when I used "vanilla" vim, without an additional vimrc.
    Anyone know of a cure?

  15. Todd Werth November 07, 2010 10:25 

    DrLaban, this is correct in Vim, it's because of your auto indentation settings. Set paste mode first, then paste:

    :set paste

    Meaning:
    <:>set paste<enter>

    Then paste from your OS.

Comments are closed for this article.
Feel free to contact me on twitter if you have any questions or comments: @twerth.