Closed crucialfelix closed 8 years ago
Hi,
I presume you mean the shortcuts crtl+alt+command+up/down? For now I kind of use those instead of page up, page down as they naturally fall on more meaningful points ... but I can see your point.
I don't think it's too difficult to solve but It would be worthwhile to think how it would work I grab a couple of screenshots for you to explain what I mean. And also if it was an option in setting or a modifier key.
Just because I don't really find I would use it that much ... like it is rare that I want to move from one function to the next ... they are normally further apart than that in which case I click on them in the panel.
I will put some images up to explain ...
Geza
Take a look at what I am thinking hopefully it make sense. What is the behaviour you would expect to happen when you run out of items to move onto at the same level of indentation?
Option C is possibly too silly ...
I mean in addition to, not replacing or changing the current. They are different types of navigation with different names and we can assign them to key commands.
So
line 114, next-fold-at-current-level
would not move because there is nothing below it.
line 114, prev-fold-at-current-level
would go to 83
but this is a better example:
line 49, next-fold-at-current-level
would go to 139
line 165, next-fold-at-current-level
would go to 170
line 170, next-fold-at-current-level
would go to 175
In VIM I think this is normally [[
or ]]
I only looked at your package because I just want to navigate by method. or if markdown syntax had correct folding for headings then we could navigate by section.
python or ES2105 has classes, so it makes a lot of sense. it is less obvious if (like your example) you have prototype definitions that are not nested inside a class.
I want to fly up and down the orange ones:
While you are at it you could add up level / back down level.
Ok I get most of what you are saying ...
While you are at it you could add up level / back down level.
Is this what you mean ?
but this is a better example:
line 49, next-fold-at-current-level would go to 139 line 165, next-fold-at-current-level would go to 170 line 170, next-fold-at-current-level would go to 175
This is a very simple example btw and it's obvious in this case what would happen. I pointed out a special case deliberately when it's not so obvious what the expected behaviour is. That is why I brought up an example not class / method based as well. (because we have other types of files as well)
However one thing for sure you have a point. One must be able to bound the navigation to levels. So you can navigate functions for example as you are looking at it. So I will implement what you are suggesting with some options as well.
Thank you for the suggestion.
Cool, looking forward to it.
You might want to keep some history so that if you go up then back down you would go to the same level you were on.
Hey,
I have updated the package so now it has the option to navigate within the same level. Check it out. There are many more options including the ability to search within folds and limit the depth on the folds displayed.
Take a look ... https://github.com/turigeza/fold-navigator/blob/master/README.md
I went with option D because it was the easiest to implement.
Let me know what you think and if that does the job for you.
Thank you ! I will give it a try tomorrow.
Hi, it works great. Thanks again !
Hi - What I would love to do is to navigate between items all on the same fold level.
If you are inside a class then this navigates across the methods.
Would this be possible ?
thanks !