config
By AckslD
nvim-anywise-reg.lua
Plugin for making registers content-aware beyond char- and linewise (by AckslD)
config | nvim-anywise-reg.lua | |
---|---|---|
3 | 1 | |
- | 42 | |
- | - | |
- | 0.0 | |
- | almost 3 years ago | |
Lua | ||
- | - |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
config
Posts with mentions or reviews of config.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-01-12.
-
Running code inside Neovim
I have my own custom solution for this in my config which I wrote about recently in this post.
-
What is the most interesting part of your Lua config?
I have my own way of implementing something like ftdetect in vimscript, see how it's handled here and how filetype specific things are defined here. It uses a single autocmd instead of one for each filetype like the vimscript version.
- Did you ever felt like doing daf and then p to paste a function somewhere else without having to care if the cursor is in the middle of a function or not, in the same way as doing dd followed by p to move a line somewhere? Then anywise-reg is for you.
nvim-anywise-reg.lua
Posts with mentions or reviews of nvim-anywise-reg.lua.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-07-04.
-
Did you ever felt like doing daf and then p to paste a function somewhere else without having to care if the cursor is in the middle of a function or not, in the same way as doing dd followed by p to move a line somewhere? Then anywise-reg is for you.
One of the most satisfying things, in my opinion, when using vim is the ease of doing xp or ddp to move a character to the right or a line down. The reason this works (using a single key p for pasting) is that vim keeps track of what was yanked. In particular vim keeps track if the yank was charwise, linewise or blockwise, in order to determine how the content of the register should be pasted. Now, wouldn't it be amazing if this notion could be generalised to more complex patterns, such as words (daw), paragraphs (dap) or functions and classes (daf, dac from e.g. nvim-treesitter-textobjects). This is exactly what anywise-reg does, namely extending the registers to not only have a notion of charwise, linewise and blockwise but any pattern. anywise-reg keeps track of what text-object was used for yanking (deleting, changing etc) the text (and into what register) in order to determine how to paste it. Before pasting, the cursor is simply moved to the end of the same text-object, currently under the cursor. In this way there is no hard-coded behaviour, rather the text-objects behaviour is reused and therefore any text-object could be used. This also means that it is all up to the text-object to do the correct thing. All the registers " and [0-9][a-z] are supported and anywise-reg updates for example the numbered registers when deleting text.
What are some alternatives?
When comparing config and nvim-anywise-reg.lua you can also consider the following projects:
vim-run - Run, view, and manage UNIX shell commands with ease.
nvim-treesitter-textobjects
nvim-treesitter - Nvim Treesitter configurations and abstraction layer
dotfiles
dotfiles - My dotfiles
dotfiles - [mirror] My personal dotfiles