Home Download Buy Blog Forum Support

emacs arg support and key bindings

emacs arg support and key bindings

Postby rmcgowan on Wed Aug 24, 2011 5:47 pm

Has anyone implemented universal argument support, like ^U in emacs? It's the one big thing I miss for editing with SublimeText2. Drives me bonkers not to have it. If it's in there somewhere I must have missed it...

Also, I don't know if anyone else likes the basic emacs command set, but if anyone is interested in that, I have a sublime-keymap file that does pretty well and I can post it somewhere.
rmcgowan
 
Posts: 8
Joined: Fri Aug 19, 2011 11:34 pm

Re: emacs arg support and key bindings

Postby jps on Fri Aug 26, 2011 10:27 am

Unfortunately there isn't any command for this. It would be possible to make one via the API that repeated the last command n times, but that would be back to front compared to emacs, of course.

I'm sure there would be several people interested in emacs key bindings, btw.
jps
Site Admin
 
Posts: 3077
Joined: Wed Mar 19, 2008 12:33 pm

Re: emacs arg support and key bindings

Postby rmcgowan on Sat Aug 27, 2011 7:41 pm

Yeah ^U arg support really has to be built into the command loop. It's not hard to do (I've implemented it before in C code) but is best done that way. Basically, the main command loop just has to keep track of one numeric argument and instead of executing a command, execute and decrement until the arg is zero. I'm surprised it's not already built into ST2, because of the huge number of other features already there, most of which are far more difficult.

Anyway, the emacs-like key bindings I'm currently using are here:
http://azuma-asobi.com/temp/Win-Emacs-l ... keymap.txt
for now... The file contains most of the basic commands and lets you move around and edit basically. I left in the bracket matching of the default file, but ripped out a load of stuff that I don't use or don't understand for now.

Sure would be nice to have that ^U arg support. I'd pay twice for that... ;)
rmcgowan
 
Posts: 8
Joined: Fri Aug 19, 2011 11:34 pm

Re: emacs arg support and key bindings

Postby stiang on Mon Aug 29, 2011 8:09 am

I too would like to see ^U support.

Btw, I have put together a package to make ST2 more friendly to Emacs converts, which may be of interest to you: https://github.com/stiang/EmacsifySublimeText
stiang
 
Posts: 39
Joined: Sat Jan 29, 2011 12:34 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 6 guests