Comments (10)
This is unexpected. Could you please post the text that you tested this on? Did you press l
or L
and did you remap the key to something else?
from vim-multiple-cursors.
I've figured it out. If you try and move beyond the end of the line (i.e. press l
too many times) then it breaks. Therefore, by side-effect, if you select multiple lines where any of those lines are blank, the moment you hit l
it breaks.
foo
bar
zip
button
Select all the above lines, then press ctrl-n.
Here you can select them and move left/right fine, within 3 characters. If you go beyond the end of the foo, bar or zip lines, however, the plugin breaks as described above.
foo
bar
zip
Now select all of those lines. If you try to move either left or right (h
or l
) thing break immediately, due to the blank line.
from vim-multiple-cursors.
This also affects trying to move left of column zero.
from vim-multiple-cursors.
Ok, this is briefly mentioned in the Issues section in the README:
Single key commands that do not terminate properly cause unexpected behavior. For example, if the cursor is on the first character in the buffer and 'b' is pressed.
With that said, blank lines should not cause an issue like you described.
Start with cursor on the first line
foo
bar
zip
Vjjj<C-n>l
shouldn't cause an issue. Vjjj<C-n>h
will cause an issue due to the problem described earlier since the cursor is on f
in foo
, and pressing h
there causes a Vim error. (Turn your terminal bell on and hit h
in regular vim's normal mode, it should cause the bell to sound)
To fix this, we need a way to detect that a Vim command terminates successfully. If it doesn't terminate successfully, the function to continue fanning out the user action to all cursor locations is not called, thus causing these 'ghost' cursors to appear.
from vim-multiple-cursors.
I just fixed this in the latest release, which brings us to v2.0, finally at a point where I feel like the plugin is stable enough for general usage. Let me know if you still experience this issue. The plugin should inform you now when some input cannot be replayed successfully.
from vim-multiple-cursors.
Oh, nice. Gonna try this now 👍
from vim-multiple-cursors.
That sure does work. Good work. Feels a bit weird deliberately moving the cursors to places they shouldn't be going anyway, but it's not exactly a real use case; it's just good it doesn't break now :)
from vim-multiple-cursors.
Yep, the change does fix more annoyance than your particular example. All operator pending commands in normal mode like 'd' and 'c' used to break muticursor mode, now they are treated as unterminated commands and display an error. This paves the way for multikey commands to be implemented in the future.
from vim-multiple-cursors.
Ok, a much more minor issue in relation to this. I can file a separate issue if you want, though this is not really a huge problem at all. If you go past the end of the line, or left of the start of the line, while the plugin doesn't break, it does seem to register a "change" in the undo history.
from vim-multiple-cursors.
Could you please open a new issue and describe the steps to repro? I think I know what you mean, it does seem to create a new undo point with no actual change.
from vim-multiple-cursors.
Related Issues (20)
- Input ignored after leading key of insert mode mapping HOT 1
- Support not moving cursors when scrolling HOT 1
- ReadMe have a complex explanation on the usage, bad for newcomers. HOT 3
- After enter multi-select and c, cmd+v does not work HOT 2
- Request: When in wait_for_user_input(), show prompt HOT 6
- How can I use <A-n> in mac? There is no 'A' key. HOT 1
- How to yank multiple cursors? HOT 2
- can't return to regular vim and it stucks HOT 6
- Doesn't work with nondefault langmap HOT 3
- Restrict mappings to a mode (?) HOT 1
- Stuck HOT 6
- Crash on search a char using `f` when target char isn't found HOT 1
- Esc does not work in INSERT mode after multicursor is on. HOT 3
- Annoying beep when pressing <ESC> to switch from ' -- (insert) --' to multi line HOT 3
- Select all occurrences within specified text area HOT 1
- Change cursor style when in insert mode?
- rake vulnerability found in …/vim-multiple-cursors/Gemfile.lock
- Multicursor crash when try to insert HOT 1
- Plugin is deprecated, use vim-visual-multi instead HOT 7
- region col possibly to -1 be invalid...
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 vim-multiple-cursors.