Home Download Buy Blog Forum Support

vintage mode :line number

vintage mode :line number

Postby leeh on Wed Nov 30, 2011 3:43 pm

I am a long time vim user and just trying out Sublime. So far I think it's pretty awesome. Just wanted to point out a couple of things that I have noticed.

1. if I type :51 in vim it takes me to line 51. It seems like this should work in vintage mode, but instead is just see the command bar with :51, but when I hit enter nothing happens. However it does work if I hit ctrl+p :51<enter>. Just not as convenient as :51.

2. Another command that I miss is ~ to toggle the case of the character under the cursor in command mode. Also 5~ would toggle the char under the cursor and the next 4.

A couple others that I can't reproduce effectively:
when I hit dw at the end of a line sometimes it gobbles up more than it should.

sometimes when doing a visual selection the cursor will get stuck and I can't continue down the screen. I can go back up, but not down.

Sublime text 2 beta build 2139 on Windows 7 64 bit
I am also using the Coldfusion package found here https://github.com/indynagpal/coldfusion-sublime-text-2
leeh
 
Posts: 4
Joined: Wed Nov 30, 2011 1:54 pm

Re: vintage mode :line number

Postby guillermooo on Wed Nov 30, 2011 5:43 pm

Vintage (the package providing Vi-like functionality) lacks a command-line mode. An "unofficial" (Vintage was initially created by ST's author, Jon Skinner) command-line mode for Vintage can be found here, though:

https://github.com/SublimeText/VintageEx

It's in the early stages still, but ":51" should work :)
guillermooo
 
Posts: 723
Joined: Thu Jul 23, 2009 9:06 am

Re: vintage mode :line number

Postby leeh on Wed Nov 30, 2011 6:55 pm

That works. I notice that if the line you jump to is not on the screen it doesn't bring it into view - I just hit zz and it comes to the center. Big improvement though.
leeh
 
Posts: 4
Joined: Wed Nov 30, 2011 1:54 pm

Re: vintage mode :line number

Postby guillermooo on Thu Dec 01, 2011 7:42 am

I've fixed the new selection beeing off the screen issue for :<address> commands.
guillermooo
 
Posts: 723
Joined: Thu Jul 23, 2009 9:06 am

Re: vintage mode :line number

Postby leeh on Thu Dec 01, 2011 1:34 pm

Sweet! Thanks.

I added a custom key binding to allow ~ to swap case. It's a little different than what I am used to, but I think I can adjust.
So with this I just hit v~ to swap the case of the current char. I could also do a visual block using v and the movement keys and swap case on the whole block.
Code: Select all
[

  { "keys": ["~"], "command": "set_action", "args": {"action": "swap_case", "description": "Swap Case"},
    "context": [{"key": "setting.command_mode"}]
  }
 
]
leeh
 
Posts: 4
Joined: Wed Nov 30, 2011 1:54 pm


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 24 guests