Skip to content

Command-line CTRL-U, CTRL-Y#17

Merged
tpope merged 1 commit into
tpope:masterfrom
justinmk:ctrl_u
Mar 15, 2019
Merged

Command-line CTRL-U, CTRL-Y#17
tpope merged 1 commit into
tpope:masterfrom
justinmk:ctrl_u

Conversation

@justinmk

@justinmk justinmk commented Jul 20, 2014

Copy link
Copy Markdown
Contributor

ref #1

  • CTRL-U in cmdline-mode stores in the @- register
  • CTRL-Y in cmdline-mode yanks from the @- register

@justinmk justinmk changed the title Command-line CTRL-U and CTRL-Y Command-line CTRL-U, CTRL-W and CTRL-Y Aug 5, 2014
@justinmk

justinmk commented Aug 5, 2014

Copy link
Copy Markdown
Contributor Author

@tpope Fully implemented ctrl-w and ctrl-u. General idea is to compare getcmdline() before & after using Vim's built-in ctrl-u/ctrl-w. Also verified that this works with multibyte characters in various combinations.

Comment thread plugin/rsi.vim Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used this approach similar to <C-T> below, because <c-\>e was causing unpleasant flicker.

@justinmk

Copy link
Copy Markdown
Contributor Author

@tpope I've been using this for a couple weeks without issue. What are your thoughts? I can add <M-BS> too if appropriate.

@belak

belak commented Apr 20, 2016

Copy link
Copy Markdown

What are the chances of this ever getting merged in? It would be really nice to use C-u

@justinmk

justinmk commented Apr 21, 2016

Copy link
Copy Markdown
Contributor Author

I can send an updated PR without the CTRL-W stuff. After using it for a long time I think CTRL-W is more trouble than it is worth. For it to be useful it needs to "append" as readline does, and that would be a lot of fiddly code. However CTRL-U is definitely useful and works without issue.

Also there's a question of what CTRL-U should do in insert-mode: should it also store in @- register?

@justinmk justinmk changed the title Command-line CTRL-U, CTRL-W and CTRL-Y Command-line CTRL-U, CTRL-Y Mar 15, 2019
@justinmk

Copy link
Copy Markdown
Contributor Author

Updated. Now only maps CTRL-U and CTRL-Y.

@tpope

tpope commented Mar 15, 2019

Copy link
Copy Markdown
Owner

I worry a bit about re-purposing @-, but I guess I'll give it a try.

@tpope tpope merged commit 8b7abe2 into tpope:master Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants