aboutsummaryrefslogtreecommitdiffstats
path: root/autoload/xolox/easytags/utils.vim
diff options
context:
space:
mode:
authorPeter Odding <peter@peterodding.com>2014-06-22 03:22:36 +0200
committerPeter Odding <peter@peterodding.com>2014-06-22 03:22:36 +0200
commit27c29aa6a6b558b2f917a0c661fb4804bcdeb05e (patch)
tree50eca5068e733a0bbb1aaac00ef4b86d2f91dd0e /autoload/xolox/easytags/utils.vim
parent110673aeb7b401f942c31154e013c19c684fcc11 (diff)
downloadvim-easytags-27c29aa6a6b558b2f917a0c661fb4804bcdeb05e.tar.gz
Support for synchronous + asynchronous tags file updates (huge refactoring)
See also pull request #49 for my previous and failed attempt: https://github.com/xolox/vim-easytags/pull/49
Diffstat (limited to 'autoload/xolox/easytags/utils.vim')
-rw-r--r--autoload/xolox/easytags/utils.vim20
1 files changed, 20 insertions, 0 deletions
diff --git a/autoload/xolox/easytags/utils.vim b/autoload/xolox/easytags/utils.vim
new file mode 100644
index 0000000..a88c7a8
--- /dev/null
+++ b/autoload/xolox/easytags/utils.vim
@@ -0,0 +1,20 @@
+" Vim script
+" Author: Peter Odding <peter@peterodding.com>
+" Last Change: June 20, 2014
+" URL: http://peterodding.com/code/vim/easytags/
+
+" Utility functions for vim-easytags.
+
+function! xolox#easytags#utils#canonicalize(pathname)
+ if !empty(a:pathname)
+ return xolox#misc#path#absolute(xolox#easytags#utils#resolve(a:pathname))
+ endif
+ return a:pathname
+endfunction
+
+function! xolox#easytags#utils#resolve(pathname)
+ if !empty(a:pathname) && xolox#misc#option#get('easytags_resolve_links', 0)
+ return resolve(a:pathname)
+ endif
+ return a:pathname
+endfunction