diff --git a/install.sh b/install.sh index 46edcf22..408ce4ea 100755 --- a/install.sh +++ b/install.sh @@ -9,6 +9,10 @@ cp $HOME/.bash_it/template/bash_profile.template.bash $HOME/.bash_profile echo "Copied the template .bash_profile into ~/.bash_profile, edit this file to customize bash-it" +# TODO: this should be tested more. +cp $BASH_IT/template/FILES.template $BASH_IT/custom/FILES +echo "Copied the template FILES into $BASH_IT/custom/FILES, edit this file to have bookmarks to file you 'edit' often" + while true do read -p "Do you use Jekyll? (If you don't know what Jekyll is, answer 'n') [Y/N] " RESP diff --git a/lib/helpers.bash b/lib/helpers.bash index b04ea6c2..43107a1d 100644 --- a/lib/helpers.bash +++ b/lib/helpers.bash @@ -357,7 +357,7 @@ edit () { FILES=$1 if [ -z "$FILES" ] then - $EDITOR $HOME/.bash-it/custom/FILES + $EDITOR $BASH_IT/custom/FILES else $EDITOR $FILES fi diff --git a/template/FILES.template b/template/FILES.template new file mode 100644 index 00000000..ae80ce2c --- /dev/null +++ b/template/FILES.template @@ -0,0 +1,32 @@ +# This file is opened with you type 'edit' without argument +# $ edit + +# Simply edit this file and put you have bookmarks to the files you edit most +# +# You don't need anymore to go to the same directory and open the same files again and again +# How to open the file is then trivial +# - With vim, see :help gf +# - With xxx, do yyyy +# - If your text editor doesn't have that feature, simply copy and paste + +# When you call edit with arguments, edit is simply a shortcut to EDITOR +# $ edit /etc/fstab + +# edit those files as root +/etc/apt/sources.list +/etc/fstab +/etc/hosts +/etc/hosts +/etc/nginx/conf.d/nginx.conf +/etc/profile + +# edit those files as a user +$BASH_IT/aliases/custom.aliases.bash +$BASH_IT/lib/custom.bash +$BASH_IT/plugins/custom.plugins.bash +$HOME/.bash_profile +$HOME/.vimrc +$HOME/.emacs + +# See here for inspiration of what you can put here +http://en.wikibooks.org/wiki/Guide_to_Unix/Files