OutlineMap | Sublime

This is a outline map for reviewing important tips and tricks of sublime text

[ Keyboard Shortcuts ]

  • Browse
    • Ctr+p : Search in Project Files
      • [#]"TEXT" :Serch deeper into file contents
      • [:]"TEXT" : Go to Line Number
      • [@]"TEXT" : Go to Methud
    • Ctr+Shift+p : Open Command Palette to digg in all sublime and menu commands entries
    • Ctr+r: Search in Local Variables and Functions
    • Ctr+G : Go to Line
    • Ctr+Shitf+t : Reopen-Last-Closed
    • Ctr+Page-Up & Page-Down : Switch Between Open Files
    • Ctr+Tab : Switch to most Recent Open File
    • Alt-Shift[1-5] : Split Window
    • Ctr+Alt+P : Switch Project
  • Search
    • Ctr+Shift+F : Find in Files
    • Ctr+H : Find and Replace
    • Ctr+Shift+H : Find and Replace Next
    • Ctr+F2 : Bookmark
    • Ctr+Shift+F2 : Clear Bookmark
    • Alt+F3 : Find All Matches of Selected Text with multi edit mode
  • Text Editing
    • Ctr+Space : Auto Complete
    • Ctr+D : Select All Matching Word in File
    • Alt+[Right-Left] : Move Cursor by Word
    • Shift+RightMouseClick : Select A Column Area of Text Block
    • Ctr+RightMouseClick : Add a Line Selection
    • Alt+RightMouseClick : Remove a Line Selection
    • Ctrl+Shift+Page Up : Multiline - Add line Above
    • Ctrl+Shift+Page Down : Multiline - Add line Below
    • Ctrl+Shift+L : Multiline - Split Selection to Lines
    • Ctr+D : Expand Selection to Word, Continue to Select all simile words in file in multiline mode
    • Ctr+L : Expand Selection to Line
    • Ctr+Shift+J : Expand Selection
    • Ctr+Shift+Space : Expand Selection to Scope ("Same Colored Text")
    • Ctr+Shift+M : Expand Selection to Brackets
    • Ctr+Shift+J : Expand Selection to Indentation
    • Ctr+Shift+A : Expand Selection to Tag
    • Ctr+Shift+[UP] : Move Selected Text UP
    • Ctr+Shift+[Down] : Move Selected Text Down
    • Ctr+Enter : Insert New Line After
    • Ctr+Shift+Enter : Insert New Line Before
    • Ctr+Shift+D : Duplicate Line
    • Ctrl+Backspace : Delete Word Backward
    • Ctr+Delete : Delete Word Froward
    • Ctr+Shift+K : Delete Line
    • Alt+[.] : Close Tag
    • Alt+Shift+W : Warp Text with Tag
    • Ctr+[/] : Single Line Comment
    • Ctr+Shift+[/] : Text Block Comment
    • Ctr+Shift+[ : Fold Code Block
    • Ctr+Shift+] : UnFold Code Block
  • Performance Tools
    • Ctr+Shift+q : Record/Stop a Macro
    • Ctr+Shift+Alt+q : Play Macro

[ Settings ]

Sublime Settings can be Override by adding new entries to your local user settings file:
Go to Preferences > Settings - Default : check the Default Settings to get what you need to be changes

Go to Preferences > Settings - User : to add it after modifying it to your needs.

Example:
{
    "tab_size": 4,
    "translate_tabs_to_spaces": false

}

And for Key Bindings:
Go to Preferences > Key Bindings - Default : check the Default Settings to check existing bindings

Go to Preferences > Key Bindings - User : to add a new binding

Example:
[

{ "keys": ["ctrl+q"], "command": "exit" },
{ "keys": ["ctrl+shift+w"], "command": "close_window" },
]

Here’s a list of typical resources that can be found inside packages:

  • build systems (.sublime-build)
  • key maps (.sublime-keymap)
  • macros (.sublime-macro)
  • menus (.sublime-menu)
  • plugins (.py)
  • preferences (.tmPreferences)
  • settings (.sublime-settings)
  • syntax definitions (.tmLanguage)
  • snippets (.sublime-snippet)
  • themes (.sublime-theme)




[ Snippets ]

Template:
<snippet>
    <content><![CDATA[Type your snippet here]]></content>
    <!-- Optional: Tab trigger to activate the snippet -->
    <tabTrigger>xyzzy</tabTrigger>
    <!-- Optional: Scope the tab trigger will be active in -->
    <scope>source.python</scope>
    <!-- Optional: Description to show in the menu -->
    <description>My Fancy Snippet</description>
</snippet>

Example: php Class
"
<snippet>
<content><![CDATA[
// ${1:ccomment}
class ${2:name} {
var ${3:variable}
${4:public} fucntion ${5:funcname} {
// ${6:fcomment}
${7:}
}
}
]]>
</content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>nclass</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>

</snippet>
"


[ Build Systems ]

Sublime Comes with a Number of Pre-Defined Build Targets, you can Define new Build Target by Following the Below Standard:

Go to Tools > Build Systems > New Build systems
this is the file template, change what to meet your need and save it.
{
    "cmd": ["ant"],
    "file_regex": "^ *\\[javac\\] (.+):([0-9]+):() (.*)$",
    "working_dir": "${project_path:${folder}}",
    "selector": "source.java"

}

REF: http://sublime-text-unofficial-documentation.readthedocs.org/en/latest/reference/build_systems.html

Comments

Popular Posts