Tapatalk

How to set multiple tabs for specific file extension?

How to set multiple tabs for specific file extension?

2
NewbieNewbie
2

PostJun 19, 2007#1

Hello.
I have a problem setting TAB stop for specific file extension.
I have set for default settings TAB stop at every 2 characters (and the same for indentation) and tabs are replaced by spaces.

For python source files I want to set TAB stop at every 4 character.
I put new extension ".py" (without double quotes!) into extension list and chose it. After, I put 4 into TAB stop text box (and the same for indentation). Also, I have set to replace tabs with spaces.

But these settings do not work :( . I always got default setting (2 spaces instead of 4).

I read help file many times to see where I goes wrong but I put all settings as described.

Can anybody help me, please to distinguish different settings for python file and all others.

Thanks in advance
Andreo

29
Basic UserBasic User
29

PostJun 19, 2007#2

Enter the extension without the period in front of it: "py" (without the quotes).

2
NewbieNewbie
2

PostJun 20, 2007#3

Thanks scallanh for reply.
But this is just one part of the problem. Now UE recognize right file name extension, but multiple TABs still didn't work.
I put an example.
For cobol files (extension is cbl) I put into TAB stop text box

Code: Select all

7,5,2
to stop tab in 7th column, 5th column and every 2nd column further.
After UE restart UE just use first number (7) for every TAB stop. Also, in text box appears numbers entered with comma and a space between numbers (in documentation is written that must be separated just with comma).

Where I'm doing wong?

Thanks in advance
Andreo

6,823625
Grand MasterGrand Master
6,823625

PostJun 21, 2007#4

The space between the comma and the next tab stop value is optional and just for better reading. I did following step by step in the Word Wrap/Tab Settings dialog:
  • Clicked on button Change List....
  • Entered py in the edit field, pressed button Add and closed the dialog with button OK.
    Do not enter .py as the dot would be wrong. There can be multiple space separated file extensions entered without a dot for which all the settings below the list item are applied.
  • Selected in the drop down list the entry py.
  • Entered in the Tab Stop Value edit field 7,5,2.
  • Saved the new settings by closing the configuration dialog with button OK.
This added following into uedit32.ini at group [Settings]:

Auto Complete File2=
File Extensions2=py
Force OEM2=0
Indent2=8
InputConvert2=0
TabStops2=28, 20, 8
UseSpaces2=0

If I now press the key TAB on a file with extension py being loaded, the first tab stops the cursor at column 8 as indicated by Col. 8 in the status bar of the UltraEdit window.

Second tab stops cursor at column 13, third at column 15, fourth at column 17, 19, 21, …

So it works perfect.

What version of UltraEdit do you use? I have tested it with UE v11.20b.