Tips for vim users

n0dalus n0dalus+wine at gmail.com
Mon Sep 25 04:47:18 CDT 2006


Hi,

Recently I learned a way to have vim automatically change settings
when I'm editing wine source code:

At the bottom of my ~/.vimrc (create it if it doesn't exist):
if !exists("loaded_vimrc_autocmd")
    let loaded_vimrc_autocmd=1
    autocmd BufNewFile,BufRead /data/wine/* set expandtab tabstop=8
softtabstop=4
endif

In my case my wine tree is in /data/wine, so replace this with the
first part of the path to your wine tree. Using the same syntax you
can also put custom settings for other projects you might work on.

This is helpful for me since I usually like to indent using tabs and a
4 space tab width, but now I can edit most of wine's code without
having to worry about fixing my indents all the time.

If anyone is interested, I've also got another Vim tip on the wiki
(from last year), to automate the creation of wide character arrays:
http://wiki.winehq.org/Character_arrays_in_Vim

If any other vim users have tips that help out with wine coding, I'd
love to hear them!

Maybe we can make a page on the wiki for them.

n0dalus.



More information about the wine-devel mailing list