sublimehq / vintage Goto Github PK
View Code? Open in Web Editor NEWVintage mode adds a vi style command mode to Sublime Text 2
Home Page: http://www.sublimetext.com/docs/2/vintage.html
Vintage mode adds a vi style command mode to Sublime Text 2
Home Page: http://www.sublimetext.com/docs/2/vintage.html
Is there a way to configure the cursor that shows in command mode to non-blinking, and into a solid i-type cursor (instead of an underscore type-cursor)?
If you yank some text, then select some other text for pasting over - type 'p', it does not paste over the selected content.
Build 2143
As the title states, holding down any of the navigation keys h, j, k, l doesn't repeat the action, it just does it once
Someone asked in the forums how to set copy ops to always use the system's clipboard. This seems easy enough to fix with a Vintage.sublime-settings
file.
Would this be desirable?
In vim if you go into insert mode, type something, and then hit esc that action is repeated when you press "."
Right now . will repeat actions like dd but it does nothing if your last action was input.
If I enter insert mode, type "f", it autocompletes to "foobar" and I hit enter and escape out of insert mode, then "." should intuitively repeat the insertion of foobar. However, "." only repeats the insertion of "f".
As reported by @DySFunction here: #52 (comment)
In vim, using the paragraph motion (i.e. "{") will skip over any block of empty lines as if it were a single paragraph. Vintage mode currently doesn't do this.
This makes the paragraph operator much less useful in Sublime, unfortunately. Should be an easy fix though, I hope.
If Vjr-
is run in the following file:
abc
abc
It should result in:
---
---
As an example, di{
anywhere in the object below will delete all the lines instead of just the lines between { and }.
var AudioStates = {
INITIALIZING: 0,
PLAYING: 1,
PAUSED: 2,
STOPPED: 3
};
The vim behavior is search forward for a matchpair opener, if one is found on the same line, jump to the matchpair closer. If no matchpair is found forward on the same line, do nothing.
I would expect 40i-<Esc>
to insert 40 - characters.
If I have a file, with one line with the text "Hello World" and do: YpVr-
, I would expect that to result in:
Hello World
-----------
Instead it turns it into:
----------------------
If you have a buffer with two lines, the same command turns the text into:
Hello World
------------
(One too many -
)
d correctly yanks the text that it deletes, c does not yank any text.
In any decent editor, moving up and down, in any mode will preserve the column. Even in sublime (non-vintage mode) the column is preserved. Do you know a way to fix the keymapping so that this is the case? The problem may be in the implementation of the command itself.
Would like to be able to goto line numbers via command mode. For example: 12gg
would go to line 12. Anyone know why this isnt working?
a
won't take you out of visual mode as it should:
va
should exist visual mode and leave the caret after the selection, but instead it does nothing (visible). Pressing a
again inserts aa
.
Holding down hjk
or l
doesnt move the cursor. So in command mode, if I wanted to move down 10 lines. I would have to manually tap j
10 times.
If I hold the j
key down, it only moves the cursor down once...
From: http://www.sublimetext.com/forum/viewtopic.php?f=3&t=6517
I'm not sure where the right place to put fixes is, so I'll try here. I had noticed that when doing commands like yank or delete, something like "y20y" would misbehave, and have the cursor simply jump to the beginning of the line. It looks like the issue was in vintage.py:172,
CODE: SELECT ALL
elif key == "vi_has_repeat_digit":
if g_input_state.motion_command: #this line
v = len(g_input_state.motion_repeat_digits) > 0
else:
v = len(g_input_state.prefix_repeat_digits) > 0
Needed to be
CODE: SELECT ALL
elif key == "vi_has_repeat_digit":
if g_input_state.action_command:
v = len(g_input_state.motion_repeat_digits) > 0
else:
v = len(g_input_state.prefix_repeat_digits) > 0
ctrl+r is in the vintage keymap as redo button but it just opens go symbol box instead.
I found that repeat digits work with delete, but not with insertion.
E.g.
orginal text: 123 123
command 2dw will delete those two words
but 2i123 will only produce 123 instead of 123 123 as expected in VIM.
Many Thanks,
Is it possible to enable "always in command mode"? For example. When I am switching through tabs. If Tab 1 and 2 are in INSERT mode. If I am in Tab 1 and click on tab 2. Tab 2 automatically switches mode to COMMAND mode.
Similarly, if I click back on Tab 1, it switches automatically to COMMAND mode as well.
Hi, loving the new update. But would like to see the gv
functionality, which selects the previously selected selection.
Also the '.
functionality which brings you to the last edited line.
When you use the :#,#d syntax, the contents put into the paste buffer is truncated. For example, lets say you have a file that looks like this:
1:
2: hey
3: there
4:
5: guys
6:
If you input <escape>
, :2,3d
, <enter>
, go to line 5, <escape>
, p
, you should see this output:
1:
2:
3:
4:
5: guys
6: hey
7: there
After enabling Vintage, j
and k
do not go up or down, respectively, but h
and l
work perfectly fine. any reason why some key mappings are working but others aren't?
Currently, we have to press again v
to quit visual mode.
Is it possible to always have Vintage in command mode most of the time?
For example, consider these 2 scenarios:
These two behaviors are quite Vim-like. Would be great to have them.
Document at least available options. Maybe include Vintage's own Preferences.sublime-settings file and add comments as in Default/Preferences.sublime-settings.
It's handy to be able to select a bunch of lines, press >>
, and then use .
to keep indenting the text to the point that you want. This doesn't work as expected, though, when the selection is made backwards. It indents a set of lines that's one line lower on each repeat.
For example, in a file with just the text abc
(no newline), yyp
should result in the file:
abc
abc
Since there's no newline in the original file, there has to be a special case to add the newline into the register with the yanked text.
To match Vim's behavior, "A" and "I" should place the caret at the edge of the current selection, not the underlying line.
When pressing CMD T and the quick open window opens, it would be really cool if I can select a file by also using the J and K keys.
Maybe we need some sort of key combination here, like CTRL + movement keys?
I know GoTo "line number" etc is implemented in sublime text but being a vim user I'm used to ":" (or command) and a sending me directly there and would be a great feature for vintage.
Greetings!!
When search using '*', '#' or '/', the searched pattern isn't highlighted like a regular search using sublime, in fact i can't tell the whats the searched pattern is.
Its this a bug? Or is this not implemented yet?
Regards!
~
should toggle the case of all characters that are selected. If there's no selection it should toggle the case of the current character and move one character to the left.
Vim keeps track of files and locations within files that the user has visited, and allows the user to jump back and forward between these locations. Vintage should have this feature. If it did, it would own.
Somebody has already posted this issue on Sublime forum http://www.sublimetext.com/forum/viewtopic.php?f=2&t=2921 since nobody has replied to that post, I'm reposting this again here as I'm being limited by the lack of this feature.
"
In Vintage mode, if you set a mark (ex. by pressing "ma"), and then move the cursor somewhere else and try to delete to the mark (ex. by pressing "d`a"), the cursor just moves to the mark instead of deleting to the mark. This also happens when trying to select to the mark, copy to the mark, or change to the mark.
"
The block selection mode of Vim is very practical to make multiple-line insertions or modifications :)
See commit #25110f2.
_ takes a count according to vim's help file, while ^ does not.
http://www.sublimetext.com/forum/viewtopic.php?f=3&t=6608
Vintage Mode: ci[char] freeze
by marksteve on Tue Apr 03, 2012 3:36 pm
Doing ci[char] with no [char] match will cause Sublime Text to freeze and crash.
Vim's many ' commands such as '. and '[ jump to changes in a file, which is super useful. I wrote a quick plugin to do something like this but a more robust solution, built into Vintage, that uses ' as a prefix would be ideal.
Hi,
When I position my cursor on the last word of a line and execute dw it deletes the EOL and the next line. For example
lorem ipsum hello
foo sit amet
sed pulvinar bar
If you position your customer under the h in hello and execute dw it deletes all the way to sed. I am using the Sublime Text 2 Beta Build 2139 and the master git version of Vintage. Thanks for your time.
/Eoin/
Commit 7e2fa61 changed the behavior of these commands to keep the cursor from moving after the indent, but this change also keeps a command like 3>> from working. In vim, << and >> indent the line(s) and then move the cursor to the first non-whitespace character, rather than keeping it where it is. Can we get this changed back?
I'm not sure whether "text object" is the proper term here, but please read on!
Basically, in Vim, you can type d/hamster
, hit enter, and Vim will delete all text until the first occurrence of the word "hamster". This is consistent with the f
and t
movement commands—you can use them to move to the first occurrence of a letter, or you can delete/change/select all text until that first occurrence.
It would be extraordinarily useful if Vintage could provide similar functionality.
These commands were broken by the latest commit (commit 3e76932). I've checked out the previous commit and everything seems to work fine.
It looks like it has something to do with the movement portion of the command, as other, similar commands still work: cb, cc, c$, dw.
In Vim, when pressing "cc" to replace a line's contents, indentation will be preserved - http://vimdoc.sourceforge.net/htmldoc/change.html#cc
It's a small thing, but it'd be fantastic to have it here too :)
Changes and deletes shouldn't any characters in certain cases:
dtz
when there are no z
s on the linecc
on the last line of the file if that line is emptyIn these cases, Vintage backspaces from where the selection was instead of just leaving the text alone
The count is just ignored right now...
When the file tree has focus, you should allow the H J K L keys for basic movements in the directory structures.
You can already navigate using the arrow keys, so that should be allowed, too.
Right now I have to reach over and use the arrow keys. That kind of destroys the flow.
When the current file's syntax is set to a language that contains strings, the [
, (
, and {
text objects don't work inside of them.
Specifically, when inside of a string (or a regex pattern), those text objects only act on a single character. When using visual text objects like vi(
, the character under the cursor will be selected; when using normal text objects like di(
or ca(
, the character before the cursor will be deleted.
Interestingly, the "
and '
text objects still work when nested inside of strings.
This isn't directly related to the issue, but where is the method has_non_empty_selection_region
documented? I've checked the API, and I don't see anything there. A Google search for "def has_non_empty_selection_region" returns only this. It is used extensively by this plugin, and the code path for the above-mentioned text objects calls it.
As titled.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.