Hatena::Diary Writer auto-save-buffers-enhanced.el Better auto-save feature for Emacs ditz.el Emacs Interface to ditz.rb cppref.el Emacs Interface to cppref Command Taskpaper Super Simple Task Management Tool and so on...
nobody really knows what emacs is, although some people edit text with it. If you are an emacs user, you’re probably not reading this. http://docs.sublimetext.info/en/latest/basic_concepts.html#emacs Sublime Text Unofficial Documentation
Enhancements for Git Sublime Tweet Make Tweets from ST2 Retrieve Timeline into and Manipulate against Tweets Many Plugins for Development Ruby / Python / JavaScript / HTML / etc. flymake-like Lint Plugin Many Snippets for Languages LiveReload LiveReload Server Implementation for ST2 Usable for Realtime Preview Markdown Viewer
Apps/ $ ln -s $HOME/Dropbox/Apps/Sublime\ Text \ 2/ Sublime\ Text\ 2 Mac OSX: Sync Settings by DropBox All Settings / Plugins are located in the place, so you just need to make a symlink to there.
via built-in csslint Git Commit Messages lint via built-in module Haml lint via haml -c Java lint via javac -Xlint Javascript lint via built in jshint, jslint, or the closure linter Objective-J lint via built-in capp_lint Perl lint via Perl:Critic or syntax+deprecation checking via perl -c PHP syntax checking via php -l Puppet syntax checking via puppet parser validate Python native, moderately-complete lint Ruby syntax checking via ruby -wc https://github.com/SublimeLinter/SublimeLinter for flymake.el
Set a tabTrigger to define how to trigger the snippet --> <!-- <tabTrigger>hello</tabTrigger> --> <!-- Optional: Set a scope to limit where the snippet will trigger --> <!-- <scope>source.python</scope> --> </snippet> How to Define Snippets Tools → New Snippet Save file with *.sublime-snippet ext.
own Python interpreter and it’s separate from your system’s Python installation. On OS X, the system Python is used instead. Modifying your system version of Python, such as replacing it with the MacPorts version, can cause problems for Sublime Text. What Python is Used? http://docs.sublimetext.info/en/latest/basic_concepts.html#your-system-s-python-vs-the-sublime-text-2-embedded-python
16:23:38) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/ clang-418.0.60)] • Sublime Text2 for Mac (Build 2216) • Mac OSX 10.8 • It seems to be same as /usr/bin/python2.6
to window/view. Window Commands Provides a reference to the current window. Text Commands Provides a reference to the current view. Event Listner Will be invoked when some event occurs.
a Sbulime Text 2 Plguin http://net.tutsplus.com/tutorials/python-tutorials/how-to-create-a-sublime-text-2-plugin/ Official API Reference http://www.sublimetext.com/docs/2/api_reference.html Cookbook by @jugyo https://gist.github.com/3338888
"item " + str(i) for i in range(1, 6) ] self.window.show_quick_panel(self.items, self.on_done) def on_done(self, index): if index > 0: print "Selected: {0}".format(self.items[index]) else: print "Canceled!" Quick Panel • `index` will be one of `items` selected. • `-1` returned if canceled.
a new thread!", "", None, None, None) Calling UI Components on other Threads ...Will get an Error: RuntimeError: Must call on main thread, consider using sublime.set_timeout(function, timeout)
def in_main_thread(self): self.window.show_input_panel("Hello from the main thread!", "", None, None, None) Calling UI Components on other Thread (2) • UI components must be called in `main thread`. • Use 'sublime.set_timeout(callback, delay)' for it. • When it's some dialog component, to make matters worse, the whole editor can block and won't return to the `main thread`
Eijiro (Online Japanese-English/English-Japanese Dictionary) • Display meanings of the word returned by the dictionary in Output Panel • Enable to launch the command from Command Pallet
self.view.substr(self.view.word(point)) if not self.word: sublime.status_message("No word found.") return else: self.consult_dictionary(self.word) Get a Word at Cursor • We support only one selection this time. • view.substr() takes sublime.Region returned from view.word() / view.line() etc. to retrieve a word in the range.
urllib2.HTTPError as e: self.handle_error("HTTP", e) except urllib2.URLError as e: self.handle_error("URL", e) HTTP Request with urllib2 • We can freely use Python’s rich libraries. • Even external libraries can be used in Mac OSX ad described before.
• Python API is easier to do with than elisp / vimscript • Rich UI components are very useful and easy to use from plugins • There already have been many plugins by community Pros