2 ms·
I've changed some key bindings to suit my taste, like: Cmd-D: Duplicate line Cmd-L: Delete line Cmd-T: Insert HTML tag Cmd-B: Open in browser
by Kilimanjaro 14y ago
I've changed some key bindings to suit my taste, like:
Cmd-D: Duplicate line
Cmd-L: Delete line
Cmd-T: Insert HTML tag
Cmd-B: Open in browser
Ctrl+Up/Dn: Toggle lines
Ctrl+a/e/i/o/u: Accented á é í ó ú
Sublime Text 2 has become my favorite editor, fully customizable and plenty of plugins available.
- simonsarris 14y agoCan you share with us how you made these bindings? Specifically open in browser? using { "keys": ["f8"], "command": "openInBrowser" }, Didn't work on my windows machine when I made it.
- Kilimanjaro 14y agoHere is how I did it for Safari, change accordingly. Go to Tools/BuildSystem/NewBuildSystem... Type this in: { "cmd": ["open", "-a", "Safari", "$file"], "selector": "html" } Save it in your sublime/packages/user folder as 'Open in Safari.sublime-build' That's it. It should show up in your Tools/BuildSystem and should be selected for all html files. So when you hit Cmd+B it uses that build system to just show the file in Safari. There are other ways like mapping Cmd+B directly to a python snippet like: import sublime, sublime_plugin, webbrowser class OpenBrowserCommand(sublime_plugin.TextCommand): def run(self,edit): url = self.view.file_name() webbrowser.open_new(url) but for me the first option was simpler.