Coder Social home page Coder Social logo

vim-visual-multi's Introduction

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,A

Two 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» mode

Most 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 mode

And more... of course, you can enter insert mode and autocomplete will work.

Installation

With vim-plug:

Plug 'mg979/vim-visual-multi', {'branch': 'master'}

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

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.


Some (sometimes very old) random pics:


Insert mode with autocomplete, alignment (mappings in pic have changed, don't trust them)

Imgur


Undo/Redo edits and selections

Imgur


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


Select inside/around brackets/quotes/etc:

Imgur


Select operator, here shown with 'wellle/targets.vim' plugin: sib, sia, saa + selection shift

Imgur


Synched column transposition

Imgur


Unsynched transposition (cycle all regions, also in different lines)

Imgur


Shift regions left and right (M-S-<>)

Imgur


Find words under cursor, add new words (patterns stack), navigate regions, skip them, add regions with regex.

Imgur


Normal/Visual/Ex commands at cursors

Imgur


Macros. Shorter lines are skipped when adding cursors vertically.

Imgur


Some editing functions: yank, delete, paste from register, paste block from yanked regions

Imgur


Case conversion

Imgur

vim-visual-multi's People

Contributors

mg979 avatar antoinemadec avatar aeriksson avatar jamespharvey20 avatar nikhilp99 avatar kaplanz avatar kevinhwang91 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.