Open timkendrick opened 7 years ago
Our current policy on extensions is that while we probably won't implement them ourselves, we're completely open to other users implementing them. We're also completely fine with merging them into VSCodeVim core (generally speaking under a flag).
Sounds great, thanks for the fast response!
Gonna keep this open as it's a valid feature request.
I also would very much like to see this. Any work going on with this?
Hey everyone,
Subword support has been added to VS Code in 1.25 (https://github.com/Microsoft/vscode/pull/48023). Is it possible to enable subword for motion hot keys?
Any progress on this?
Still no progress ??
subword movement is supported: https://github.com/VSCodeVim/Vim/blob/master/README.md#camelcasemotion indent is also supported, keys: ii, ai
I'm particularly interested on the function text object. Is it possible to take advantage of any LSP to not have to parse it? I mean, can this extension communicate with LSP?
A text object not mentioned here yet that I use a lot is https://github.com/kana/vim-textobj-line
I would also love to see xmlattr https://github.com/whatyouhide/vim-textobj-xmlattr
A text object not mentioned here yet that I use a lot is https://github.com/kana/vim-textobj-line
For any who also ended up here when looking for line text objects, most of it can be emulated with the "before-after" functionality:
{
// ...
"vim.normalModeKeyBindingsNonRecursive": [
// hacks for line text object
{
// delete inner line
"before": ["d", "i", "l"],
"after": ["^", "d", "g", "_"],
},
{
// change inner line
"before": ["c", "i", "l"],
"after": ["^", "c", "g", "_"],
},
{
// go replace inner line
"before": ["g", "r", "i", "l"],
"after": ["^", "g", "r", "g", "_"],
},
{
// go UPPER inner line
"before": ["g", "U", "i", "l"],
"after": ["^", "g", "U", "g", "_"],
},
{
// go upper inner line
"before": ["g", "u", "i", "l"],
"after": ["^", "g", "u", "g", "_"],
},
],
// ...
"vim.visualModeKeyBindingsNonRecursive": [
// hacks for line text object,
{
// select inner line
"before": ["i", "l"],
"after": ["^", "v", "v", "$", "o"],
},
{
// select around line
"before": ["a", "l"],
"after": ["0", "v", "v", "$"],
}
],
// ...
}
This catches the most frequent usages and is easily extended to "around-line" objects (for preceding space + trailing space).
The surround command ys
uses (I think) operatorPendingMode so it needs a different approach.
In the spirit of sharing hacky regexes, here's an attempt at a selecting comment block. g;
selects a contiguous comment block while g:
selects comment blocks separated by newlines.
g;
currently has an issue in that the selection moves to the bottom of the buffer; thoughts on fixing it are very welcome!
I'd very much like a a feature to define a mapping between a chord and a text selection — so rather than having to define dil
, dal
, cil
, cal
, vil
, val
etc — we could just define il
& al
mean, and for the extension to handle it in each action.
I'm an Atom vim-mode-plus user who's been keeping an eye on VSCode for a while: one of the main things that's holding me back from switching is the inability to define various text objects and motions that I've grown accustomed to.
Some examples of custom text objects in other 'vimplementations':
Is there any chance that this kind of extensibility will be available for text objects and motions within VSCode Vim some day?