" Does not work on pending 'blocks', only single lines
"
" Given:
" it "foo bar" do
"   pending("bla bla"
"
" Produce:
" xit "foo bar" do
"
function! ChangePendingRspecToXit()
  " Find the next occurrence of pending
  while(search("pending(") > 0)
    " Delete it
    normal dd
    " Search backwards to the it block
    ?it\s
    " add an 'x' to the 'it' to make it 'xit'
    normal ix
  endwhile
endfunction

nnoremap <silent> ,rxit :call ChangePendingRspecToXit()<cr>

" insert a before { } block around a line
nnoremap <silent> ,bf ^ibefore { <esc>$a }


" Does not work on pending 'blocks', only single lines
"
" Given:
" it "foo bar" do
"   pending("bla bla"
"
" Produce:
" xit "foo bar" do
"
function! ChangePendingRspecToXit()
  " Find the next occurrence of pending
  while(search("pending(") > 0)
    " Delete it
    normal dd
    " Search backwards to the it block
    ?it\s
    " add an 'x' to the 'it' to make it 'xit'
    normal ix
  endwhile
endfunction

nnoremap <silent> ,rxit :call ChangePendingRspecToXit()<cr>

" insert a before { } block around a line
nnoremap <silent> \bf ^ibefore { <esc>$a }


Change ,bf mapping conflicting with buffer list ,b
Change ,bf mapping conflicting with buffer list ,b

ChrisMcKenzie/dotfiles,jf87/dotfiles-yadr,btroo/dotfiles,mdarnall/dotfiles,Sumukh/dotfiles,fayimora/dotfiles,uhjish/dotfiles,pruan-rht/dotfiles,thekindofme/dotfiles,chenhoward/dotfiles,codedecay/dotfiles-1,gupta-tarun/dotfiles,backus/yadr,lhrkkk/dotfiles_old_2015_11_01,kanche/dotfiles,kirthar/dotfiles,drajguru/dotfiles,denyago/dotfiles,josanastrid/dotfiles,nrolland/dotfiles,gizero/dotfiles,nyxwulf/dotfiles,LouTheBrew/dotfiles,cfabianski/yadr-dotfiles,tientun/dotfiles,uhjish/dotfiles,zhang-ning/yadr,captainmike/dotfiles,fayimora/vps_dotfiles,kqyang/dotfiles,sevenadrian/dotfiles,tripl3inf/dotfiles,wesleyskap/dotfiles-1,nakolkin/dotfiles,ptgamr/dotfiles-2,kdheepak89/yadr-dotfiles,nyxwulf/dotfiles,uhjish/dotfiles,SherrySeibel/dotfiles,kerbyfc/kdr,kqyang/dotfiles,lhrkkk/yadr,negativo/dotfiles-2,pswaminathan/dotfiles,mba811/dotfiles,ChrisMcKenzie/dotfiles,bob2314/dotfiles-1,fernandoaleman/yadr,lfilho/dotfiles,NikitaAvvakumov/dotfiles,tkuichooseyou/dotfiles,ofer987/dotfiles,barodeur/dotfiles,ds82/dotfiles,rbrcurtis/yadr,zhenyuy-fb/dotfiles,bob2314/dotfiles-1,LouTheBrew/dotfiles,joeyyang/yadr,zelga/dotfiles,41407/dotfiles,fayimora/dotfiles-1,jby/dotfiles,rhysyngsun/dotfiles,ohnorobo/dotfiles,koheku/dotfiles,hophacker/dotfiles,kylewest/yadr,diego9627/dotfiles,yjlintw/dotfiles,sayar/dotfiles,yjlintw/dotfiles,wesson-yi/dotfiles,valentinzberea/dotfiles-yadr,jo-tez/yadr,ccll/dotfiles,1gitGrey/dotfiles-1,tonynguyen68/dotfiles,hderms/dotfiles,fongoses/dotfiles,RyanMacG/dotfiles-1,argami/dotfiles,javigon/dotfiles,akitaonrails/dotfiles,tallamjr/yadr-fork,lhrkkk/yadr,valentinzberea/dotfiles-yadr,ashlynbaum/dotfiles,neilor/dotfiles,cantoraz/yadr,skwp/dotfiles,pulni/mac_dotfiles,ktemkin/dotfiles,walkleyn/dotfiles,fabiopelosin/dotfiles,aqibmushtaq/dotfiles,aeikenberry/yardr_dotfiles,agamble/dotfiles,jckdrpr/dotfiles-1,flyingfsck/dotfiles,hderms/dotfiles,argyakrivos/dotfiles,mpeter/dotfiles,renoirb/ubuntu-yadr,xvaara/dotfiles,goorockey/dotfiles,hunterowens/dotfiles-2,bobek/dotfiles,hunterowens/dotfiles-2,mcmonkeyman/mcmonkeymans-fork-o-dotfiles,uhjish/dotfiles,mrap/linux-dotfiles,c-j-j/dotfiles-yadr,romansalin/dotfiles,trongrg/dotfiles,andreazevedo/mac_dotfiles,brazencavalier/dotfiles,codedecay/dotfiles-1,summera/yadr-alt,xvaara/dotfiles,negativo/dotfiles-2,uhjish/dotfiles,333fred/dotfiles_yadr,ramiroaraujo/dotfiles,periodic1236/dotfiles,uhjish/dotfiles,josanastrid/dotfiles,uhjish/dotfiles,ttriggs/dotfiles,bcrochet/dotfiles,patarra/dotfiles,tokeryberg/dotfiles-2,rchampourlier/dotfiles,cantoraz/yadr,sideci-sample/sideci-sample-dotfiles,tmullen/dotfiles,andreazevedo/mac_dotfiles,Xiaobin0860/dotfiles,ernestonakamura/dotfiles,kerbyfc/kdr,kierangraham/dotfiles,fayimora/vps_dotfiles,marcvreuls/dotfiles,lhrkkk/yadr,epelz/dotfiles,neilor/dotfiles,stevenbarragan/dotfiles,andrewSC/dotfiles,davidjaw/dotfiles,KonradJanica/yadr-tm,j-mcnally/dotfiles,flyingfsck/dotfiles,giorni/dotfiles,gupta-tarun/dotfiles,michaeljacobdavis/dotfiles-yadr,hunterowens/dotfiles-2,barodeur/dotfiles,mdarnall/dotfiles,periodic1236/dotfiles,juvoni/dotfiles-1,hophacker/dotfiles,ofer987/dotfiles,j-mcnally/dotfiles,eesdil/yadr,jckdrpr/dotfiles-1,RyanMacG/dotfiles-1,captainmike/dotfiles,walkleyn/dotfiles,yjlintw/dotfiles,koheku/dotfiles,GiorgioNatili/vim,sangtt/mdotfiles,KonradJanica/yadr-tm,333fred/dotfiles_yadr,jby/dotfiles,bcrochet/dotfiles,tallamjr/yadr-fork,svdberg/dotfiles,eywalker/walkspace,olslash/dotfiles,uni380/dotfiles,kierangraham/dotfiles,nikolai-b/dotfiles,tkuichooseyou/dotfiles,xkonni/dotfiles,fabiopelosin/dotfiles,jckdrpr/dotfiles-1,hulajesus/dotfiles,sandeepjain/dotfiles,bobek/dotfiles,lfilho/dotfiles,tientun/dotfiles,Sumukh/dotfiles,olslash/dotfiles,phongjalvn/dotfiles,rockwarrior/dotfiles,ignasi/dotfiles,cfabianski/yadr-dotfiles,tmullen/dotfiles,NikitaAvvakumov/dotfiles,romansalin/dotfiles,pietia/yadr,andyattebery/dotfiles,giorni/dotfiles,diego9627/dotfiles,juvoni/dotfiles-1,btroo/dotfiles,skjerven/dotfiles,katgironpe/dotfiles,kierangraham/dotfiles,joesus/dotfiles,gnpkrish/yadr,minhoolee/skwp-dotfiles,trongrg/dotfiles,tosbourn/dotfiles,kerbyfc/kdr,pietia/yadr,pairshaped/dotfiles,lhrkkk/dotfiles_old_2015_11_01,rrmartins/my_yadr,pulni/mac_dotfiles,marcvreuls/dotfiles,skwp/dotfiles,joeyyang/yadr,nkgm/dotfiles,mpeter/dotfiles,zhang-ning/yadr,41407/dotfiles,rhysyngsun/dotfiles,drajguru/dotfiles,qianthinking/dotfiles,theone4ever/dotfiles,tripl3inf/dotfiles,stinoga/dotfiles-1,epelz/dotfiles,sangtt/mdotfiles,uhjish/dotfiles,tokeryberg/dotfiles-2,mrap/linux-dotfiles,mente/dotfiles,pietia/yadr,ktemkin/dotfiles,uhjish/dotfiles,swinstanley/dotfiles-1,tigershen23/dotfiles,argyakrivos/dotfiles,dsimmons/dotfiles-old,Witos/dotfiles,mrap/dotfiles,ay65535/yadr,ashlynbaum/dotfiles,sayar/dotfiles,nrolland/dotfiles,fayimora/dotfiles,michaeljacobdavis/dotfiles-yadr,atsapov/dotfiles,diego-oliveira/dotfiles-1,rockwarrior/dotfiles,mba811/dotfiles,thekindofme/dotfiles,goorockey/dotfiles,kdheepak89/yadr-dotfiles,jameszaghini/dotfiles,tyok/dotfiles,fernandoaleman/yadr,davidjaw/dotfiles,sideci-sample/sideci-sample-dotfiles,tonynguyen68/dotfiles,qianthinking/dotfiles,Jojo-Jojovich/dotfiles,alex-wood/dotfiles,davepgreene/yadr,minhoolee/skwp-dotfiles,gnpkrish/yadr,summera/yadr-alt,robinrob/framework,fogisland/dotfiles,eesdil/yadr,ccll/dotfiles,neanias/dotfiles,plribeiro3000/dotfiles,talbright/skwp-dotfiles,ChrisMcKenzie/dotfiles,skjerven/dotfiles,xkonni/dotfiles,ptgamr/dotfiles-2,renoirb/ubuntu-yadr,xytis/dotfiles,mente/dotfiles,plribeiro3000/dotfiles,wesleyskap/dotfiles-1,ramiroaraujo/dotfiles,Xiaobin0860/dotfiles,andrewSC/dotfiles,rockymontana/skwp-dotfiles,lyanderson/dotfiles,ignasi/dotfiles,demis001/dotfiles,gnpkrish/yadr,mrap/dotfiles,raiseandfall/vim-tmux-dotfiles,swinstanley/dotfiles-1,raiseandfall/vim-tmux-dotfiles,kierangraham/dotfiles,renoirb/ubuntu-yadr,stinoga/dotfiles-1,1gitGrey/dotfiles-1,atsapov/dotfiles,alex-wood/dotfiles,K3yChain/yadr,uni380/dotfiles,pruan-rht/dotfiles,martco/yadr,agamble/dotfiles,robinrob/framework,kqyang/dotfiles,sevenadrian/dotfiles,argami/dotfiles,nyxwulf/dotfiles,stevenbarragan/dotfiles,denyago/dotfiles,aeikenberry/yardr_dotfiles,GiorgioNatili/vim,pairshaped/dotfiles,rbrcurtis/yadr,ashlynbaum/dotfiles,jo-tez/yadr,mente/dotfiles,fayimora/dotfiles-1,ohnorobo/dotfiles,backus/yadr,brazencavalier/dotfiles,aqibmushtaq/dotfiles,phongjalvn/dotfiles,davepgreene/yadr,nikolai-b/dotfiles,minhoolee/skwp-dotfiles,minhoolee/skwp-dotfiles,SherrySeibel/dotfiles,kirthar/dotfiles,wesson-yi/dotfiles,ds82/dotfiles,fayimora/vps_dotfiles,auser/yadr,tyok/dotfiles,pulni/mac_dotfiles,ds82/dotfiles,hulajesus/dotfiles,leiklier/dotfiles,sztupy/dotfiles,Witos/dotfiles,nakolkin/dotfiles,fongoses/dotfiles,rockymontana/skwp-dotfiles,tigershen23/dotfiles,renoirb/ubuntu-yadr,chenhoward/dotfiles,fayimora/dotfiles-1,talbright/skwp-dotfiles,barodeur/dotfiles,c-j-j/dotfiles-yadr,javigon/dotfiles,martco/yadr,andrewSC/dotfiles,qianthinking/dotfiles,demis001/dotfiles,lyanderson/dotfiles,333fred/dotfiles_yadr,xytis/dotfiles,xytis/dotfiles,andyattebery/dotfiles,bionix/dotfiles-1,diego-oliveira/dotfiles-1,macat/dotfiles,fogisland/dotfiles,dsimmons/dotfiles-old,eesdil/yadr,sandeepjain/dotfiles,eywalker/walkspace,K3yChain/yadr,tullie/yadr-tm,rrmartins/my_yadr,nkgm/dotfiles,bionix/dotfiles-1,katgironpe/dotfiles,lhrkkk/yadr,mcmonkeyman/mcmonkeymans-fork-o-dotfiles,kylewest/yadr,tosbourn/dotfiles,tullie/yadr-tm,ay65535/yadr,jameszaghini/dotfiles,svdberg/dotfiles,pietia/yadr,sztupy/dotfiles,auser/yadr,daxgames/dotfiles,phongjalvn/dotfiles,neanias/dotfiles,kanche/dotfiles,lfilho/dotfiles,daxgames/dotfiles,ernestonakamura/dotfiles,zhenyuy-fb/dotfiles,pswaminathan/dotfiles,swanandp/dotfiles,wesson-yi/dotfiles,joesus/dotfiles,rchampourlier/dotfiles,Jojo-Jojovich/dotfiles,ttriggs/dotfiles,leiklier/dotfiles,patarra/dotfiles,zelga/dotfiles,theone4ever/dotfiles,tyok/dotfiles,jf87/dotfiles-yadr,gizero/dotfiles,skjerven/dotfiles,swanandp/dotfiles,akitaonrails/dotfiles