-
-
Notifications
You must be signed in to change notification settings - Fork 1
Using Markers
A marker in TKE is an easy way to remember line positions within an editor. Once created, you can quickly and easily jump to a marker via the "Find / Markers" menu item. Selecting a marker from the menu will instantly change the current editor tab to the one containing the marker, make the marked line visible in the editor and place the insertion cursor at the beginning of the marked line. This feature is an awesome way to quickly jump to a given line at any point while editing other files or while editing different text in the same file.
Let’s start by learning how to create a marker in the editor below for line 45.
Start by right-clicking on the line number gutter at line 45. Alternatively, you can use the "Create at Current Line" menu option in the "Find / Markers" dropdown menu or create a menu binding for this menu item to create a shortcut for setting a marker.
This will make the line number gutter on line 45 turn an orange color. Any line numbers marked with orange are markers.
After the line number has been clicked, an entry field will be displayed at the bottom of the window to allow you to create a custom name for the marker. To use a default name, simply click the RETURN key; otherwise, enter a custom name and then hit the RETURN key. To cancel creating the marker, hit the ESCAPE key.
For demonstration purposes, we will set the marker name to be "preload" and then hit the RETURN key to set the marker to the given name.
To use the newly created marker, go to the "File / Markers" dropdown menu and select the "preload" marker in the given list. The editor containing the marker will jump to display line 45 and the insertion cursor will be placed at the beginning of the line. That’s it — quick and simple!
To remove a marker from the editor, simply right click on the marker in the line number gutter. The line color will switch back to the standard color to indicate that the marker no longer exists.
If you are using Vim mode, you can quickly create a marker for the current line by using the following Vim command:
:m <marker name>
To remove a marker at the current line, use the Vim command:
:m
You can use marker names anywhere in Vim commands that allow line numbers. For example, to jump to our "preload" marker, simply enter the Vim command:
:preload
To delete all lines between the beginning of the file and the marker, inclusive, enter the Vim command:
:0,preloadd