Vim: Stay on (yank, indent, outdent, delete, etc) feature

Created on 20 Feb 2018  路  7Comments  路  Source: VSCodeVim/Vim

Is this a BUG REPORT or FEATURE REQUEST? (choose one): Feature Request

One of the nice things I like about Atom's popular vim plugin, vim-mode-plus, is the option to enable stayOn{Yank,Delete,etc}. These options "try to keep original cursor position as much as posible after operation". It is an intentional difference from pure vim, and is behind a configuration flag.

I've got a local copy of this plugin that mimics that behavior - would you be open to a PR that adds similar options to this plugin? Just wondering before I go through the effort to package up a neat PR for it.

arenot-vim-core help wanted kinfeature

All 7 comments

For reference, the vim-mode-plus docs for this feature: https://github.com/t9md/atom-vim-mode-plus/wiki/DifferencesFromPureVim#config-vmp-stayontransformstring-stayonyank-stayondelete

Absolutely, we'd be happy to take PRs. Take a look at the existing implementations for Easymotion, Sneak plugins for an idea on how to integrate it.

I'd also like to see this feature in VSCodeVim. @davewasmer, have you made any progress? How can I help?

@trkoch see #2622

Currently I can maintain the current cursor position by adding this to my settings.

"vim.visualModeKeyBindingsNonRecursive": [
    {
        "before": [ "y" ],
        "after": [ "y", "g", "v", "<ESC>" ]
    }
],

If you want to maintain the highlight, just remove the <ESC> part.

Did this ever actually get added. From what I can tell it didn't (no instance of stayOnYank in the source). Just wanted to check because it would be awesome to have it. Thanks!

No, this is not implemented. Would accept a PR if anyone wants to give it a shot.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ACollectionOfAtoms picture ACollectionOfAtoms  路  3Comments

typeoneerror picture typeoneerror  路  3Comments

WangRongda picture WangRongda  路  3Comments

st-schneider picture st-schneider  路  3Comments

gerardmrk picture gerardmrk  路  3Comments