On 16-01-14 10:13 AM, Myles Braithwaite wrote:
I'm really interested in other people's setup so could we start a thread of people sharing their ~/.vimrc file.
Here is mine: <https://github.com/myles/dotfiles/blob/master/vimrc>.
Wow, that is a long list of stuff in that file. Mine hardly has anything by comparison. I use the following to automatically fix whitespace and de-tabify when editing various source code files. :autocmd BufEnter *.c,*.h,*.cpp,*.php,*.cs set comments=sl:/*,mb:**,elx:* :autocmd BufEnter *.c,*.h,*.cpp,*.php,*.cs,*.py set sts=4 expandtab ts=4 sw=4 :autocmd BufWritePre *.c,*.h,*.cpp,*.php,*.cs,*.py :%s/\s\+$//e :autocmd BufWritePre *.c,*.h,*.cpp,*.php,*.cs,*.py :retab :autocmd BufEnter *.pl,*.py set sts=4 expandtab ts=4 sw=4 :autocmd BufWritePre *.pl,*.py :%s/\s\+$//e :autocmd BufWritePre *.pl,*.py :retab :autocmd BufEnter *.scm set sts=2 expandtab ts=2 sw=2 :autocmd BufWritePre *.scm :%s/\s\+$//e :autocmd BufWritePre *.scm :retab -- Cheers! Kevin. http://www.ve3syb.ca/ |"Nerds make the shiny things that distract Owner of Elecraft K2 #2172 | the mouth-breathers, and that's why we're | powerful!" #include <disclaimer/favourite> | --Chris Hardwick