aboutsummaryrefslogtreecommitdiffstats
path: root/bash
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2015-08-25 13:07:31 +0200
committerGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2015-08-25 13:07:31 +0200
commit14fd7d4326579569f27cf3ff415f626c0be3ad8b (patch)
tree808783d8cc6052c15d7516ccba3cf444406b7aa3 /bash
parentfed8c201dc4ba27627bfb66c9bc1c3d7e05b96ee (diff)
downloaddotfiles-14fd7d4326579569f27cf3ff415f626c0be3ad8b.tar.gz
dotfiles-14fd7d4326579569f27cf3ff415f626c0be3ad8b.tar.bz2
dotfiles-14fd7d4326579569f27cf3ff415f626c0be3ad8b.zip
Added nvim as default editor if exists
Diffstat (limited to 'bash')
-rwxr-xr-xbash/.bashrc27
1 files changed, 16 insertions, 11 deletions
diff --git a/bash/.bashrc b/bash/.bashrc
index e8a61fc..7e460bb 100755
--- a/bash/.bashrc
+++ b/bash/.bashrc
@@ -98,20 +98,25 @@ elif exists vlc; then
98 alias jblive='vlc rtmp://videocdn-us.geocdn.scaleengine.net/jblive/live/jblive.stream' 98 alias jblive='vlc rtmp://videocdn-us.geocdn.scaleengine.net/jblive/live/jblive.stream'
99fi 99fi
100 100
101if exists vim; then 101if exists nvim; then
102 export EDITOR="nvim"
103elif exists vim; then
102 export EDITOR="vim" 104 export EDITOR="vim"
103 vim() { 105elif exists vi; then
104 if [[ -z $@ ]]; then 106 export EDITOR="vi"
105 $usr/bin/vim
106 elif [[ -d $@ ]]; then
107 dir=$(pwd)
108 cd $@ && $usr/bin/vim && cd $dir
109 else
110 $usr/bin/vim $@
111 fi
112 }
113fi 107fi
114 108
109vim() {
110 if [[ -z $@ ]]; then
111 $EDITOR
112 elif [[ -d $@ ]]; then
113 dir=$(pwd)
114 cd $@ && $EDITOR && cd $dir
115 else
116 $EDITOR $@
117 fi
118}
119
115if exists go; then 120if exists go; then
116 export GOPATH="$HOME/programming/go" 121 export GOPATH="$HOME/programming/go"
117 export PATH="$PATH:$GOPATH/bin" 122 export PATH="$PATH:$GOPATH/bin"