Sublime Text

Syncing Sublime Keyboard Shortcuts between Devices

  • I use syncthing to synchronize my keyboard configuration between devices so as my workflow changes and grows I don’t have to repeat the same configuration procedures on multiple devices.

Linux

ln -s "/home/yuriy/Syncthing/Configurations/Sublime/Keymap/Default (Windows).sublime-keymap" "/home/yuriy/.config/sublime-text/Packages/User/Default (Linux).sublime-keymap"

Windows

mklink "C:\Users\yuriy\AppData\Roaming\Sublime Text\Packages\User\Default (Windows).sublime-keymap" "C:\Users\yuriy\Syncthing\Configurations\Sublime\Keymap\Default (Windows).sublime-keymap"

Syncing Sublime Session

Session data is saved in: C:\Users\yuriy.zinchuk\AppData\Roaming\Sublime Text\Local Can move it to Syncthing folder by creating a symlink:

# remove folder with: 
rd /S /Q "C:\Users\yuriy.zinchuk\AppData\Roaming\Sublime Text\Local"
# create symlink junction (Preferred)
mklink /J "C:\Users\yuriy.zinchuk\AppData\Roaming\Sublime Text\Local" "C:\Users\yuriy.zinchuk\Syncthing\Configurations\Sublime\Sublime_Local"
# create folder symbolic link (Less used, but works with network locations)
mklink /d "C:\Users\yuriy.zinchuk\AppData\Roaming\Sublime Text\Local" "C:\Users\yuriy.zinchuk\Syncthing\Configurations\Sublime\Sublime_Local"

Packages

  • Autohotkey
  • Sublime-path-tools
    • https://github.com/pjdietz/sublime-path-tools/blob/master/Context.sublime-menu
  • PowerShell

Useful Features

  • Control + D while word is selected, will highlight the next instance of the same word.
  • Copy/Paste while multiple individual items are selected, will paste the multiple items.

Customized Hotkeys

mklink "C:\Users\ity\AppData\Roaming\Sublime Text\Packages\User\Default (Windows).sublime-keymap" "C:\Users\ity\Syncthing\Configurations\Sublime\Keymap\Default (Windows).sublime-keymap"
[
    { "keys": ["ctrl+shift+w"], "command": "close_all" },
    { "keys": ["alt+r"], "command": "build" },
    { "keys": ["alt+1"], "command": "toggle_comment", "args": { "block": false } },
    { "keys": ["alt+c"], "command": "toggle_comment", "args": { "block": false } },
    { "keys": ["alt+2"], "command": "toggle_comment", "args": { "block": true } },
    { "keys": ["alt+d"], "command": "duplicate_line" },
    { "keys": ["ctrl+shift+s"], "command": "prompt_save_as" },
    { "keys": ["alt+shift+s"], "command": "toggle_side_bar" },
    { "keys": ["ctrl+s"], "command": "save" },
    { "keys": ["alt+t"], "command": "save" },
    { "keys": ["f13"], "command": "save" },
    { "keys": ["alt+q"], "command": "wrap_lines" },
    { "keys": ["ctrl+alt+w"], "command": "close" },
    { "keys": ["ctrl+p"], "command": "copy_path" },
    { "keys": ["ctrl+shift+p"], "command": "copy_file_name" },
    { "keys": ["ctrl+alt+p"], "command": "copy_file_directory" },
    { "keys": ["ctrl+alt+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"}},
]


Useful Packages

  • https://www.tomordonez.com/sublime-text-typewriter-auto-scroll/
    • Scrolls the page down automatically for you
  • https://www.youtube.com/watch?v=xFciV6Ew5r4
  • SidebarEnhancements
  • BracketHighliter
  • https://github.com/ahkscript/SublimeAutoHotkey
    • More customizable than the one installed directly through package manager

Useful Hotkeys

  • Open Package Palette (Control + Shift + P)

Hotkey Configuration File

C:\Users\me\AppData\Roaming\Sublime Text 3\Packages\User\Default (Windows).sublime-keymap

Last updated on July 17, 2024. For any questions/feedback, email me at blog@zinchuk.xyz.