This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb-7.1 release preparation...
- From: Jonas Maebe <jonas dot maebe at elis dot ugent dot be>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: gdb at sourceware dot org
- Date: Thu, 11 Mar 2010 20:46:01 +0100
- Subject: Re: gdb-7.1 release preparation...
- References: <20100309181021.GI15364@adacore.com> <000301cac053$7a024c70$6e06e550$@muller@ics-cnrs.unistra.fr>
On 10 Mar 2010, at 14:13, Pierre Muller wrote:
> I recently found out a nasty bug in the pascal
> expression support:
> http://sourceware.org/ml/gdb-patches/2010-03/msg00314.html
I noticed that in that thread you were looking for GNU-style indentation in vim. I don't remember where I found the following (googling suggests http://thisblog.runsfreesoftware.com/?q=node/432), but it works fine for me. Just add it to your .vimrc and GNU-style indentation will be enabled by default when editing C and C++ files.
function! GnuIndent()
setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1
setlocal shiftwidth=2
setlocal tabstop=8
endfunction
au FileType c,cpp call GnuIndent()
To re-indent existing code in vim, go to the first line of the code, press V, move to the last line and then press =
Jonas