Skip to content

Commit

Permalink
Move version variable to autoload script
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Sep 4, 2011
1 parent 6c11e27 commit a3d786c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -89,7 +89,7 @@ If you have questions, bug reports, suggestions, etc. the author can be contacte
## License

This software is licensed under the [MIT license](http://en.wikipedia.org/wiki/MIT_License).
© 2010 Peter Odding &lt;<peter@peterodding.com>&gt;.
© 2011 Peter Odding &lt;<peter@peterodding.com>&gt;.


[autocmd]: http://vimdoc.sourceforge.net/htmldoc/autocmd.html#:autocmd
Expand Down
14 changes: 8 additions & 6 deletions autoload/xolox/reload.vim
@@ -1,8 +1,10 @@
" Vim script
" Last Change: June 18, 2011
" Last Change: September 4, 2011
" Author: Peter Odding
" URL: http://peterodding.com/code/vim/reload/

let g:xolox#reload#version = '0.6.3'

" Patterns to match various types of Vim script names. {{{1

" Enable line continuation.
Expand Down Expand Up @@ -67,14 +69,14 @@ function! s:reload_plugin(start_time, filename, friendly_name) " {{{1
call s:reload_message('plug-in', a:friendly_name)
unlet! g:loaded_{fnamemodify(a:filename, ':t:r')}
execute 'source' fnameescape(a:filename)
return ["reload.vim %s: Reloaded %s plug-in in %s.", g:reload_version, a:friendly_name, a:start_time]
return ["reload.vim %s: Reloaded %s plug-in in %s.", g:xolox#reload#version, a:friendly_name, a:start_time]
endfunction

if !exists('s:reload_script_active')
function! s:reload_autoload(start_time, filename, friendly_name) " {{{1
call s:reload_message('auto-load script', a:friendly_name)
execute 'source' fnameescape(a:filename)
return ["reload.vim %s: Reloaded %s auto-load script in %s.", g:reload_version, a:friendly_name, a:start_time]
return ["reload.vim %s: Reloaded %s auto-load script in %s.", g:xolox#reload#version, a:friendly_name, a:start_time]
endfunction
endif

Expand Down Expand Up @@ -105,7 +107,7 @@ function! s:reload_buffers(start_time, filetype, friendly_name, script_type, var
call winrestview(view_save)
" Disable the SwapExists automatic command.
unlet s:reloading_buffers
return ["reload.vim %s: Reloaded %s %s in %s.", g:reload_version, a:script_type, a:friendly_name, a:start_time]
return ["reload.vim %s: Reloaded %s %s in %s.", g:xolox#reload#version, a:script_type, a:friendly_name, a:start_time]
endfunction

function! xolox#reload#open_readonly() " {{{1
Expand Down Expand Up @@ -148,7 +150,7 @@ function! s:reload_colors(start_time, filename, friendly_name) " {{{1
let escaped = fnameescape(colorscheme)
execute 'colorscheme' escaped
execute 'doautocmd colorscheme' escaped
return ["reload.vim %s: Reloaded %s color scheme in %s.", g:reload_version, a:friendly_name, a:start_time]
return ["reload.vim %s: Reloaded %s color scheme in %s.", g:xolox#reload#version, a:friendly_name, a:start_time]
endif
endfunction

Expand Down Expand Up @@ -188,7 +190,7 @@ function! s:normalize_path(path) " {{{2
endfunction

function! s:reload_message(scripttype, scriptname) " {{{2
call xolox#misc#msg#info('reload.vim %s: Reloading %s %s.', g:reload_version, a:scripttype, a:scriptname)
call xolox#misc#msg#info('reload.vim %s: Reloading %s %s.', g:xolox#reload#version, a:scripttype, a:scriptname)
endfunction

" vim: ts=2 sw=2 et
2 changes: 1 addition & 1 deletion doc/reload.txt
Expand Up @@ -145,7 +145,7 @@ If you like the plug-in please vote for it on Vim Online [3].
*reload-license*
License ~

This software is licensed under the MIT license [4]. Copyright 2010 Peter
This software is licensed under the MIT license [4]. Copyright 2011 Peter
Odding <peter@peterodding.com>.

===============================================================================
Expand Down
4 changes: 1 addition & 3 deletions plugin/reload.vim
@@ -1,5 +1,5 @@
" Vim script
" Last Change: June 18, 2011
" Last Change: September 4, 2011
" Author: Peter Odding
" URL: http://peterodding.com/code/vim/reload/

Expand All @@ -11,8 +11,6 @@ if &cp || exists('g:loaded_reload')
finish
endif

let g:reload_version = '0.6.2'

if !exists('g:reload_on_write')
let g:reload_on_write = 1
endif
Expand Down

0 comments on commit a3d786c

Please sign in to comment.