Page 3 of 5

Posted: 21.11.2018 17:03
by Alexey
2) I see that Vim uses self buffer for y/p, not OS clipboard. we need self buffer here too? it will help me to fix Y/p.

Posted: 21.11.2018 18:11
by oO0XX0Oo
You paste by "p"? what text is selected and how to repeat by steps?
Yes I do. Use any text you like with more than one line.
In the first .gif, I'm using "Y" and immediately after that: "p". As you can see the yanked full
line is inserted right after the caret (as the status bar field states as well) and the
caret is moved one char. This is probably ok if "y" was used before (for smaller parts
than a full line) but not for "Y".
Y.gif
The second gif shows "V", followed by "jj", followed by "y". After the first "p" everything
looks like it should, but now "p" is used again and the content of the current line gets
indented by one space (which shouldn't happen).
V.gif
2) I see that Vim uses self buffer for y/p, not OS clipboard. we need self buffer here too? it will help me to fix Y/p
There are different options on such a topic (in vim). E.g. vim can be used with the system clipboard directly
if compiled with the clipboard option and:
:set clipboard=unnamed or :set clipboard=unnamedplus
Otherwise you'd need the * or + register (which never really worked in e.g. gVim on Windows).

So I'd really prefer using the clipboard directly even if this makes it a bit harder to solve this issue...

Posted: 21.11.2018 23:18
by oO0XX0Oo
What I just noticed...

You support f, F and t, T but not in conjunction with motions that can really make use of it
For example: c, d or v
Like "change from the current cursor position up to (but not including) the next "q" character on the same line:
"ctq"
etc.

One of the things I'm using extremely often :mrgreen:

Another video for a bug...
Undo "u" can get confused.
In this case I delete the second word on the first indented line "adipiscing" with "dw".
Then I undo it with "u" and again delete it with "dw". The next "u" will NOT ONLY undo
the deletion of the word but also undo the action before (adding a linebreak after the
word "reprehenderit" at the end of the third indented line)...
u.gif

Posted: 25.11.2018 08:59
by Alexey
Update in github (use AddonManager/ Install from Github)
2018.11.25
- fix: commands Y/p must insert text at line start
- fix: commands y/p in visual/fullline mode must paste at line start

Posted: 25.11.2018 09:04
by Alexey
--Undo "u" can get confused.
It's caused by "Group undo" Cudatext feature. It is option "undo_grouped". maybe turn it off, fixed.

Posted: 25.11.2018 09:10
by Alexey
For example: c, d or v
Like "change from the current cursor position up to (but not including) the next "q" character on the same line:
"ctq"
cannot understand. 'ctq' must do what? it must do "tq" and then go to insertion mode?

Posted: 25.11.2018 10:25
by oO0XX0Oo
- fix: commands Y/p must insert text at line start
- fix: commands y/p in visual/fullline mode must paste at line start
Confirmed, now they do exactly what they are supposed to do :D
It's caused by "Group undo" Cudatext feature. It is option "undo_grouped". maybe turn it off, fixed.
Ok, didn't know this. After turning it off, it doesn't get confused anymore.
cannot understand. 'ctq' must do what? it must do "tq" and then go to insertion mode?
Let's say you have this line:

Code: Select all

    nisi ut aliquip |ex ea commodo consequat. Duis aute irure dolor in reprehenderit
And the cursor is at "|" (on the space in front of "ex")
"ctq" would now remove " ex ea commodo conse" and changes to insert mode afterwards, resulting in:

Code: Select all

    nisi ut aliquip|quat. Duis aute irure dolor in reprehenderit
The character on which the caret was before typing "ctq" will be removed as well, so there is no space char anymore
"cfq" would have done the same apart that it wouldn't have stopped before the "q" in "consequat" but would include it.

"dtq" / "dfq" = Same as above without switching into insert mode afterwards
"vtq" / "vfq" = Just select the text...

Posted: 25.11.2018 13:01
by Alexey
You are a good man. tks for telling
Will see it soon.

Posted: 02.12.2018 14:11
by Alexey
it was very hard change. :-\ Added: ctq, cfq, dtq, dfq and also with F/T. Test it by "Install from Github". if ok, i will release it.

Posted: 02.12.2018 21:09
by oO0XX0Oo
Works perfectly fine!
Any chance that you will add the same motions in conjunctions with "v"?
Makes copying / pasting much easier if you can select text in this way (on the current line)...