GithubHelp home page GithubHelp logo

faster way to navigate lines about amp HOT 5 OPEN

KiaraGrouwstra avatar KiaraGrouwstra commented on June 2, 2024 1
faster way to navigate lines

from amp.

Comments (5)

makouchyk avatar makouchyk commented on June 2, 2024

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

from amp.

KiaraGrouwstra avatar KiaraGrouwstra commented on June 2, 2024

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 😓

from amp.

makouchyk avatar makouchyk commented on June 2, 2024

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.

from amp.

pbgc avatar pbgc commented on June 2, 2024

@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"

from amp.

KiaraGrouwstra avatar KiaraGrouwstra commented on June 2, 2024

@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"

from amp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.