Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make paths relative to scripts.

This allows the plugin to live in a directory other than ~/.vim.  This
useful when used with something like pathogen, where the plugin lives
in ~/.vim/bundle/cocoa or similar subpath.
  • Loading branch information...
commit a5eaf14edc3810246105594d15e581bfd826db62 1 parent 0f164ee
@threeve threeve authored
Showing with 4 additions and 3 deletions.
  1. +1 −1  autoload/objc/cocoacomplete.vim
  2. +3 −2 lib/get_methods.sh
View
2  autoload/objc/cocoacomplete.vim
@@ -3,7 +3,7 @@
" Last Updated: June 30, 2009
" Description: An omni-completion plugin for Cocoa/Objective-C.
-let s:lib_dir = fnameescape($HOME.'/.vim/lib/')
+let s:lib_dir = fnameescape(expand('<sfile>:p:h:h:h').'/lib/')
let s:cocoa_indexes = s:lib_dir.'cocoa_indexes/'
if !isdirectory(s:cocoa_indexes)
View
5 lib/get_methods.sh
@@ -1,3 +1,4 @@
-classes=`grep -m 1 ^$1 ~/.vim/lib/cocoa_indexes/classes.txt`
+dir=`dirname $0`
+classes=`grep -m 1 ^$1 ${dir}/cocoa_indexes/classes.txt`
if [ -z "$classes" ]; then exit; fi
-zgrep "^\($classes\)" ~/.vim/lib/cocoa_indexes/methods.txt.gz | sed 's/^[^ ]* //'
+zgrep "^\($classes\)" ${dir}/cocoa_indexes/methods.txt.gz | sed 's/^[^ ]* //'
Please sign in to comment.
Something went wrong with that request. Please try again.