Home Download Buy Blog Forum Support

Dev Build 2096

Dev Build 2096

Postby jps on Wed Aug 03, 2011 2:35 pm

Dev Build 2096 is out now. There's a small number of API related changes, and there's an experiment I've been working on over the last few days - Vintage mode.

Vintage mode is vi style key bindings for Sublime Text 2. It's very much an experiment at the moment: I don't know if it'll stay in for the next regular build. I'd like to see if it's something people find useful first.

Vintage is initially disabled, to enable it you'll need to remove it from the (new) ignored_packages global setting. If you do that, you'll be placed into command mode, with vi style commands available to you. As an aside, adding a package to the ignored_packages setting has the same effect as deleting the package itself: feel free to use this to trim away packages you're not interested in.

If you're trying out Vintage, there's a readme file in Packages/Vintage that's worth perusing. In short, keep in mind that Vintage isn't exactly like vi in all respects, some of the major differences are:
  • Insert mode is plain Sublime Text 2 editing, with the usual Sublime Text 2 key bindings: vi insert mode key bindings are not emulated.
  • Visual mode is implicit: if there's a non-empty selection, Vintage operates in visual mode, otherwise not.
  • Ex commands are not implemented, apart from :w and :e, which work via the command palette.
Vintage itself is implemented entirely as a plugin. I'd be extremely happy to receive any patches, some of the things it needs are:
  • More motions. While the core ones are implemented, there are many that aren't.
  • Proper support for ex commands
  • Plently of other things that I'm sure I've missed
There are no doubt many rough edges at the moment, but at this stage it'd be better to hold off on reporting small bugs and differences with vi. I'm keen to know first if Vintage is something people actually find useful or not.

Finally, I may have missed a few things from the change log this time around - just think of them as bonus features. One of them is that key bindings will now load from 'Default.sublime-keymap' files, which is handy if you have a package with identical key bindings across platforms.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Dev Build 2096

Postby jeberius on Wed Aug 03, 2011 3:26 pm

Very interesting! The only problem for me is that Sublime Text 2 does not seem to repeat commands when I hold down a shortcut. So when I hold down "j" to move down, it will only move down one line, while the original VI will move down continuously until I let the key go.

Still, it is cool to have VI-bindings as a "core"-feature!
jeberius
 
Posts: 7
Joined: Fri Feb 04, 2011 1:16 pm

Re: Dev Build 2096

Postby jps on Wed Aug 03, 2011 3:40 pm

sublimator wrote:For some reason my `User/Default (Windows).sublime-keymap` is no longer being honoured with this build :(

Sorry about that... will fix in the next build
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Dev Build 2096

Postby guillermooo on Wed Aug 03, 2011 3:40 pm

Can't wait to try the Vintage mode!
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Dev Build 2096

Postby guillermooo on Wed Aug 03, 2011 3:42 pm

Does the ignored_packages setting work on the fly? Is a restart necessary? What about packages that create locks on files inside the package dir?
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Dev Build 2096

Postby jps on Wed Aug 03, 2011 3:46 pm

It's applied on the fly, yeah - internally, it works just as if the files were deleted. Plugins will be unloaded, but unless they clean up after themselves (via defining an unload_handler() function), then all their effects won't be undone until the next restart.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Dev Build 2096

Postby iamntz on Wed Aug 03, 2011 3:57 pm

. So when I hold down "j" to move down, it will only move down one line, while the original VI will move down continuously until I let the key go.

Are you on Lion? If yes, this os has a... feature that prevent repeat keystrokes.
iamntz
 
Posts: 915
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: Dev Build 2096

Postby aparajita on Wed Aug 03, 2011 4:55 pm

Can you give a few details on how Command.description() might be used?
aparajita
 
Posts: 177
Joined: Sun Jul 24, 2011 10:42 pm

Re: Dev Build 2096

Postby Allen on Wed Aug 03, 2011 5:11 pm

jeberius wrote:Still, it is cool to have VI-bindings as a "core"-feature!


I am loving this so much! -- Would love to see 0 (zero -> go to beginning of line), :0 (beginning of document) :$ (end of document)
Allen
 
Posts: 43
Joined: Sun Jan 24, 2010 2:50 pm

Re: Dev Build 2096

Postby adzenith on Wed Aug 03, 2011 5:20 pm

iamntz wrote:
. So when I hold down "j" to move down, it will only move down one line, while the original VI will move down continuously until I let the key go.

Are you on Lion? If yes, this os has a... feature that prevent repeat keystrokes.

I believe it only does this for characters that have common accents, such as e, a, or n.
Also, if this bugs the crap out of you like it did me: http://hints.macworld.com/article.php?s ... 1122558299
adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm

Next

Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 28 guests