~foosoft/revolver.nvim

Neovim plugin for alternating between related files
2b9f4246 — Alex Yatskov 23 days ago
Remove print
f4adb219 — Alex Yatskov 23 days ago
Cleanup
9a2e1efa — Alex Yatskov 23 days ago
Update README

refs

master
browse  log 
25.3.30.0
browse  .tar.gz 

clone

read-only
https://git.sr.ht/~foosoft/revolver.nvim
read/write
git@git.sr.ht:~foosoft/revolver.nvim

You can also use your local clone with git send-email.

#Revolver

Revolver is a Neovim extension for jumping between related files in a common directory. The primary use case is "header flipping" in C/C++, but this plugin can be useful whenever semantically related information is split between different files. Revolver rotates between files that share a common prefix after stripping one of the predetermined suffixes. This suffix is typically the file extension, but can include a part of the filename as well.

#Configuration

The plugin is configured via the setup function. Options may be provided to change the default settings shown below.

require('revolver').setup({
    '.c',
    '.cpp',
    '.h',
    '.hpp',
    '.inl'
})

#Commands

Commands have no keyboard bindings by default. Specify your own mappings as needed.

For the following examples, imagine that you have the files foo.cpp, foo.h, and foo.inl in a directory and are currently editing foo.cpp.

#Revolve

Invoking the Revolve command will open foo.h. Subsequent invocation will cause foo.h and foo.inl to open before wrapping back around to foo.cpp. The order that files are opened in corresponds to the ordering of suffixes provided to the setup function.

#RevolveBack

This command is similar to Revolve with the difference being that suffix rotation occurs backwards. The first file to be opened would be foo.inl, followed by foo.h, and finally foo.cpp again.

Do not follow this link