Timeline for how to map the Y key (shift + y) to copy from the current cursor position instead of copying the entire line?
Current License: CC BY-SA 4.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 19, 2020 at 23:55 | vote | accept | Lucas Martins Soares | ||
Nov 19, 2020 at 23:48 | answer | added | filbranden | timeline score: 2 | |
Nov 19, 2020 at 23:40 | comment | added | B Layer | Phew! ;) You're welcome. There may be other interesting alternatives offered by someone else. I'm juggling another answer right now so I'll add that as an answer later if no one beats me to it. | |
Nov 19, 2020 at 23:38 | comment | added | Lucas Martins Soares | @BLayer that worked. Thank you very much. | |
Nov 19, 2020 at 23:36 | comment | added | B Layer |
Just :nnoremap Y ly then. At that point you can enter b or whatever leftward movement you want and the proper text is yanked including the character the cursor had been over. That's what u want, right? (If it's not right I'll let the next person handle this one...lol)
|
|
Nov 19, 2020 at 23:19 | comment | added | Lucas Martins Soares | Let us continue this discussion in chat. | |
Nov 19, 2020 at 23:15 | comment | added | Lucas Martins Soares | has it become clearer now? @BLayer | |
Nov 19, 2020 at 23:15 | history | edited | Lucas Martins Soares | CC BY-SA 4.0 |
added 202 characters in body
|
Nov 19, 2020 at 23:09 | comment | added | B Layer |
The p key puts. It doesn't copy/yank...but the title says "copy after the cursor". It's a bit confusing. I suggest you adopt the Vim lingo for the sake of accuracy. So you want to put with Y , I guess.
|
|
Nov 19, 2020 at 23:08 | comment | added | Lucas Martins Soares | @BLayer it's done. | |
Nov 19, 2020 at 23:06 | history | edited | Lucas Martins Soares | CC BY-SA 4.0 |
added 59 characters in body
|
Nov 19, 2020 at 23:04 | comment | added | Lucas Martins Soares | @BLayer not really. this will copy the rest of the line. I would like to copy from the current cursor position, not the previous one. I will improve my question. | |
Nov 19, 2020 at 22:56 | history | asked | Lucas Martins Soares | CC BY-SA 4.0 |