Text editors for writing code (and text)
Contents
Text editors for writing code (and text)¶
Following a short list of text editors for different purposes. Of course you can use any other editor as well.
Atom – A hackable text editor for the 21st Century
Brackets – A modern, open source code editor that understands web design (First community release in November 21)
Kate – Get an Edge in Editing
Sublime Text – Text Editing, Done Right
TextMate – Text editor for macOS
Typora – a markdown editor, markdown reader
Visual Studio Code – Code Editing. Redefined
Against monopolism and the current trend we’ll not work with VSC, instead with Sublime. (Next time it could be Kate.)
Sublime hints¶
Goto¶
Open Goto via Ctrl + p
Search for files, press enter for a file to open it.
Go to a line inside a file:
Open Goto via Ctrl + p
, enter :
followed by a line number
Go to a symbol inside a file:
Open Goto via Ctrl + p
, enter @
followed by a query
Combine queries:
Example query: index@body
Command Palette¶
Ctrl + Shift + P
opens the Command Palette. This can be used to work with packages, to change settings, to rename the file etc.
Key Combinations¶
Ctrl + Shift + Arrow Up/Down
= Move the current line up or down
Ctrl + l
= Select the current line. Further l
s will append more lines.
Ctrl + d
= Select the current word. Further d
s will append more instances of the same word.
Ctrl + Shift + k
= Delete current line
Preferences¶
Open settings via Ctrl + Shift + P
and type pref..
{
// Set to true to automatically save files when switching to a different file
// or application
"save_on_focus_lost": true,
}
Extending Sublime¶
Install Package Control¶
In Sublime: Tools
> Install Package Control
This allows you to install packages inside Sublime in general:
Ctrl + P
> Package Control: Install Package
Install LiveReload in Sublime¶
Via Package Control install the package LiveReload. Follow the steps below or watch this video on YouTube (in french).
Type Ctrl + P
. A search bar opens, type and select Package Control: Install Package
A new search bar opens where you search for
LiveReload
and click on it/ select press enter.
This will install the package. Then go to
Preferences -> Package Settings -> LiveReload -> Plugins -> Enable/ disable plugins
.
A new search bar with the message LiveReload: Enable/ disable plugins
appears. Hit Enter.
Then select Enable - Simple Reload
and press Enter again.
You can do the same with the search function of Ctrl + P
.
Install LiveReload in your browser¶
Next you have to install an extension in your browser.
LibreWolf/ Firefox: https://addons.mozilla.org/en-US/firefox/addon/livereload-web-extension/
Chrome extension on the Chrome Web Store — if you want to use it with local files, be sure to enable “Allow access to file URLs” checkbox in Tools > Extensions > LiveReload after installation.
Install »View in Browser« to launch your page from Sublime (optional)¶
If you wan’t to open your browser directly from within Sublime, you’ll need another Sublime extension for that:
Open the Preferences
menu
Click Package Control
A search bar opens where you type:
Package Control: Install Package
A new search bar opens where you search for
View In Browser
and click on it.
This will install the package, you can find it under
Preferences -> Package Settings -> View In Browser
.
To run it, press inside your .html
file ctrl+alt+v
.