liloman / bash-surround

Vim-surround for your prompt!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bash-surround

If you are used to work with vim-surround and you missed it while you where on your shell you don't have wait to use it. :)

#Install

cd ~/yourDir
git clone https://github.com/liloman/bash-surround
echo "bind -f ~/yourDir/bash-surround/inputrc-surround" >> ~/.bashrc

You need to be using the vi-mode (no luck emacs users ... :S)

In your ~/.inputrc:

#Set to vi mode by default
set editing-mode vi
#and insert mode
set keymap vi-insert
#Set vi Mode 
set -o vi

#Use

It cames with almost the same keybinds as vim-surround. ;)

vim-surround

Example

#HOW

While I was hacking for asyncBash I learned a lot about readline and I was able to hack this tool as a clone of the amazing vim-surround.

#FAQ

Q. Can you port it to the emacs mode? A. Sorry I don't use that mode but you can port it by yourself cause it's written incrementally so you just need to change the vim objects i/a selection and perhaps de mark keybindings.

About

Vim-surround for your prompt!

License:GNU General Public License v3.0