Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faster way to navigate lines #263

Open
KiaraGrouwstra opened this issue Dec 30, 2022 · 5 comments
Open

faster way to navigate lines #263

KiaraGrouwstra opened this issue Dec 30, 2022 · 5 comments

Comments

@KiaraGrouwstra
Copy link

Is your feature request related to a problem? Please describe.
After opening a file, I tend to move the cursor to the part of the file I'm interested in, which may well be down a bit.
I'd expect for e.g. PageDown to move the cursor down by a screen, but instead find it to not move the cursor at all.

Describe the solution you'd like
Have PageDown move the cursor, or have some other alternative to move the cursor by more than a line.

Describe alternatives you've considered
jjjjjjjjjjjjjjjjjjjjjjjjjjjjj

Additional context
n/a

@makouchyk
Copy link

You can try f. Don't need the cursor to move, when scrolling, as f will place it at the token anyway.

@KiaraGrouwstra
Copy link
Author

i feel like for quickly navigating thru a large file without knowing much about its contents or line numbers, f isn't really much faster than j unfortunately 😓

@makouchyk
Copy link

makouchyk commented Feb 28, 2023

I meant, you can use f after you've already found a place to edit by scrolling with m and ,.
m and , only move you "camera", the cursor stays at it's original position until you move it with f.

@pbgc
Copy link

pbgc commented Oct 4, 2023

@KiaraGrouwstra as you can read in #158 this is considered a feature and not a problem. I really like how it works! you can browse up or down ... and comeback to where you were! if you don't want to comeback .. you use the f option to choose where exactly you want to stay.
If you want to do the pageup pagedown and move the cursor .. you can define a key binding to do it!
https://amp.rs/docs/configuration/#key-bindings

Just define something like:

keymap:
  normal:
    ctrl-f:
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"
            - "cursor::move_down"

@KiaraGrouwstra
Copy link
Author

@PPGC thanks. here's a version of ~/.config/amp/config.yml i got to based on rebinding pageup/pagedown, tho the number of lines might depend on how many lines your screen can hold:

keymap:
  normal:
    page_up:
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
      - "cursor::move_up"
    page_down:
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"
      - "cursor::move_down"

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

No branches or pull requests

3 participants