Tapatalk

How to automatically add a semicolon to the end of each line?

How to automatically add a semicolon to the end of each line?

1

PostJan 19, 2025#1

Hi.

I am using UEStudio 64-bit 2024.2.0.39, which I believe is the latest version.

Can UES automatically insert a semicolon at the end of each line when coding in C# or Java?

Or is it possible to make it so that pressing Shift+Enter inserts a semicolon and then creates a new line?

Thank you.

6,824625
Grand MasterGrand Master
6,824625

PostJan 19, 2025#2

There is no configuration setting that instructs UEStudio inserting automatically a semicolon at every end of a line which would be even for C# and Java source code files often incorrect.

It is of course possible to write a macro with following code:

Code: Select all

IfExtIs "cs"
InsertMode
ColumnModeOff
";
"
ExitMacro
EndIf
IfExtIs "jav"
InsertMode
ColumnModeOff
";
"
ExitMacro
EndIf
IfExtIs "java"
InsertMode
ColumnModeOff
";
"
ExitMacro
EndIf
There could be added two more lines just with a double quote character to insert on all other files just the newline character(s) according to line ending type of active file without or with automatically inserted indent tabs/spaces.

The three macro properties Show cancel dialog for this macro, Continue if search string not found and Disable screen refresh during macro playback should be not checked for this macro. The hotkey should be Shift + RETURN. This macro should be stored together with other often needed macros in a macro file which is configured to be automatically loaded on startup of UEStudio.
  • In ribbon mode click on last ribbon tab Advanced in third group Macro on the small down arrow symbol right to the item Configure and click next in the opened popup menu on the menu item Macro settings or Set macro for auto-load on using an older version of UEStudio.
  • In toolbar/menu mode with contemporary menus click in menu Advanced in submenu Configure on the menu item Macro settings or Set macro for auto-load on using an older version of UEStudio.
  • In toolbar/menu mode with traditional menus click in menu Macro on the menu item Set macro for file load/save… or Set auto load… on using an older version of UEStudio.
In the opened dialog window Macro Settings click in the second group Load macro on application start on the button Browse and select the macro file which contains the often used macro(s) and then click on button Save.

On using an older version of UEStudio click in the opened dialog window Set Macro Auto Load on Startup on the Browse button and select the macro file which contains the often used macro(s) and then click on button Set.