Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tssm/nvim-reflex
Operate in buffers and files at the same time
https://github.com/tssm/nvim-reflex
neovim-plugin
Last synced: 3 months ago
JSON representation
Operate in buffers and files at the same time
- Host: GitHub
- URL: https://github.com/tssm/nvim-reflex
- Owner: tssm
- Created: 2020-09-27T14:48:19.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-18T19:28:56.000Z (11 months ago)
- Last Synced: 2024-08-02T13:34:23.809Z (7 months ago)
- Topics: neovim-plugin
- Language: Lua
- Homepage:
- Size: 30.3 KB
- Stars: 8
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Operate in buffers and files at the same time. Three commands are
exposed on normal buffers (i.e. `:echo &buftype` returns an empty
string):* `:Delete` will delete the buffer and the file on disk. Will ask
to confirm before deleting a buffer with unsaved changes. Two
global variables alter its behaviour:
1. `g:reflex_delete_file_cmd` allows to use an external command
(like [trash][trash] on macOS) to delete the file.
2. `g:reflex_delete_buffer_cmd` allows to use a plugin command
to delete the buffer (like `:Bwipeout!` from [Bbye][bbye] to
avoid changing the tab layout). Make sure you pick a command
that wipes the buffer (so you don't see it on the old files
list) and operates even when there are changes.
* `:Move {filename}` will change the buffer name and the file name
relative to `:pwd`. Will ask before overwriting an existing
file.
* `:Rename {filename}` will do the same but relative to the buffer
directory.Also when you edit a file in a directory that doesn't exists it
will ask you if you want to create that directory.# Public functions
The commands are implemented on top of three public functions:
* `delete-buffer-and-file`: Takes the name of the file/buffer to
delete.
* `move` and `rename`: Takes the name of the original file and its
new location.[bbye]: https://github.com/moll/vim-bbye
[trash]: http://hasseg.org/trash/