Sublime Text
Sublime Text Configuration
Sublime Text is awesome. With Terminus and a good theme, it’s a very good text editor. Yes, VS Code has terminal built in but everybody knows that liking is wholly based on subjective parameters and we should just focus our logic inside the functions you make.
Adding Terminal To Sublime Text
Now, to add a terminal to Sublime Text, install Terminus package1.
-
<Ctrl>
+<Shift>
+<P>
to open the command palette. - Install Package Control.
- Install Terminus.
- Restart Sublime Text.
- Paste and save the following code to
Preferences
>Package Settings
>Terminus
>Command Palette
:[ { "caption": "Terminal (panel)", "command": "terminus_open", "args" : { "cmd": "bash", "cwd": "${file_path:${folder}}", "title": "Command Prompt", "panel_name": "Terminus" } }, ]
Configuring A Hotkey for Terminus
- To set
Alt + 1
to activate the terminal, paste and save the code below toPreferences
>Package Settings
>Terminus
>Key Bindings
:[ { "keys": ["alt+1"], "command": "terminus_open", "args" : { "cmd": "bash", "cwd": "${file_path:${folder}}", "panel_name": "Terminus" } } ]
Using the hotkey also works like
clear
in addition to invoking the terminal inside subl. At least, that’s how I think about it.
Launching Sublime Text via Terminal
In Linux, this is done just by using subl
2. If this is not the behavior by default, enter the command below in the terminal:
sudo ln -s /opt/sublime_text/sublime_text /usr/local/bin/subl
Sublime Text Preference Settings
{
"theme": "Adaptive.sublime-theme",
"font_size": 10,
"font_face": "Jetbrains Mono",
"save_on_focus_lost": true,
"highlight_line": true,
"caret_style": "phase",
"ignored_packages":
[],
}
Random Notes Dumpster
Toggle focus between terminal and editor. Check this issue out: https://github.com/randy3k/Terminus/issues/302#issuecomment-1137223130
Just use ctrl + \
to switch focus to editor, and
alt + 1` for switching focus to terminal.