hauleth / Sad.vim
Labels
Projects that are alternatives of or similar to Sad.vim
Seek and Destroy
Simple Vim plugin that allows you to quickly search and replace occurrences of text.
Visualisation
Description
This plugin provides quick search and replace mapping. Example
ab|ba <- `|` denotes cursor
baba
abba
After siwtest<ESC>
looks like:
|test
baba
abba
Nothing impressive? I agree, the same could be achieved via ciwtest<ESC>
, but
everything changes after you press .
.
test
baba
|test
Wooot? What kind of magic is that? Oh, and this also works on visual selections. Nice.
Also by the chance (and because it is also part needed for this plugin) it
provides visual *
and #
.
FAQ
s
and S
behaviour?
But what about default Just use c_
or cc
.
vim-sneak?
But what about interference between this andCreate your own maps:
" Normal mode
nmap <leader>s <Plug>(sad-change-forward)
nmap <leader>S <Plug>(sad-change-backward)
" Visual mode
xmap <leader>s <Plug>(sad-change-forward)
xmap <leader>S <Plug>(sad-change-backward)
Are there any easter eggs about name?
Not yet. And ever if there would be, then what is the point in telling you anyway?
Why not multiple cursors?
Except obvious corner cases like out of view cursor multiple cursors doesn't play well with gap buffers that are used in Vim and Emacs.
Todo
- [x]
allow setting register which will contain changed text - [x]
do not remaps
andS
if there already exist any mapping - [x]
turn search highlight right afters{movement}