dotfiles

config files for my linux setup
git clone git://edryd.org/dotfiles
Log | Files | Refs | README

ED.sh (350B)


      1 #!/usr/bin/env bash
      2 
      3 # ED: change between $EDITORs
      4 #
      5 # toggles your $EDITOR between your different editors.
      6 # To install add `source path/to/ED.sh` to your shell's rc file.
      7 
      8 ED() {
      9 	local new
     10 	if [[ "$1" != "" ]]; then
     11 		new="$1"
     12 	elif [[ $EDITOR == "vim" ]]; then
     13 		new="emacs"
     14 	else
     15 		new="vim"
     16 	fi
     17 
     18 	echo "Setting \$EDITOR to $new"
     19 	EDITOR=$new
     20 }