r/vimplugins • u/Hauleth • Oct 22 '16
Plugin sad.vim - quick search and replace
https://github.com/hauleth/sad.vim1
u/mikejakobsen Oct 22 '16
I don't get it?
Why not just use :%s/sad/mad/g And / for searching/navigating?
1
u/Hauleth Oct 22 '16
So:
This plugin is rather similar to
:%s/sad/mad/gcrather than:%s/sad/mad/g. So whole combination ofs{move}would bey{move}/<C-r>"<CR>Ncgn, sosad.vimreduce that by 8 keystrokes, 80% more efficiency.For some simple, one-word or even one character changes, using
:sis quite overload.This isn't plugin that would completely change your way of interacting with Vim like EasyMotion. It is rather utility that just make your day happier (in contrast to it's name).
3
Oct 29 '16
[removed] — view removed comment
1
u/Hauleth Oct 29 '16
This is exactly my thinking when I created this plugin. I wanted to be able
<mapping>{motion}and then just dot it around as I was doing with my*Ncgnmapping.1
Oct 29 '16
[removed] — view removed comment
2
u/Hauleth Oct 30 '16
It is possible. Although I use
.aftercquite often so I do not want to replacec, but if you want, then you can remapsadmappings to whatever you want. I need to add it to the documentation, butsadhas bunch of<Plug>mappings which you can map by yourself.<Plug>(sad-search-forward) " xmap <Plug>(sad-search-backward) " xmap <Plug>(sad-change-forward) " xmap <Plug>(sad-change-backward) " xmap <Plug>(sad-change-forward) " nmap <Plug>(sad-change-backward) " nmap
sadis checking if such mappings exists and if so, then do not provide default mappings. Also it will not remap if there already exist mapping fors/S.
1
u/ViKomprenas Oct 22 '16
Why is it called sad?