fabianuntermoser7k downloadsNavigate to the next and previous file in the current directory.
This Obsidian Plugin adds commands to quickly navigate between neighbouring files.
Install from the Obsidian community store.
Navigating with shortcuts
obsidian-neighbouring-files.webm
Navigating with the mobile floating action button
Default commands:
Additional commands:
Sorting modes:
The default command uses the same sort order as the File explorer. Set a fallback in the plugin settings.
Markdown only by default. In the settings you can:
On mobile, a floating button appears when a note is open. Gestures:
Set gesture commands in settings under Mobile, or long-press the button. Haptics toggle available.
Open Settings -> Hotkeys, search neighbouring-files, and assign keys to the commands you need. The command IDs follow the command names (e.g. neighbouring-files:next).
Instead of Obsidian hotkeys, use the obsidian-vimrc-support plugin to map keys like gn or gp.
Caveat: works only when editor mode is on.
Example .obsidian.vimrc:
" navigation to neighbouring files
exmap next_file obcommand neighbouring-files:next
exmap prev_file obcommand neighbouring-files:prev
exmap next_file_alphabetical obcommand neighbouring-files:next-alphabetical
exmap prev_file_alphabetical obcommand neighbouring-files:prev-alphabetical
exmap older_file_created obcommand neighbouring-files:older-created
exmap newer_file_created obcommand neighbouring-files:newer-created
exmap older_file_modified obcommand neighbouring-files:older-modified
exmap newer_file_modified obcommand neighbouring-files:newer-modified
exmap folder_up obcommand neighbouring-files:folder-up
exmap folder_down obcommand neighbouring-files:folder-down
exmap folder_next obcommand neighbouring-files:folder-next
exmap folder_prev obcommand neighbouring-files:folder-prev
nmap gn :next_file<cr>
nmap gp :prev_file<cr>
nmap fu :folder_up<cr>
nmap fd :folder_down<cr>
nmap fn :folder_next<cr>
nmap fp :folder_prev<cr>
Open source on GitHub. Issues and PRs welcome.