mdr icon indicating copy to clipboard operation
mdr copied to clipboard

Add some kyebinding

Open skanehira opened this issue 5 years ago • 5 comments

skanehira avatar Jan 22 '20 01:01 skanehira

Could you explain why you choose those keys ?

MichaelMure avatar Jan 22 '20 13:01 MichaelMure

@MichaelMure Added keys just like a Vim keybinding. I think this is a useful keybinding for many Vim users :)

skanehira avatar Jan 22 '20 13:01 skanehira

I'm a bit confused.

https://hea-www.harvard.edu/~fine/Tech/vi.html say that:

  • Ctrl+U and Ctrl+D are going up and down half a screen, not go to beginning or end
  • g is not used by default
  • G is going to a specified line, which make more sense to me, even though the concept of line is a bit blurry here (source line ? rendered line ?)

@afranke what do you think ?

MichaelMure avatar Jan 24 '20 11:01 MichaelMure

For page up/down in vim I do ctrl+f/ctrl+b. I never use the u/d ones. I use gg to go back to beginning of file all the time, and G to go to end of file. These should map well to mdr.

Of course I also use 42G to go to line 42. What that should do in mdr is show the output that matches the 42nd line from the source file in the middle of the screen, I reckon.

afranke avatar Jan 24 '20 12:01 afranke

Of course I also use 42G to go to line 42. What that should do in mdr is show the output that matches the 42nd line from the source file in the middle of the screen, I reckon.

The mapping from source line to output line is entirely lost when going through the parser.

MichaelMure avatar Jan 24 '20 16:01 MichaelMure