TAB key move less than tab stop

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
kn
Posts: 5
Joined: Fri Apr 08, 2011 2:46 pm

TAB key move less than tab stop

Post 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.
ak47wong
Posts: 703
Joined: Tue Aug 12, 2003 9:37 am
Location: Sydney, Australia

Post 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).
kn
Posts: 5
Joined: Fri Apr 08, 2011 2:46 pm

Post 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.
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post 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 ...
kn
Posts: 5
Joined: Fri Apr 08, 2011 2:46 pm

Post 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).
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Can you set the tab width to 8, convert the tabs to spaces, then set the tab width to 4?
kn
Posts: 5
Joined: Fri Apr 08, 2011 2:46 pm

Post 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.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

I know that problem. :-)

Come the revolution, tabs in source files will be forbidden.
kn
Posts: 5
Joined: Fri Apr 08, 2011 2:46 pm

Post by kn »

ben_josephs wrote:I know that problem. :-)

Come the revolution, tabs in source files will be forbidden.
Right on, brother.
Post Reply