Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcWeber committed Dec 28, 2009
1 parent 39420ee commit f5f89af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions autoload/cached_interpretation_of_file.vim
@@ -1,4 +1,5 @@
exec scriptmanager#DefineAndBind('s:cache_dir','g:cache_dir',expand('$HOME').'/.vim-cache') exec scriptmanager#DefineAndBind('s:c','g:cache_dir_options','{}')
let s:c['cache_dir'] = get(s:c, 'cache_dir', expand('$HOME').'/.vim-cache')


"TODO add command to clear cache.. because it will grow and grow. "TODO add command to clear cache.. because it will grow and grow.


Expand All @@ -20,7 +21,7 @@ function! cached_interpretation_of_file#ScanIfNewer(file, opts)
let dict = config#GetG(path, {'set': 1, 'default' : {}}) let dict = config#GetG(path, {'set': 1, 'default' : {}})


if cache if cache
let this_dir = s:cache_dir.'/scan-and-cache' let this_dir = s:c['cache_dir'].'/scan-and-cache'
let cache_file = expand(this_dir.'/'.substitute(string([Func, a:file]),'[[\]{}:/\,''"# ]\+','_','g')) let cache_file = expand(this_dir.'/'.substitute(string([Func, a:file]),'[[\]{}:/\,''"# ]\+','_','g'))
if !has_key(dict, a:file) " try getting from file cache if !has_key(dict, a:file) " try getting from file cache
if filereadable(cache_file) if filereadable(cache_file)
Expand Down

0 comments on commit f5f89af

Please sign in to comment.