This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb-7.1 release preparation...


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]