|
From: Gilles D. <gr...@sc...> - 2002-08-07 15:24:33
|
According to Gabriele Bartolini: > P.S.: Do you have any suggestion for configuring vi in a good way, as > far as indenting code is concerned? I realize that my code is sometimes > messy. The main thing is to set tabstop=8 because that's how tab characters are viewed on most UNIX-like systems by default. Beyond that is more a matter of taste. I tend to do my indenting manually, tabbing as many times as needed and then adding 4 spaces for a half-indent when that's the level of indentation called for. Setting shiftwidth=4 might help if you use the indent and unindent commands ">>" and "<<". Also, if you like autoindent, then you can set that to preserve indentation from line to line. The thing to avoid is just holding down the space bar until the indentation "feels about right", as that's not going to give you indentation that's consistent with the style of the current code. -- Gilles R. Detillieux E-mail: <gr...@sc...> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/ Dept. Physiology, U. of Manitoba Winnipeg, MB R3E 3J7 (Canada) |