It is currently in UE v21.10 not possible to define a tab stop / indent / word wrap /auto-complete file configuration based on file name instead of file extension.
Workaround solution 1:
Default is used for
Makefile and other files without extension. And 1 or more separate configuration(s) is(are) defined for all files usually edited with an extension, see
file extension based word wrap, tab and indent settings. The disadvantage of this solution is that a horizontal tab character is inserted into a new file on hitting key TAB as long as the new file is not saved with a file name and extension. And of course all 20+ file extensions of the files usually edited in UltraEdit must be added to one or more list items in the
Word Wrap/Tab Settings configuration dialog.
Workaround solution 2:
An UltraEdit macro is created and saved into a macro file which is defined next to be executed on every file save at
Macro - Set Macro for File Loade/Save. The macro executed on save converts multiple (leading) spaces to tabs before save, but only for files with name
Makefile (not case-sensitive). The code for such a macro could be for example
Code: Select all
IfNameIs "makefile"
SpacesToTabs
EndIf
The command
SpacesToTabs is the same as
Format - Spaces to Tabs (Leading) which I think is the right command here as tabs are used in
Makefiles only for indentation.
The disadvantage of this solution is that the macro is not executed by UltraEdit on
Save As, only on
Save.