Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mg979/vim-visual-multi
Multiple cursors plugin for vim/neovim
https://github.com/mg979/vim-visual-multi
cursor multiple-cursors vim
Last synced: about 1 month ago
JSON representation
Multiple cursors plugin for vim/neovim
- Host: GitHub
- URL: https://github.com/mg979/vim-visual-multi
- Owner: mg979
- License: mit
- Created: 2018-04-12T06:55:46.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-01T18:09:22.000Z (2 months ago)
- Last Synced: 2024-09-28T15:21:40.565Z (about 1 month ago)
- Topics: cursor, multiple-cursors, vim
- Language: Vim Script
- Homepage:
- Size: 1.27 MB
- Stars: 4,156
- Watchers: 33
- Forks: 79
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - vim-visual-multi
README
## vim-visual-multi
It's called ___vim-visual-multi___ in analogy with _visual-block_, but the plugin works mostly from normal mode.
Basic usage:
- select words with Ctrl-N (like `Ctrl-d` in Sublime Text/VS Code)
- create cursors vertically with Ctrl-Down/Ctrl-Up
- select one character at a time with Shift-Arrows
- press n/N to get next/previous occurrence
- press [/] to select next/previous cursor
- press q to skip current and get next occurrence
- press Q to remove current cursor/selection
- start insert mode with i,a,I,ATwo main modes:
- in _cursor mode_ commands work as they would in normal mode
- in _extend mode_ commands work as they would in visual mode
- press Tab to switch between «cursor» and «extend» modeMost vim commands work as expected (motions, r to replace characters, ~ to change case, etc). Additionally you can:
- run macros/ex/normal commands at cursors
- align cursors
- transpose selections
- add patterns with regex, or from visual modeAnd more... of course, you can enter insert mode and autocomplete will work.
### Installation
With vim-plug:
Plug 'mg979/vim-visual-multi', {'branch': 'master'}
With Vim 8+:mkdir -p ~/.vim/pack/plugins/start && git clone https://github.com/mg979/vim-visual-multi ~/.vim/pack/plugins/start/vim-visual-multi
### Documentation
:help visual-multi
For some specific topic it's often:
:help vm-some-topic
### Tutorial
To run the tutorial:
vim -Nu path/to/visual-multi/tutorialrc
### [Wiki](https://github.com/mg979/vim-visual-multi/wiki)
The wiki was the first documentation for the plugin, but many pictures are
outdated and contain wrong mappings. Still, you can take a look.You could read at least the [Quick Start](https://github.com/mg979/vim-visual-multi/wiki/Quick-start).
-------
Some (sometimes very old) random pics:-------
Insert mode with autocomplete, alignment (mappings in pic have changed, don't trust them)![Imgur](https://i.imgur.com/u5pPY5W.gif)
-------
Undo/Redo edits and selections![Imgur](https://i.imgur.com/gwFfUxq.gif)
-------
Alternate cursor/extend mode, motions (even %), reverse direction (as in visual mode) and extend from the back. At any time you can switch from extend to cursor mode and viceversa.![Imgur](https://i.imgur.com/ggQr1Ve.gif)
-------
Select inside/around brackets/quotes/etc:![Imgur](https://i.imgur.com/GAXQLao.gif)
-------
Select operator, here shown with 'wellle/targets.vim' plugin: sib, sia, saa + selection shift![Imgur](https://i.imgur.com/yM3Fele.gif)
-------
Synched column transposition![Imgur](https://i.imgur.com/9JDaLBi.gif)
-------
Unsynched transposition (cycle all regions, also in different lines)![Imgur](https://i.imgur.com/UQOCxyf.gif)
-------
Shift regions left and right (M-S-\<\>)![Imgur](https://i.imgur.com/Q7EF8YI.gif)
------
Find words under cursor, add new words (patterns stack), navigate regions, skip them, add regions with regex.![Imgur](https://i.imgur.com/zWtelNO.gif)
-------
Normal/Visual/Ex commands at cursors![Imgur](https://i.imgur.com/5aiQscj.gif)
-------
Macros. Shorter lines are skipped when adding cursors vertically.![Imgur](https://i.imgur.com/3IsZzF3.gif)
-------
Some editing functions: yank, delete, paste from register, paste block from yanked regions![Imgur](https://i.imgur.com/0jRkVdp.gif)
----------------------------------------
Case conversion
![Imgur](https://i.imgur.com/W6EP0dy.gif)