User Tools

Site Tools


Sidebar



sublime

SublimeText2

A light-weight full feature text/code editor for OSX, Windows and Linux

build system

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

Disable Hex view for binary files

Add 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,

tips

formatting code

use sublime from terminal in osx

See this page

ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl

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.

openscad

see openscad

sublime.txt · Last modified: 2016/11/30 14:26 by rick