GitHub - hlissner/vim-multiedit: Multiple cursors in vim, ala Sublime Text or Atom (original) (raw)
vim-multiedit - Multi-selection and editing in vim
About
Do you envy Sublime Text 2's multiple selection and editing feature? This plugin tries to fill that multi-caret shaped gap in your heart by letting you specify "regions" of text and edit them all from one place.
(This plugin is based on https://github.com/felixr/vim-multiedit by Felix Riedel <felix.riedel at gmail.com>)
Usage
" Insert a disposable marker after the cursor nmap ma :MultieditAddMark a
" Insert a disposable marker before the cursor nmap mi :MultieditAddMark i
" Make a new line and insert a marker nmap mo o:MultieditAddMark i nmap mO O:MultieditAddMark i
" Insert a marker at the end/start of a line nmap mA $:MultieditAddMark a nmap mI ^:MultieditAddMark i
" Make the current selection/word an edit region vmap m :MultieditAddRegion nmap mm viw:MultieditAddRegion
" Restore the regions from a previous edit session nmap mu :MultieditRestore
" Move cursor between regions n times map ]m :MultieditHop 1 map [m :MultieditHop -1
" Start editing! nmap M :Multiedit
" Clear the word and start editing nmap C :Multiedit!
" Unset the region under the cursor nmap md :MultieditClear
" Unset all regions nmap mr :MultieditReset