Skip to content

Conversation

@amjith
Copy link
Contributor

@amjith amjith commented May 20, 2015

This adds the 'M' keybinding, which moves the cursor to the vertical center of the rendered lines in a buffer.

It also adds 'z-' and 'z+' bindings.

The end goal is to have this keybinding available in pyvim.

@jonathanslenders
Copy link
Member

Thanks! This is great.

I really appreciate that.

@jonathanslenders
Copy link
Member

Thank you, all three commits have been merged. Works great!

@anntzer
Copy link

anntzer commented Jul 30, 2016

Is this supposed to work e.g. in IPython 5? I often end up wth the cursor toward the bottom of my terminal emulator (KDE/Konsole)'s scroll buffer, which makes tab completion slightly painful as it only shows whatever fits in the remaining ~5 lines or so. A quick try suggests that none of z+, z- and M work there. Thanks in advance.

@jonathanslenders
Copy link
Member

Hi @anntzer,

No, this is different. The key bindings in this commit will center the text (or move it up/down) in the current input region. If I recall correctly, they only make sense when the input contains already more lines then are available in the terminal height. So, this mostly makes sense for Pyvim.

However, what you are looking for definitely makes sense and it is possible to implement that. (Can you create a new issue for that?)

What key bindings would you like for this? It does not exist in GNU readline, so I'm not sure whether I will install default key bindings for this, but maybe we could do this anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants