|
|
Le 10/03/2014 20:42, Bald Eagle nous fit lire :
> ... and the subject was intended to read just like THAT! :D
>
> Anyway,
> I have a small (~500 line) file that I keep having issues with after
> editing, where I either have an extra, or a missing curly brace.
>
> I'd like some tips and tricks on organizing and visually keeping track
> of my SDL code, and maybe even some clever thingsd embedded in the code
> to help locate where the offending error resides.
what editor are you using ?
Some have the capability to:
1. find the matching braces
2. indent the code according to braces
For instance, with vi/vim/gvim, one basic trick is: all opening &
closing curly are alone on their own line. Indenting is just a matter of
moving to one curly brace and press =% (just two keys: = then % )
and everything inside the block get indented (to the amount of sw, so
':set sw=2' for an indent of 2 spaces)
Post a reply to this message
|
|