mawww / kakoune

mawww's experiment for a better code editor
http://kakoune.org
The Unlicense
9.9k stars 713 forks source link

Extend selection page up / down #3611

Closed pickfire closed 4 years ago

pickfire commented 4 years ago

Feature

Feature parity with the rest of commands to allow current <c-f> and <c-b> which navigates between extends the page while the capitalized word is used (<c-F> and <c-B>).

Usecase

Sometimes I need to extend selection like 5 pages of my screen (52 * 5) but I need to hold down <c-J> which takes quite a while to reach there. Same should apply for <c-D> and <c-U>.

alexherbo2 commented 4 years ago

Control + Shift is not possible with the terminal.

pickfire commented 4 years ago

Aaaa, I didn't know about this. T_T How do you all easily extend over pages usually?

alexherbo2 commented 4 years ago

I don’t. xD

Screwtapello commented 4 years ago

It could be bound to Shift-PgUp and Shift-PgDn, except that most terminals reserve those for navigating scrollback.

For selecting really large amounts of text, I start using structural navigation - <a-i>{ selects a block of code, }p selects until the next blank line, etc. If you're in a CSV file or something that doesn't have multi-line structures to navigate by, maybe you can use ? to extend to the next match of a regex?

lenormf commented 4 years ago

You could mark the beginning of the selection with Z, then scroll down using whatever method you want (for example ctrl d), then use a-z i.

pickfire commented 4 years ago

It could be bound to Shift-PgUp and Shift-PgDn, except that most terminals reserve those for navigating scrollback.

I use shift-pageup and shift-pagedown to scroll commonly. So I can't use it.

}p selects until the next blank line

I need to do that like 10+ times to reach the place I want.

You could mark the beginning of the selection with Z, then scroll down using whatever method you want (for example ctrl d), then use a-z i.

a-z i? Looks interesting, this is what I am looking for. I wonder if there's a good way to see documentation for keys without searching for it like :h CTRL-F in vim.

Last time I saw https://github.com/mawww/kakoune/wiki/Selections-combinations, but I don't understand what it is saying at all. Maybe we should explain it with a good example.