i am aiming toward a vim like key binding, not as the default replacement, just as an alternate keymap. let me explain a bit, so you won't think i am forcing going into something just to imitate an old editor.
the extensive customization could be made on sublime, requires more and more keybinding, i am just tired to flex my fingers from the ctrl, alt and other combinations everytime. so i thought the vim way to deal with it isn't quit bad. a simple overview on this vim feature: on the vim editor, you can select to go-out of editing mode, into a control mode, in which keys you press are not necessarily typed into screen, but rather are used as controls. so, on control mode, instead of pressing ctrl+f to search you use just the key '/'. if we use if for sublime we can set that instead of ctrl+shift+o to search through all opened files, use just the key 'o' for instance.
so i got this far, first a plugin to easily switch between keymaps:
import sublime, sublimeplugin
def run(self, view, args):
mode = args
print "switching to " + str(mode) + " keymap"
def isEnabled(self, view, args):
second, under User/Default.sublime-keymap, add:
<binding key="f12" command="toggleKeymap Vim"/>
and last, create User/**Vim**.sublime-keymap, and just copy into it all the Default keymap (from Default/Default.sublime-keymap), adding the following line:
<binding key="f12" command="toggleKeymap Default"/>
now you can play with it. go to User/**Vim**.sublime-keymap, adding
<binding key="/" command="showPanel find"/>
to search with '/'. or replace the following:
<binding key="alt+f3" command="findAllUnder"/>
<binding key="*" command="findAllUnder"/>
so far so good, but here are the problems:
1. i would like to use capslock as toggle key, so i can see the key light on my keyboard to show me on which mode i am, i tried it, and i can do it, but afterward, all the keys i press are on upper case (surprise, surprise...) it would be nice to override it, somehow.
2. on vim, you can concatenate control keys on the control mode, so you can use not just 'o' to to open file, for example, but also 'ot' for open file in tab, 'od' for open file in directory, etc. on sublime i can concatenate only ctrl/alt/shift and one more normal key. i would like to be able to do it for any number of normal keys (you can think of it like the snippet mechanism)
3. it has its glitches, so i bind the key '' to search-all-under (like alt+f3), it works, but, oops, it works also when i start to type the search terms, so if i try to use '' i get the effect of search-all-under again... i thought of using somehow, but i dont know if there is one for checking if the focus is on the main window or not...
any way, feel free to comment, etc.