summaryrefslogtreecommitdiff
path: root/src/cmd/5g/gsubr.c
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2009-12-02 16:57:15 -0800
committerRobert Griesemer <gri@golang.org>2009-12-02 16:57:15 -0800
commit4e9883e6a66afdc7b79cad82f8f615b6ce93e53f (patch)
tree0f8f0671be8fe67b048233cf84516b6e2918817f /src/cmd/5g/gsubr.c
parentd1342b103e87acb0c1a57cb56996216b7c730989 (diff)
downloadgolang-4e9883e6a66afdc7b79cad82f8f615b6ce93e53f.tar.gz
Add flag -tabindent to gofmt: forces use of
tabs for indentation even if -spaces is set. Changes to gofmt: - added -tabindent flag - don't recompute parser and printer mode repeatedly Changes to go/printer: - provide new printing mode TabIndent Changes to tabwriter: - implement new mode TabIndent to use tabs independent of the actual padding character for leading empty columns - distinguish between minimal cell width and tab width (tabwidth is only used if the output contains tabs, minwidth and padding are always considered) - fixed and added more comments - some additional factoring By default, -tabindent is disabled and the default gofmt behavior is unchanged. By setting -spaces and -tabindent, gofmt will use tabs for indentation but do any other alignment with spaces. This permits a user to change the visible indentation by simply changing the editor's tab width and the code will remain properly aligned without the need to rerun gofmt. R=rsc http://codereview.appspot.com/163068
Diffstat (limited to 'src/cmd/5g/gsubr.c')
0 files changed, 0 insertions, 0 deletions