Sublime Text 2

My Sublime Text 2 Plug-in V2

Sublime Text 2  is one of my favorite plain text editor. It supports hundred of plugin(still growthing) with highly productivity features.

I have listed my plugin on Windows 7 64bit in previous post. This is the updated version of my MacBook Air.

Productivity

  • SublimeLinter

  • automatically show potential error of code after saving * Http Requester

  • Direct request url on new tab

  • [Cmd] + [Option] + [R]* LiveReload

  • reload web page directly after saving (need browser extension)* DocBlockr

  • Doc block generator 

  • [Tab]* AdvancedNewFile

  • Quick folder/file creator, even with path.

  • [Cmd] + [Option] + [N]* All Autocomplete

  • Enable all opened file complete

  • [Tab]* Gist
  • Terminal
  • SublimeCodeIntel
  • ZenCoding
    Code Operation (Align, format, encode)

  • Alignment

  • EncodingHelper

  • Enable reopen file in different encoding* HtmlTidy

  • Indent XML
  • JsFormat
  • Prefixr

  • Useful css formatter with prefix complete feature

  • [Ctrl] + [Cmd] + [X]* SideBarEnhancements
  • SmartMarkdown
  • Sublime-HTMLPrettify
    Syntax & Snippets

  • CSS Snippets

  • EJS
  • HTML5
  • Jade
  • jQuery
  • jQuery Snippets pack
  • jQuery Mobile Snippets
  • LESS
  • Plist Binary
  • Stylus

My Sublime Text 2 on Windows 7 64bit

Sublime, the awesome, amazing editor.1. Get 64bit portable version

  • Official Website : http://www.sublimetext.com/22. Install Package Control
    This is the most complex step.
    _Type Ctrl + ` and enter following python code _

    import urllib2,os; pf=‘Package Control.sublime-package’; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),‘wb’).write(urllib2.urlopen(http://sublime.wbond.net/'+pf.replace(‘ ‘,‘%20’)).read()); print ‘Please restart Sublime Text to finish installation’
    3. Install Packages (All from package control)

  • Alignment

  • Format shortcut – Ctrl + Alt + a* BracketHighlighter

  • CoffeeScript
  • Display Functions (Java)
  • Edit History

  • Jump to next/previous edit location

  • Add Key Binding* FileDiffs

  • Usage

  • Right click on tab (Or use command popup then search “Diff”)* Install KDiff3

  • Modify Code (file_diffs.py)

    Under WINMERGEif not WINMERGE:
    if os.path.exists(“%s\KDiff3\KDiff3.exe” % os.environ[‘ProgramFiles(x86)’]):

    WINMERGE = <span class="str">'"%s\KDiff3\KDiff3.exe"'</span> % os.environ[<span class="str">'ProgramFiles(x86)'</span>]
    

    else:

    WINMERGE = <span class="str">'"%s\KDiff3\KDiff3.exe"'</span> % os.environ[<span class="str">'ProgramFiles'</span>]
    

    ……
    _End of run_diff function_

    if from_file == ‘from_file’ or to_file == ‘to_file’:

    cmd_line = <span class="str">'%s "%s" "%s"'</span> % (WINMERGE, from_file, to_file)
    print <span class="str">"KDiff3 command: "</span> + cmd_line
    Popen(cmd_line)</pre></pre>*   [Git](https://github.com/kemayo/sublime-text-2-git/wiki)
    
  • Call git command quickly – Need Git (mysysgit on Win7)

  • Usage : Command search “git”* HTML5

  • Snippets* IndentGuides

  • Indent line for editors* jQuery

  • Snippets* jQuery Snippets pack

  • Hint : Need enable jQuery support by command

  • Snippets* JS Minifier

  • Minify shortcut – Ctrl + Alt + m* JsFormat

  • Format shortcut – Ctrl + Alt + f* Pretty JSON

  • Format shortcut – Ctrl + Alt + j* Prefixr

  • Format shortcut – Ctrl + Alt + x (For CSS)* SideBarGit

  • SideBarEnhancement
  • SublimeCodeIntel (Must Have)

  • Autocomplete (Popup)* Tag

  • “/”to end tag

  • Format shortcut – Ctrl + Alt + f
  • Features : Edit –> Tag …* Terminal

  • Open file shortcut – Ctrl + Shift + t

  • Open folder shortcut – Ctrl + Shift + Alt + t* Tortoise

  • Need  TortoiseGit or TortoiseSVN

  • Update : 20120314 - **error: [Error 2] The system cannot find the file specified*** WinMerge

  • Compare shortcut – Ctrl + Alt + d (Current file with previous edit file)

  • Modify Code (WinMerge.py)

    WINMERGE = “F:\WinMerge-2.12.4\WinMergeU.exe”
    * ZenCoding (AWESOME!!)**Editor Shortcut**

  • Toggle sidebar (file explorer) – Ctrl + K then B

  • Command List - Ctrl + Shift + P
  • File Search – Ctrl + P

    Right Click Menu Support

  • Modify the Path of following regestries

  • Save following text into a .reg file then double click on it to apply
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\\shell\SublimeText]
@=“Edit With Sublime Text2”
“Icon”=“D:\WindowsApp\Sublime\sublime_text.exe”
“Position”=“Bottom”

[HKEY_CLASSES_ROOT\
\shell\SublimeText\command]
@=“D:\WindowsApp\Sublime\sublime_text.exe %1”