A Neovim plugin for moving and duplicating lines and blocks with fold handling, reindenting, and unified undo.
nvim-gomove is a Neovim plugin designed to streamline moving and duplicating lines and blocks of code. It solves the problem of fragmented text manipulation in Vim/Neovim by combining movement, fold handling, reindenting, and undo into cohesive operations. The plugin provides smart keybindings that work across normal, visual, line-visual, and block-visual modes.
Neovim users who frequently restructure code, such as developers refactoring, rearranging functions, or adjusting data structures. It's particularly useful for those who want more reliable and intuitive text movement than built-in Vim commands offer.
Developers choose nvim-gomove because it handles edge cases like folds and indentation automatically, provides unified undo steps, and offers both sensible defaults and deep customization. It builds on existing Vim solutions but adds polish and completeness that save time and reduce errors.
A complete plugin for moving and duplicating blocks and lines, with complete fold handling, reindenting, and undoing in one go.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Default Alt+h/j/k/l keybindings provide consistent movement and duplication across normal, visual, line-visual, and block-visual modes, reducing the need to memorize multiple commands.
Intelligently preserves or navigates around code folds during moves, preventing broken structure when refactoring folded sections, as highlighted in the features list.
Automatically reindents lines moved vertically and removes trailing whitespace for blocks, maintaining code style without manual intervention per the README.
Groups move and duplicate actions into single undo steps with the undojoin option, ensuring cleaner undo history as described in the key features.
Only compatible with Neovim v0.5 or later, excluding users on standard Vim or older Neovim versions, limiting its reach in mixed environments.
Default Alt-based mappings can clash with other plugins or terminal emulators, requiring manual customization that may be non-trivial for some setups.
Customizing mappings or behavior requires Lua knowledge and understanding of Neovim's plug system, which could be a barrier for users accustomed to simpler Vim script.