c++ - Tool or script to set the align rules for my code or vim editor -


i want align declarations of variables, object doesnt matter in code.

eg.

int i; for(...){...} short j; 

instead of me going , aligning declarations of , j, can restrict variable declaration should start @ particular column number in vim. if planning declare variable, should go , start respective column.

it sounds you're looking correctly indent code, not move variable declarations particular column. can done natively = command, indent given lines (unless equalprg option set). example, indent lines in file, use:

gg=g 

which move top of file, indent lines until bottom of file. indentation in vim more complex this, supports autoindent, tabstops, shiftwidth, different indenting rules different file types, etc. details, see vim wiki.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -