Browse Source

made vim and bash more compatible with RIT's CS machines and SSH sessions

jhb2345 8 years ago
parent
commit
77298dd844
2 changed files with 6 additions and 2 deletions
  1. 4 0
      bashrc
  2. 2 2
      vimrc

+ 4 - 0
bashrc

@@ -1,3 +1,7 @@
+if [ -f "/usr/local/dcs/lib/config/Bash_Profile" ]; then
+    source /usr/local/dcs/lib/config/Bash_Profile
+fi
+
 PS1='\[\e[1;32m\]\u@\h \W\$ \[\e[0m\]'
 
 # ls pleasantness

+ 2 - 2
vimrc

@@ -56,7 +56,7 @@ set foldmethod=indent
 
 " set shell to zsh (if it exists)
 if !(has("win32") || has("win16") || has("win32unix"))
-    if filereadable("/bin/zsh")
+    if filereadable("/bin/zsh") && $SHELL=="/bin/zsh"
         silent! set shell=/bin/zsh  
     endif
 endif
@@ -70,7 +70,7 @@ function! UnixCapsControl()
 endfunction
 
 " map caps lock to escape under Linux
-if !(has("win32") || has("win16") || has("win32unix"))
+if !(has("win32") || has("win16") || has("win32unix")) && (!$SSH_CLIENT && !$SSH_TTY)
     au VimEnter * silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'
     au VimLeave * :call UnixCapsControl() 
 endif