Open dpendolino opened 6 years ago
I cannot understand your explanation clearly. Please follow this instruction you checked.
Express "what" you want(feature? config option?, behavior change?) in short sentence(not long!). Contrast current behavior if you want to change current behavior, with sample text, operation(keystroke) and result.
Are you saying yy
sometimes include newline but sometimes not. And want yy
always yank newline?
OK. Now I understand your request after seeing GIF. And you can say it's BUG. And I know why it's happening. Not high priority to fix.
No worries, I was just typing a better explanation when you responded again.
Got it, thanks! If the fix is small, can you let me know what it is and I can patch for myself?
Oh, but I can't reproduce it.
I'm macOS user.
I thought y y p
on last buffer line(which line have NO ending new line) is the condition to reproduce. But I cannot reproduce it.
How do you reproduce GIF?
Sample text, exact keystrokes?
To repro the gif:
yy
p
The text on my systems will be placed where the cursor is and not on the next line, like I would expect.
Here is my case.
Oh I forgot to mention I did try is with both Unix and Dos line endings and reproduced with both.
The issue happens only in last line in editor and that last line must not have ending new line right? By default saving buffer automatically add ending newline, so after you save buffer. You no longer hit issue with that last line right?
Does my above understanding is sync with what you observed?
No it happens on most lines regardless of it's position in the file. Even after a save, it still inserts text.
No it happens on most lines regardless of it's position in the file. Even after a save, it still inserts text.
Humm, then the issue is NOT what I imagined originally.
Can you reproduce it always? Found concrete condition? I never hit such issue?
When you do y y p
, observe what command actually invoked by keybinding-resolver.
It should be y
(yank
), y
(yank
), p
(put-after
)
Yeah you're right, this is weirder than I originally though too.
Check out how inconsistent it is:
All I'm doing is moving the cursor then hitting yyp
From the keybinding resolver I get the following when the issue occurs:
vim-mode-plus:yank
vim-mode-plus:yank
vim-mode-plus:put-after
When it works correctly:
vim-mode-plus:yank
vim-mode-plus:yank
vim-mode-plus:put-after
Humm, it's really strange. From the keybinding resolver result you reported, it's seem to bug of vmp. But I have no idea what cause this.
I want to find concrete repro condition. And also want to collect report from other people(maybe it's happens only in linux??? not sure).
For now, I can do nothing. So will wait for more info comes in.
I have somewhat of the same issue, but mine is when using ex-mode along with vim-mode-plus.
For instance if i selected
line 4 will be deleted as well. However this doesn't happen when i just press d and don't use ex-mode.
Any single line operation like
yy
thenp
ordd
thenp
usually includes the trailing newline. It's annoying to have to manually insert a new line when yanking text and putting is somewhere else.I usually see the behavior depicted above but on rare sessions it does work as expected. It doesn't last and either a reboot or update reverts the behavior.
Based on VIM itself I assume the correct behavior is to include the newline, and this is a bug. If that's not the case can this issue be marked a feature request? Thanks!
Then execute
Vim Mode Plus: Clip Debug Info
(which write info to clipboard) then paste here.debug info
```json { "atom": "1.25.0", "platform": "linux", "release": "4.15.9-1-ARCH", "vmpVersion": "1.31.1", "vmpConfig": { "blackholeRegisteredOperators": [], "startInInsertModeScopes": [], "charactersToAddSpaceOnSurround": [], "highlightSearchExcludeScopes": [], "flashOnOperateBlacklist": [] } } ```Read and check all "Check list" bellow.
Check list
You have to check all before open issue.
Vim Mode Plus: Clip Debug Info
command.atom --version
), vim-mode-plus version, and OS version(e.g. macOS Sierra 10.12.3).