Delphi editor. Tabs instead Spaces - delphi

I use Delphi 5 and I have one interesting question...
If you press Enter key when cursor is at the string's end Delphi IDE automatically aligns cursor position at the new line to the first word at the previous line.
But space between begin of new line and cursor position will be filled with SPACE chars.
How to change this behaviour? I want some amount of TAB characters from begin of new line to the cursor position, as notepad++ do that.
Thanks

Under Environment Options → Editor:
There are some options you should check:
Use tab character. Inserts tab characters when you press TAB in the Code Editor. If not checked, pressing TAB inserts spaces. To view tab characters, select Show tab character.
Smart tab. Tabs to the first non-whitespace character in the preceding line.

Related

Tab replaced to space automatically in Delphi11

I'm using delphi 11.0(28.0.42600.6491).
Typing some tabs in code editor, and after a short pause, typing any character.
Then, I found tabs are replaced to space automatically.
And it seems to be happened when input character after already exists line.
My problem is like GIF image(animated).
I don't want that. tabs must be tabs strictly.
Is there any setting or way to do that?
The IDE Settings "Use tab character" and "Keep trailing blanks". Note you would also need to uncheck "Cursor through tabs" to see the cursor jump otherwise it will go space by space through tabs.
The "Keep trailing blanks" setting is really "Keep trailing whitespace" and deletes any tabs and spaces at the end of lines after a short delay. The cursor stays past the end of the line so if you type something it then puts in spaces.
This is a bug (in my opinion) that started in 10.4. I have reported it as RSP-36776: https://quality.embarcadero.com/browse/RSP-36776

How to change TAB to SPACEs and set their amount in Brackets editor?

I'm using Brackets editor http://brackets.io/ and I'd like to change behavior when I click TAB key it will put 4 SPACEs instead and also I'd like to change amount of spaces added.
Is it possible to do this adjustment?
In the lower right corner of the editor, you'll see text saying Spaces: 4 or the like.
You can click Spaces (or Tab) to toggle between those and click the number to change it.

How to add a space in front of every line in notepad

I have a list of data in notepad and want to insert a space in the beginning of each line.
Example
This is how it looks in the notepad now
Number
"123"
"123"
"124"
"126"
"147"
I want it to look like below
Number
"123"
"123"
"124"
"126"
"147"
I am sure there is some short cut. Please advice.
Open your file in Notepad++
Press Ctrl+H to open the Replace window.
Change the "Search Mode" to Regular expression.
In the "Find what" box, type (\n|^)
In the "Replace with" box, type \1     (with your spaces or tab at the end)
Then click "Replace All"
Note: If you want tabs instead of spaces, a tab character can be typed with Alt+09
Press Alt and select the line no. move curser till the line no you want to have space . Now you can enter spaces as many you want or anything and save it.

Delphi XE7: disable virtual text space

is it possible to disable the annoying virtual space in editor?
If I click somewhere right on a line (behind last character) I want to get the cursor just behind the last character. Similary, if I am at the end of a line (just after the last char) and push right arrow I want to jump the next line before the first character.
Lot of thanks!

Delphi IDE shortcut for splitting a long string

I'm using Delphi XE2. I have a really long string (580 characters) pasted into the IDE. I want to split the string so that it stays within the right margins and has the proper closing tick mark and plus sign. Is there a keyboard shortcut that will do that?
The shift + Enter shortcut allows me to do if I am typing the string but it doesn't split a string that is already on the screen.
Delphi XE2 has the ability to record Macros and play them back in your source editor. The controls are in the bottom-left, play, record, and stop.
If not already, move your string down to the next line (as in my screenshot)
Start with your cursor at the beginning of the string, after the '
Press the Record Macro button (Red circle)
Press the Right keyboard arrow key up to 2 chars before desired width
Type ' to terminate the string
Type + to continue on the next line
Press Enter to insert a line break
Type ' to begin a new string
By now you should be 1 position directly underneath where you started
Press the Stop Recording Macro button (Green square)
Press the Playback Macro button (Green triangle)
Continue pressing play until all is complete
SHIFT+ENTER only works like you want when the cursor is at the end of a line with an unclosed string literal. There is no shortcut to split a literal (with quotes and spacing) when the cursor is at the beginning or middle of it. You will have to find a third-party editor add-on that formats long string literals the way you want.
You can press "CTRL+D".... and configure it in Tools->Options->Formatter

Resources