Page 1 of 1
TAB key move less than tab stop
Posted: Fri Apr 08, 2011 3:01 pm
by kn
For compatibility of formatting with a large body of existing documents, I have to set the tab stops to 8. However, I would rather move only 4 characters each time that I press the TAB key, but can't see a way to set that. I have "Indent" set to 4 and that works to increase or decrease the indentation of a block, but does not affect the TAB key.
Not a big deal, but I had this setting in EditPlus. However, I had to switch to TextPad because it was better able to handle remote files accessed via Samba than EditPlus.
Thanks.
Posted: Fri Apr 08, 2011 4:22 pm
by ak47wong
Click View > Document Properties > Tabulation.
Is this where you're changing the Indent size setting? Doesn't changing Default tab spacing do what you want?
(You can change these by default in Configure > Preferences under Document Classes).
Posted: Sun Apr 10, 2011 11:48 am
by kn
Yes, those are the two places I change the settings.
Default tab spacing is set to 8, Indent size is set to 4, convert new tabs to spaces is checked, but convert existing tabs is not checked.
There seem to be three actions controlled by only two tab size settings.
The layout of an existing document with tabs in it seems controlled by Default tab spacing = 8. I need this so documents look the same for me as for other members of my programming group.
The amount that a block of text is moved left or right seems controlled by Indent size = 4. This is fine.
But there is no separate setting for how far the cursor should move each time the TAB key is pressed. I would prefer 4 spaces with each press of TAB but it actually moves to the tab stops that are set every 8 as controlled by the Default tab spacing = 8.
Posted: Mon Apr 11, 2011 8:40 am
by MudGuard
The tab key usually is for inserting a tab, but you want to "indent more".
Maybe you want to set the keyboard shortcut for EditIndentMore to be the tab key ...
Posted: Mon Apr 11, 2011 1:23 pm
by kn
MudGuard wrote:The tab key usually is for inserting a tab, but you want to "indent more".
Maybe you want to set the keyboard shortcut for EditIndentMore to be the tab key ...
Thanks for the idea. EditIndentMore is not the command I'm looking for, but maybe there is one that I can assign to to the TAB key that would do the trick.
I simply want the TAB key to move the cursor 4 characters at a time to the right (not move the entire block of text as EditIndentMore would do). This would be easy if I could set the Default Tab Stops to 4, but I have thousands of COBOL docs that were created with tab stops set at 8, so I am forced to use that value to keep the proper formatting. I don't even want to insert a TAB character (I convert them to spaces).
Posted: Mon Apr 11, 2011 2:42 pm
by ben_josephs
Can you set the tab width to 8, convert the tabs to spaces, then set the tab width to 4?
Posted: Mon Apr 11, 2011 5:46 pm
by kn
ben_josephs wrote:Can you set the tab width to 8, convert the tabs to spaces, then set the tab width to 4?
Yes, I believe that would work but it might also make my fellow programmers and our source control system very unhappy by leading them to think that nearly every line in any program that I work on has been changed.
Posted: Mon Apr 11, 2011 6:17 pm
by ben_josephs
I know that problem.
Come the revolution, tabs in source files will be forbidden.
Posted: Mon Apr 11, 2011 8:11 pm
by kn
ben_josephs wrote:I know that problem.
Come the revolution, tabs in source files will be forbidden.
Right on, brother.