nvim-anywise-reg.lua

Plugin for making registers content-aware beyond char- and linewise (by AckslD)

Nvim-anywise-reg.lua Alternatives

Similar projects and alternatives to nvim-anywise-reg.lua

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better nvim-anywise-reg.lua alternative or higher similarity.

nvim-anywise-reg.lua reviews and mentions

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.
    4 projects | /r/neovim | 4 Jul 2021
    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.

Stats

Basic nvim-anywise-reg.lua repo stats
1
42
0.0
almost 3 years ago

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com