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

docs(readme): enhance leap-to-line example code #150

Closed
wants to merge 1 commit into from

Conversation

rish987
Copy link

@rish987 rish987 commented May 8, 2023

Piggybacking off of my last PR, I also wanted to propose some enhanced code for using Leap to leap to a particular line, which effects the following:

  • places the targets at the first non-whitespace character on a line (since that is most likely where you are going to be looking when you leap to a line)
  • parameterized to also let you put the targets at the end of each line
  • parameterized to also let you jump to empty lines

asciicast

@ggandor
Copy link
Owner

ggandor commented May 11, 2023

Hi, thanks! Feel free to share this in a gist (or plugin), but I think such easymotion-isms are unidiomatic, and go against the philosophy of Leap. The intended use case of the leap-to-line example is linewise operations and selections. Anything more specific, jumping to the first non-blank character, to the end of the line, or empty lines can be achieved by the normal 2-char pattern mode (char-char, char-space, space-space, respectively), without the cognitive overhead of thinking about special kinds of motions and their idiosyncratic keymappings.

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

Successfully merging this pull request may close these issues.

2 participants