ai-karanam / leptonica

Automatically exported from code.google.com/p/leptonica
0 stars 0 forks source link

Tabs & spaces in source files #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. View any source file.

What is the expected output? What do you see instead?
I expect source code to be consistently indented.
I see the correct indentation as long as the VS2008 tab settings are set as
described below.

What version of the product are you using? On what operating system?
leptonlib-1.63.
Microsoft Visual Studio 2008 SP1 with latest updates also applied.
Windows XP Pro SP3.

Please provide any additional information below.
I gather that you assume people have tabs set to 8 spaces, indent size is 4
spaces, and that indenting inserts spaces (not just tabs)?

In VS2008notes.htm I should add a section on setting the correct tab
settings for viewing Leptonica source files:

Tools > Options | Text Editor | C/C++ | Tabs

 Tab Size: 8
 Indent Size: 4
 [x] Insert Spaces
 [ ] Keep Tabs

rather than say:

 Tab Size: 4
 Indent Size: 4
 [ ] Insert Spaces
 [x] Keep Tabs

Original issue reported on code.google.com by tomp2...@gmail.com on 4 Dec 2009 at 8:16

GoogleCodeExporter commented 9 years ago
Yes, that is correct.  

It's better to insert spaces rather than tabs, so that the
file appearance is independent of the tab setting in the editor.

Because we don't use tabs in files, setting the tab size
to 4 is only a matter of convenience when editing.  I find
that I don't use tabs at all.

Original comment by dan.bloo...@gmail.com on 6 Dec 2009 at 8:13