Guest User

Untitled

a guest
May 27th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. In die .zshrc oder sonstwo wo's gesourced wird:
  2.  
  3. function chpwd; {
  4. DIRECTORY="$PWD"
  5. while true; do
  6. if [ -f './.env.rc' ]; then
  7. source './.env.rc'
  8. break
  9. fi
  10. if [ -f './env' ]; then
  11. source './env'
  12. break
  13. fi
  14. [ $PWD = '/' ] && break
  15. cd -q ..
  16. done
  17. cd -q "$DIRECTORY"
  18. }
  19.  
  20.  
  21. In Datei .env.rc oder nur "env" im Root-Verzeichnis des Projekts (als Bsp für ein Perl-Projekt):
  22.  
  23. export BASE=$PWD
  24. export PERL5LIB="$PWD/code/"
  25.  
  26. TAG="/usr/bin/ctags"
  27.  
  28. $TAG --languages="Perl" -R "$PWD"
  29.  
  30.  
  31.  
  32. In die .vimrc:
  33.  
  34. if exists("$BASE")
  35. set tags=$BASE/tags
  36. endif
  37.  
  38. map gt :tnext<cr>
  39. map gT :tprev<cr>
  40. map <C-p> :pop<cr>
Add Comment
Please, Sign In to add comment