Skip to content

Navigate back and forward #408

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

Open
kappq opened this issue Feb 18, 2024 · 12 comments
Open

Navigate back and forward #408

kappq opened this issue Feb 18, 2024 · 12 comments

Comments

@kappq
Copy link

kappq commented Feb 18, 2024

🚀 The feature, motivation and pitch

One feature that I'm missing from Obsidian is the ability to navigate back and forward. Ideally it would be in the form of two new commands: :ObsidianBack and :ObsidianForward.

Alternatives

I realize that this can somewhat be achieved using CTRL-O and CTRL-I, however it's not quite the same for two reasons:

  • the jumplist includes cursor positions even within the same file (sometimes you need to press CTRL-O multiple times to actually jump back to your previous note);
  • the jumplist is universal (it's shared across all buffers), while in Obsidian each note has a different "jumplist".

Additional context

No response

@kappq
Copy link
Author

kappq commented Feb 18, 2024

I would be willing to build this myself, however I'm not very familiar with Lua nor with how Neovim plugins are built so it will probably take a while.

@armaninux
Copy link

I second this feature request!

@sotte
Copy link
Contributor

sotte commented Mar 4, 2024

I assume :ObsidianForward and :ObsidianBackward should just cycle through the already opened notes?!

If so, you can just use :bnext and :bprevious to jump to the next/prev buffer. These commands are often mapped to ]b and [b or similar.

Alternatively, you can use :Telescope buffers to jump to the open buffers.

I think this should solve your issue.

@kappq
Copy link
Author

kappq commented Mar 4, 2024

I assume :ObsidianForward and :ObsidianBackward should just cycle through the already opened notes?!

If so, you can just use :bnext and :bprevious to jump to the next/prev buffer. These commands are often mapped to ]b and [b or similar.

Alternatively, you can use :Telescope buffers to jump to the open buffers.

I think this should solve your issue.

It shouldn't cycle through the already open notes, it should follow (either backwards or forward) the chain of notes that the user created by following various links, which is different from notes opened in different buffers. In fact, when you click on a link in Obsidian, it doesn't actually open it in a new tab, but in place of the current note. This also means that you can get to the same note in various ways.

@armaninux
Copy link

armaninux commented Mar 4, 2024 via email

@sotte
Copy link
Contributor

sotte commented Mar 4, 2024

Ah, I see. Slightly different indeed. Thanks for clarifying.

@sotte
Copy link
Contributor

sotte commented Mar 27, 2024

I think this plug-in does what u want: https://github.com/volskaya/windovigation.nvim

@mscott99
Copy link
Contributor

I had the same issue and started to use ctrl-O and ctrl-I more. Not quite the same, but usually does the job. And no need for a plugin.

@777uliahshafar
Copy link

This is need more development, I am sure many people would love it.

@hwamil
Copy link

hwamil commented Oct 17, 2024

Yeah I'm missing this feature since I've used vimwiki's back feature (mapped to backspace by default).
Was quite handy in quick navigation.

@sotte
Copy link
Contributor

sotte commented Oct 18, 2024

Please try windovigation.nvim.

@777uliahshafar
Copy link

vim-bufsurf is similar to windovigation, but it is more suitable to my expectation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants