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

Way to move to the last sibling before blank line? #24

Open
mo29cg opened this issue Sep 2, 2024 · 3 comments
Open

Way to move to the last sibling before blank line? #24

mo29cg opened this issue Sep 2, 2024 · 3 comments

Comments

@mo29cg
Copy link
Contributor

mo29cg commented Sep 2, 2024

I think it will be useful if there is a way to move to the last one of the same indentation before blank line.
I want to skip import lines and jump directly to the start of code, in a file like this

import something from "some"
import "bob" from "bob"
import "alice" from "alice"

const hello = () =>{
   console.log("hello")
}

I can jump to } at the last as it's the last of the same indentation, but not the last import line.
Especially useful when there is a lot more imports, and many languages including python have you write many imports.

@mltony
Copy link
Owner

mltony commented Sep 2, 2024

Interesting suggestion.

Specifically for skipping python imports you can try commands like control+NumPad2 and control+NumPad8 - these will take you to the next line skipping clutter. Where clutter is defined as a regular expression, and by default it does include python imports.

Are there any other use cases for your proposal? It definitely falls into the general theme of structural code navigation. I'll need to think more about it to see if there are more good use cases.

@mltony
Copy link
Owner

mltony commented Sep 2, 2024

Another thought: in one of recent NVDA versions I remember they introduced customized paragraph navigation, where IIRC a paragraph can be defined as chunk of text surrounded by blank lines. So maybe you can try these commands? LMK if that doesn't work for your use case.

@mo29cg
Copy link
Contributor Author

mo29cg commented Sep 3, 2024

control+NumPad2 and control+NumPad8

I didn't know this,it definitely works for the use case I described, thank you.

As for other use cases, it will be useful when there is a lot of properties in a class like below, and want to skip it.

class Example {
  private test;
  private bob;
  private alice;

  sayHello(){
   console.log("hello")
  }
}

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

2 participants