-
Notifications
You must be signed in to change notification settings - Fork 461
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
How can I traverse functions with jump list? #479
Comments
You want a new keymap to back and forth for the jumps which are just caused by |
g + D/d/h,all jumps about function, and live_grep jumps if possible |
Maybe a stand alone plugin is needed to solve it. |
Perhaps this one: |
@goodpaperman P.S. The official term in nvim of jump stack is "jump list". |
@goodpaperman I would like to provide a vim-builtin solution. If you need a location that you can jump to that is independent of what you do later, you can use a global mark (
AFAIK Bram doesn't have a plan to implement features like "jump list modification". (Sorry I can't find that issue for the time being) |
that's right |
do you meaning make the function jump list by global mark? some comstomization is needed, I think. |
It seems to be a jump list manager, not what I want |
Yep, but you can go far beyond this. First you should create a mark list (the marks in this list are not commonly used [directly]), and then implement this feature by maintaining a stack + calling |
Quantitative limitation for this solution? vim has 26 global marks at most, when I browse large project, that maybe not enough.. |
Then from another perspective. If you just don't want search jumps to be recorded in the jump list, you could define your own mapping like this (just an example): ["n|<A-n>"] = map_cr("keepjumps normal n"):with_noremap():with_silent(), -- search forward
p.s., You can also use Lines 107 to 111 in d0d63ad
If you don't prefer to open this in a split, you can change it to: "nnoremap <silent> <leader>h :ClangdSwitchSourceHeader<CR>", |
how about this? https:/asbjornhaland/telescope-send-to-harpoon.nvim with harpoon.nvim |
I know your idea: filter out other jumps to keep the jump list only record function jumps. knowlege about switch between cpp & h is useful, I have change my configures. thanks a lot~ |
Learn much from the demo video, harpoon focus on jumps between files, auto saves positions when switch buffer or quit, but jumps inside a large file is not supported, maybe need a little customize, I will refer to it, thanks a lot~ |
@goodpaperman I think maybe you'll be interested with this plugin: https:/DNLHC/glance.nvim |
Feature description
commonly I use g + d/D/h jump between functions, from calling point to definition, and vice versa.
I go back and forth by Ctrl + I/O with jump stacks, but when I do some searches between function jumps, it becomes a real mess !
so, I want to know if there any standalone jump stack for functions (and shortcuts, too), it will be useful if one just want to read code, after reading currrent function, he can go back the calling place by a simple command, no matter how many searches there are in this file.
can nvim support this feature? or tell me how if it has been supported.
thanks a lot~
Additional information
jump stacks in vim (:ls)
The text was updated successfully, but these errors were encountered: