Difference between revisions of "IDE Window: Editor Options General Misc"

From Lazarus wiki
Jump to navigationJump to search
(Excuded redirect, deleted underscores (it is bad for search))
(Add missing image; add linked menu navigation breadcrumbs; update menu items and descriptions)
Line 1: Line 1:
 
<noinclude>{{IDE Window: Editor Options General Misc}}</noinclude>
 
<noinclude>{{IDE Window: Editor Options General Misc}}</noinclude>
  
<u><b>This is part of the online help for the IDE. </b></u><br/>
+
== Navigation ==
It describes the section: "Editor" / "General" / "Misc". You can open the described dialog in your IDE via:<br/>
 
*The menu: "Tools" => "Options" / Editor options ...
 
*The source-editor pop-up menu: "Editor properties ...
 
  
<font size="+1"><u><b>Navigation</b></u></font><br/>
+
This dialog can be reached from the Lazarus IDE [[Main menu|Main Menu]] > [[Main menu#Tools|Tools]] > [[IDE Window: IDE Options Dialog|Options]] > [[IDE Window: Editor Options|Editor]] > [[IDE Window: Editor Options General|General]] > Miscellaneous and from the source editor popup context menu "Options...".
<table><tr><td>
 
*<font size="+1">[[IDE Window: Editor Options|Editor Options]]</font> Overview of all Editor Options
 
</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td><td>
 
*<font size="+1">[[IDE Window: IDE Options Dialog|IDE Options]]</font> Overview of all options for the IDE</td>
 
</tr></table>
 
  
----
+
== Miscellaneous Options ==
=Misc Options=
 
  
=== Show special characters ===
+
[[Image:EditorOptionsGenlMisc_2_0_10.jpg|right]]
Spaces are shown as dots and invalid characters as question marks.
 
  
=== Copy word on copy none ===
+
* '''Show special characters''': Spaces are shown as dots and invalid characters as question marks.
If nothing is selected and user presses Copy (Ctrl-C), the editor selects the word and copy that. Same for cutting.
 
  
=== Trim trailing spaces ===
+
* '''Copy current word when no selection exists''': If nothing is selected and user presses Copy ({{keypress|CTRL|C}}), the editor selects the nearest word on the same line as the cursor and copies that. The same applies if nothing is selected when the user presses Cut ({{keypress|CTRL|X}}).
Spaces at the end of lines will be trimmed and not saved. This applies only to edited lines.
+
 
==== Trim spaces style ====
+
* '''Trim trailing spaces''': Spaces at the end of lines will be trimmed and not saved. This applies only to edited lines.
Defines how aggressive spaces are trimmed. SynEdit allows to enter "uncommitted" spaces at the end of line, so you can continue typing as usual. If SynEdit deems those spaces no longer needed it will trim them.
+
 
* Leave Line: This is the default, SynEdit will keep all spaces on the line where the caret is. If the caret moves to another lines, spaces are trimmed.
+
* '''Trim spaces style''': Defines how aggressively spaces are trimmed. The source editor allows the entering of "uncommitted" spaces at the end of line, so you can continue typing as usual. If the editor deems those spaces no longer needed it will trim them.
* Line Edited: In Addition to leaving the line Synedit will also remove any space on the right of the caret, if the line is edited. If you type spaces on the end of line, they will be left of the caret and not affected.
+
** '''Leave line''': This is the default, the editor will keep all spaces on the line where the caret is. If the caret moves to another lines, spaces are trimmed.
* Caret or Edit: This is the most aggressive mode, in addition to "Line Edited" it will also trim Spaces right to the caret, if you move horizontal (Caret-left at the end of line acts similar to backspace)
+
** '''Line Edited''': In Addition to leaving the line, the editor will also remove any space to the right of the caret, if the line is edited. If you type spaces on the end of the line, they will be to the left of the caret and not affected.
* Position Only: No spaces or tabs are inserted past the end of line. Only the caret is moved (and forced past EOL). If text is typed, the gap is always filled with spaces.
+
** '''Caret or Edit''': This is the most aggressive mode, in addition to "Line Edited" trimming, it will also trim spaces right to the caret, if you move horizontally (a caret-left at the end of line acts similarly to a backspace)
** This means tabs are lost (converted to space). Hence auto-indent "copy tabs" does not work in this mode
+
** '''Position Only''': No spaces or tabs are inserted past the end of line. Only the caret is moved (and forced past EOL). If text is typed, the gap is always filled with spaces.
** Because you are "past the EOL", smart unindent does neither work in this mode
+
*** This means tabs are lost (converted to space). As a result, auto-indent "copy tabs" does not work in this mode
 +
*** Because you are "past the EOL", smart unindent does not work in this mode
  
 
In any of those cases spaces you typed at the end of line will not be saved to a file. [[AboutTrimTrailingSpaces|Read more about trailing spaces]]
 
In any of those cases spaces you typed at the end of line will not be saved to a file. [[AboutTrimTrailingSpaces|Read more about trailing spaces]]
Line 37: Line 27:
 
You may want to look at "[[#End_key_jumps_to_nearest_start|End key jumps to nearest start]]". This allows you to keep spaces while editing, yet jump to the visible end of line.
 
You may want to look at "[[#End_key_jumps_to_nearest_start|End key jumps to nearest start]]". This allows you to keep spaces while editing, yet jump to the visible end of line.
  
=== Copy/Paste with fold info ===
+
'''Copy/Paste with fold info''': Copying/pasting text within the IDE will remember if text was folded when copied, and (if possible) restore the fold(s) when pasted.
copying/pasting text within the IDE will remember if text was folded when copied, and (if possible) restore the folds on paste.
 
  
=== Find text at cursor ===
+
'''Find text at cursor''': When invoking the [[Main menu|Main Menu]] > [[Main menu#Search|Search]] > Find dialog, fetch the word at the cursor and put it into the Find text field.
When invoking the 'Find' dialog, fetch the word at the cursor and put it into the Find field.
 
  
=== Source notebook tab position ===
+
'''IME handled by system''': ???
This specifies on which edge of the editor the notebook tabs will appear. '''NOTE: This is a widgetset specific setting.''' Under different widgetsets the behaviour is completely different.
 
  
=Options from older IDE versions that where moved=
+
== See also ==
  
=== Alt-Key sets column mode ===
+
* [[IDE Window: Editor Options|Editor Options]] - Overview of all Editor Options.
See the mouse configuration instead. [[IDE Window: Editor Options Mouse]]
 
  
=== Show close buttons in notebook ===
+
* [[IDE Window: IDE Options Dialog|IDE Options]] - Overview of all options for the IDE.
See [[IDE Window: Editor Options MultiWindow|Multi Window]]
 

Revision as of 13:28, 2 February 2021

English (en)

Navigation

This dialog can be reached from the Lazarus IDE Main Menu > Tools > Options > Editor > General > Miscellaneous and from the source editor popup context menu "Options...".

Miscellaneous Options

EditorOptionsGenlMisc 2 0 10.jpg
  • Show special characters: Spaces are shown as dots and invalid characters as question marks.
  • Copy current word when no selection exists: If nothing is selected and user presses Copy (CTRL+C), the editor selects the nearest word on the same line as the cursor and copies that. The same applies if nothing is selected when the user presses Cut (CTRL+X).
  • Trim trailing spaces: Spaces at the end of lines will be trimmed and not saved. This applies only to edited lines.
  • Trim spaces style: Defines how aggressively spaces are trimmed. The source editor allows the entering of "uncommitted" spaces at the end of line, so you can continue typing as usual. If the editor deems those spaces no longer needed it will trim them.
    • Leave line: This is the default, the editor will keep all spaces on the line where the caret is. If the caret moves to another lines, spaces are trimmed.
    • Line Edited: In Addition to leaving the line, the editor will also remove any space to the right of the caret, if the line is edited. If you type spaces on the end of the line, they will be to the left of the caret and not affected.
    • Caret or Edit: This is the most aggressive mode, in addition to "Line Edited" trimming, it will also trim spaces right to the caret, if you move horizontally (a caret-left at the end of line acts similarly to a backspace)
    • Position Only: No spaces or tabs are inserted past the end of line. Only the caret is moved (and forced past EOL). If text is typed, the gap is always filled with spaces.
      • This means tabs are lost (converted to space). As a result, auto-indent "copy tabs" does not work in this mode
      • Because you are "past the EOL", smart unindent does not work in this mode

In any of those cases spaces you typed at the end of line will not be saved to a file. Read more about trailing spaces

You may want to look at "End key jumps to nearest start". This allows you to keep spaces while editing, yet jump to the visible end of line.

Copy/Paste with fold info: Copying/pasting text within the IDE will remember if text was folded when copied, and (if possible) restore the fold(s) when pasted.

Find text at cursor: When invoking the Main Menu > Search > Find dialog, fetch the word at the cursor and put it into the Find text field.

IME handled by system: ???

See also