How to set multiple tabs for specific file extension?

General and specific configuration/INI settings

How to set multiple tabs for specific file extension?

Postby Andreo29 » Tue Jun 19, 2007 8:18 am

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
User avatar
Andreo29
Newbie
 
Posts: 2
Joined: Mon Jun 18, 2007 11:00 pm

Re: How to set multiple tabs for specific file extension?

Postby scallanh » Tue Jun 19, 2007 5:47 pm

Enter the extension without the period in front of it: "py" (without the quotes).
User avatar
scallanh
Basic User
Basic User
 
Posts: 31
Joined: Mon Oct 24, 2005 11:00 pm

Re: How to set multiple tabs for specific file extension?

Postby Andreo29 » Wed Jun 20, 2007 6:54 pm

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
User avatar
Andreo29
Newbie
 
Posts: 2
Joined: Mon Jun 18, 2007 11:00 pm

Re: How to set multiple tabs for specific file extension?

Postby Mofi » Thu Jun 21, 2007 7:32 am

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:

  1. Clicked on button Change List....
  2. Entered py in the edit field, pressed button Add and closed the dialog with button OK.
  3. Selected in the drop down list the entry py.
  4. Entered in the Tab Stop Value edit field 7,5,2.
  5. 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

When I now press the tab key when a file with extension py is loaded the first tab stops the cursor at column 8 (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.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4051
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Configuration/INI Settings