scope info


Select all text between quotes/brackets?

(multiline select until next quote) Ctrl+Shift+Space !!!!!

use specific python version for running python script

make a custom my_build.sublime-build file in the 'User' folder that can be accessed through 'Browse Packages...'

   "cmd": ["/Users/rickcompanje/.pyenv/shims/python3", "$file", ""]

config files including build-system OSX

escaped: ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User
not escaped: ~/Library/Application Support/Sublime Text 3/Packages/User

undo on all open files

len([v.run_command("revert") for v in window.views()])

Javascript Intenter

  • install formatjs
  • set shortcut in user key bindings: { "keys":["super+shift+r"], "command": "js_format"}

subl:// protocol handler

met de Apple Script Editor -> Export as .app:

on open location this_URL
  do shell script "~/bin/ '" & this_URL & "'"
end open location

Show Package Contents -> add to info.plist:

  <string>SublimeText Launcher</string>

build system

   "cmd": ["make"],
   "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
   "working_dir": "${project_path:${folder:${file_path)}",
   "selector": "source.makefile",
        "name": "Run",
        "cmd": ["make", "run"]

Disable Hex view for binary filesAdd to settings:

"enable_hexadecimal_encoding": false

On Linux

  • Alt+O: toggle Header/Source
  • Ctrl+P: jump to anything

Keyboard shortcuts

shortcut for reindent

in Preferences->User [ { "keys": ["super+alt+enter"], "command": "reindent" , "args": { "single_line": false } } ]

don't open new window

In Preferences->Settings User change add:

    "open_files_in_new_window": false,


formatting code

use sublime from terminal in osx

See [[|this page]]

ln -s "/Applications/Sublime" ~/bin/subl

and add ~/bin to your path for example:

# ~/.bash_profile
export PATH=~/bin:$PATH

compile c++ files


Splitting the Selection into Lines

Select a block of lines, and then split it into many selections, one per line, using Ctrl+Shift+L, or Command+Shift+L on OS X. [[|source]]

Build using makefile and getting this error: No targets specified and no makefile found. Stop.

the current directory might be wrong.


see [[openscad]]