Comments (6)
This is a configurable option called 'moveonyank', it is enabled by default. See this page for details:
http://vrapper.sourceforge.net/documentation/?page=6
There has been some discussion on whether to change the default so it doesn't move the cursor on yank. I don't feel strongly about it so we may change the default in the future. I'll ask the other developers.
from vrapper.
It is about Vim's inconsistency that I have just noticed reading this bug report. Vim doesn't move the cursor when you do line-based yank (like yy
), but it does move to beginning of yanked range when you yank text (eg. yb
), in particular text objects (yib
). I wasn't aware of that when adding moving to beginning of yanked text and creating moveonyank
option. As a result moveonyank
is all-or-nothing, so it's impossible to recreate Vim's behaviour in current Vrapper.
This bug report is completely legit, so I'm re-opening it.
Bug-for-bug compatibility is hard but I think we should aim at it, especially with basic things as yanking the current line.
from vrapper.
After playing with vim a bit, it looks like the cursor always moves to the beginning of the selection.... except with 'yy'. If the cursor is already at the start of the selection (yw, y$, vkky, ytx, yG) it doesn't move. If the cursor is not at the start of the selection (yib, y0, vjjy, Vy, yib, yTx, ygg) the cursor jumps to the start of the selection. As far as I can tell, 'yy' is the only exception to this rule. It's actually weird that Vy moves the cursor and yy does not. Aside from the highlight, they're equivalent operations.
Good luck goj! I think I'll let you take this one. :-)
from vrapper.
@keforbes: it's even worse
yj
moves one line below (so it moves, but not to the border of selection). There are more exceptions, but I couldn't find any rule that could explain it. Try: y}
, y{
, yVh
, 2yVh
. It's quite random :-/
Maybe we could special-case yy
with an option, the same way we do dw
- stupid Vim's inconsistency, but something people are used to.
I don't feel I have enough free time to code this :-/
from vrapper.
It seems to me that we would want to always move on yank unless we're in LINES mode. I say throw away the :moveonyank property and just use that logic.
from vrapper.
I have submitted a Pull Request which I think covers most of these cases. Please test out the code at:
#32
from vrapper.
Related Issues (20)
- _vrapperrc HOT 5
- Cannot get rename to work HOT 1
- Replacing something with forward slashes HOT 8
- :reg command doesn't work when used alone HOT 8
- Vrapper not running on Eclipse 4.21.0 HOT 10
- Insert macro with { don't work HOT 2
- Replace regex within visual-box \%V is not working HOT 2
- Can't bind "option+[KEY]" using MacOS. HOT 3
- content assist like navigation in quick assist and hyperlink menus
- Can't change to a different tab that is far away with <C-w><number>gt HOT 2
- Add ":wrap" command line command bind to Eclipse's action "Toggle Word Wrap" HOT 1
- Sub-Word plugin unexpected behaviors
- Adding DVT (a SystemVerilog plugin) action to vrapper keymaps HOT 2
- Vim doesn't work on windows of Table views HOT 2
- Cannot find active input interceptor for error editor HOT 1
- ctrl+v -> i -> w leaves visual block mode
- Typing after double quote locks up Eclipse
- Stay in visual mode while jumping through editor commands
- How to assign the leader key to the spacebar? HOT 3
- Need to integrate vim and emacs plugin HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vrapper.