diff --git a/GetLatest/GetLatestVimScripts.dat b/GetLatest/GetLatestVimScripts.dat index d5f269b..94b6d7a 100644 --- a/GetLatest/GetLatestVimScripts.dat +++ b/GetLatest/GetLatestVimScripts.dat @@ -5,7 +5,7 @@ ScriptID SourceID Filename #2754 13139 :AutoInstall: delimitMate.vim 1984 13961 fuzzyfinder.vim 311 7645 grep.vim -3304 15211 gundo.vim +3304 15744 gundo.vim 2727 11120 jsbeautify.vim 2666 15663 Mark 2262 8944 occur.vim @@ -16,8 +16,8 @@ ScriptID SourceID Filename 1697 12566 :AutoInstall: surround.vim #273 7701 taglist.vim # exchanged with taglisttoo #and taglisttoo was exchanged by tagbar -3465 15532 Tagbar -90 13751 vcscommand.vim +3465 15751 Tagbar +90 15797 vcscommand.vim 2226 13756 vimwiki.vim 2289 0 loremipsum.vim 1334 6377 vst.vim @@ -29,8 +29,8 @@ ScriptID SourceID Filename 2555 15432 jellybeans.vim 2536 15197 lucius.vim 3299 14475 sorcerer.vim -3309 14699 vydark -2589 14175 vylight +3309 15759 vydark +2589 15760 vylight 1165 3741 tolerable.vim 415 15531 zenburn # compiler diff --git a/colors/vydark.vim b/colors/vydark.vim index 3269e70..676678c 100644 --- a/colors/vydark.vim +++ b/colors/vydark.vim @@ -2,7 +2,7 @@ " Vim colour file " " Maintainer: Vy-Shane Sin Fat -" Version: 1.1 +" Version: 1.2 " " This colour file is meant for GUI use. " @@ -27,6 +27,7 @@ hi VertSplit guifg=#353535 guibg=#353535 gui=none hi ModeMsg guifg=#99dd99 guibg=#394439 gui=none hi ErrorMsg guifg=#222222 guibg=#ff8888 gui=none hi Error guifg=#ffaaaa guibg=#333333 gui=none +hi Folded guifg=#666677 guibg=#242424 " Vim 7.x specific diff --git a/colors/vylight.vim b/colors/vylight.vim index 85c86c6..3900a96 100644 --- a/colors/vylight.vim +++ b/colors/vylight.vim @@ -2,7 +2,7 @@ " Vim colour file " " Maintainer: Vy-Shane Sin Fat -" Version: 1.3 +" Version: 1.4 " " This colour file is meant for GUI use. " @@ -27,6 +27,7 @@ hi VertSplit guifg=#eeeeee guibg=#eeeeee gui=none hi ModeMsg guifg=black guibg=#bbddff gui=none hi ErrorMsg guifg=black guibg=#ffbbbb gui=none hi Error guifg=#bb3355 guibg=white gui=none +hi Folded guifg=#999999 guibg=#fafafa " Vim 7.x specific diff --git a/doc/gundo.txt b/doc/gundo.txt index 3ee2b48..3706536 100644 --- a/doc/gundo.txt +++ b/doc/gundo.txt @@ -16,6 +16,7 @@ CONTENTS *Gundo-contents* 3.6 gundo_disable ............. |gundo_disable| 3.7 gundo_map_move_older ...... |gundo_map_move_older| gundo_map_move_newer ...... |gundo_map_move_newer| + 3.8 gundo_close_on_revert ..... |gundo_close_on_revert| 4. License ........................ |GundoLicense| 5. Bugs ........................... |GundoBugs| 6. Contributing ................... |GundoContributing| @@ -188,6 +189,13 @@ useful if you use a Dvorak keyboard and have changed your movement keys. Default: gundo_map_move_older = "j" gundo_map_move_newer = "k" +------------------------------------------------------------------------------ +3.8 g:gundo_close_on_revert *gundo_close_on_revert* + +Set this to 1 to automatically close the Gundo windows when reverting. + +Default: 0 (windows do not automatically close) + ============================================================================== 4. License *GundoLicense* @@ -211,6 +219,9 @@ GitHub: http://github.com/sjl/gundo.vim/ ============================================================================== 7. Changelog *GundoChangelog* +v2.2.0 + * Add the g:gundo_close_on_revert setting. + * Fix a bug with the splitbelow setting. v2.1.1 * Fix a bug with the movement key mappings. v2.1.0 diff --git a/doc/tagbar.txt b/doc/tagbar.txt index a80b93f..ffa58fa 100644 --- a/doc/tagbar.txt +++ b/doc/tagbar.txt @@ -3,7 +3,7 @@ Author: Jan Larres Licence: Vim licence, see |license| Homepage: http://majutsushi.github.com/tagbar/ -Version: 2.0.1 +Version: 2.1 ============================================================================== Contents *tagbar* *tagbar-contents* @@ -113,6 +113,12 @@ with doctorjs/jsctags and will use that if present, other programs require some configuration (see |tagbar-extend|). If a program does not work even with correct configuration please contact me. +Note: jsctags has to be newer than 2011-01-06 since it needs the "-f" option +to work. Also, the output of jsctags seems to be a bit unreliable at the +moment (especially regarding line numbers), so if you notice some strange +behaviour with it please run it manually in a terminal to check whether the +bug is in jsctags or Tagbar. + ============================================================================== 2. Requirements *tagbar-requirements* @@ -417,6 +423,21 @@ Example: let g:tagbar_autoshowtag = 1 < + *g:tagbar_systemenc* +g:tagbar_systemenc~ +Default: value of 'encoding' + +This variable is for cases where the character encoding of your operating +system is different from the one set in Vim, i.e. the 'encoding' option. For +example, if you use a Simplified Chinese Windows version that has a system +encoding of "cp936", and you have set 'encoding' to "utf-8", then you would +have to set this variable to "cp936". + +Example: +> + let g:tagbar_systemenc = 'cp936' +< + ------------------------------------------------------------------------------ HIGHLIGHT COLOURS *tagbar-highlight* @@ -486,7 +507,9 @@ complicated cases. Tagbar has a flexible mechanism for extending the existing file type (i.e. language) definitions. This can be used both to change the settings of the -existing types and to add completely new types. +existing types and to add completely new types. A complete configuration +consists of a type definition for Tagbar in your |vimrc| and optionally a +language definition for ctags in case you want to add a new language. Every type definition in Tagbar is a dictionary with the following keys: @@ -577,12 +600,13 @@ ctagsargs: The arguments to be passed to the filetype-specific ctags program program. -You then have to assign this dictionary to a variable with the name +You then have to assign this dictionary to a variable in your vimrc with the +name > g:tagbar_type_{vim filetype} < For example, for C++ the name would be "g:tagbar_type_cpp". If you don't know -the vim file type run the following command: +the vim file type then run the following command: > :set filetype? < @@ -780,6 +804,22 @@ files. ============================================================================== 8. History *tagbar-history* +2.1 (2011-05-29) + - Make Tagbar work in (hopefully) all cases under Windows + - Handle cases where 'encoding' is different from system encoding, for + example on a Chinese Windows with 'encoding' set to "utf-8" (see manual + for details in case it doesn't work out-of-the-box) + - Fixed a bug with the handling of subtypes like "python.django" + - If a session got saved with Tagbar open it now gets restored properly + - Locally reset foldmethod/foldexpr in case foldexpr got set to something + expensive globally + - Tagbar now tries hard to go to the correct window when jumping to a tag + - Explain some possible issues with the current jsctags version in the + manual + - Explicitly check for some possible configuration problems to be able to + give better feedback + - A few other small fixes + 2.0.1 (2011-04-26) - Fix sorting bug when 'ignorecase' is set diff --git a/doc/tags b/doc/tags index 3f0fe04..a7054de 100644 --- a/doc/tags +++ b/doc/tags @@ -382,6 +382,7 @@ g:tagbar_expand tagbar.txt /*g:tagbar_expand* g:tagbar_foldlevel tagbar.txt /*g:tagbar_foldlevel* g:tagbar_left tagbar.txt /*g:tagbar_left* g:tagbar_sort tagbar.txt /*g:tagbar_sort* +g:tagbar_systemenc tagbar.txt /*g:tagbar_systemenc* g:tagbar_usearrows tagbar.txt /*g:tagbar_usearrows* g:tagbar_width tagbar.txt /*g:tagbar_width* g:vimwiki_CJK_length vimwiki.txt /*g:vimwiki_CJK_length* @@ -413,6 +414,7 @@ g:vimwiki_use_mouse vimwiki.txt /*g:vimwiki_use_mouse* g:vimwiki_valid_html_tags vimwiki.txt /*g:vimwiki_valid_html_tags* g:vimwiki_w32_dir_enc vimwiki.txt /*g:vimwiki_w32_dir_enc* gundo.txt gundo.txt /*gundo.txt* +gundo_close_on_revert gundo.txt /*gundo_close_on_revert* gundo_disable gundo.txt /*gundo_disable* gundo_help gundo.txt /*gundo_help* gundo_map_move_newer gundo.txt /*gundo_map_move_newer* diff --git a/plugin/gundo.vim b/plugin/gundo.vim index 49cd83f..29f1e9b 100644 --- a/plugin/gundo.vim +++ b/plugin/gundo.vim @@ -66,6 +66,9 @@ endif"}}} if !exists("g:gundo_map_move_newer")"{{{ let g:gundo_map_move_newer = 'k' endif"}}} +if !exists("g:gundo_close_on_revert")"{{{ + let g:gundo_close_on_revert = 0 +endif"}}} "}}} @@ -595,11 +598,19 @@ function! s:GundoClose()"{{{ endfunction"}}} function! s:GundoOpen()"{{{ + " Save `splitbelow` value and set it to default to avoid problems with + " positioning new windows. + let saved_splitbelow = &splitbelow + let &splitbelow = 0 + call s:GundoOpenPreview() exe bufwinnr(g:gundo_target_n) . "wincmd w" call s:GundoRenderGraph() call s:GundoRenderPreview() + + " Restore `splitbelow` value. + let &splitbelow = saved_splitbelow endfunction"}}} function! s:GundoToggle()"{{{ @@ -884,6 +895,9 @@ def GundoRevert(): vim.command('GundoRenderGraph') _goto_window_for_buffer(back) + if int(vim.eval('g:gundo_close_on_revert')): + vim.command('GundoToggle') + GundoRevert() ENDPYTHON endfunction"}}} diff --git a/plugin/tagbar.vim b/plugin/tagbar.vim index b9aaf7f..978788a 100644 --- a/plugin/tagbar.vim +++ b/plugin/tagbar.vim @@ -4,7 +4,7 @@ " Author: Jan Larres " Licence: Vim licence " Website: http://majutsushi.github.com/tagbar/ -" Version: 2.0.1 +" Version: 2.1 " Note: This plugin was heavily inspired by the 'Taglist' plugin by " Yegappan Lakshmanan and uses a small amount of code from it. " @@ -25,9 +25,17 @@ endif " Initialization {{{1 " Basic init {{{2 + +if v:version < 700 + echomsg 'Tagbar: Vim version is too old, Tagbar requires at least 7.0' + finish +endif + if !exists('g:tagbar_ctags_bin') if executable('ctags-exuberant') let g:tagbar_ctags_bin = 'ctags-exuberant' + elseif executable('exuberant-ctags') + let g:tagbar_ctags_bin = 'exuberant-ctags' elseif executable('exctags') let g:tagbar_ctags_bin = 'exctags' elseif executable('ctags') @@ -49,6 +57,16 @@ else endif endif +redir => s:ftype_out +silent filetype +redir END +if s:ftype_out !~# 'detection:ON' + echomsg 'Tagbar: Filetype detection is turned off, skipping plugin' + unlet s:ftype_out + finish +endif +unlet s:ftype_out + let g:loaded_tagbar = 1 if !exists('g:tagbar_left') @@ -91,6 +109,10 @@ if !exists('g:tagbar_autoshowtag') let g:tagbar_autoshowtag = 0 endif +if !exists('g:tagbar_systemenc') + let g:tagbar_systemenc = &encoding +endif + if has('multi_byte') && has('unix') && &encoding == 'utf-8' && \ (empty(&termencoding) || &termencoding == 'utf-8') let s:icon_closed = '▶' @@ -105,6 +127,7 @@ endif let s:type_init_done = 0 let s:autocommands_done = 0 +let s:checked_ctags = 0 let s:window_expanded = 0 let s:access_symbols = { @@ -113,6 +136,8 @@ let s:access_symbols = { \ 'private' : '-' \ } +autocmd SessionLoadPost * nested call s:RestoreSession() + " s:InitTypes() {{{2 function! s:InitTypes() let s:known_types = {} @@ -808,6 +833,42 @@ function! s:GetUserTypeDefs() return defdict endfunction +" s:RestoreSession() {{{2 +" Properly restore Tagbar after a session got loaded +function! s:RestoreSession() + let tagbarwinnr = bufwinnr('__Tagbar__') + if tagbarwinnr == -1 + " Tagbar wasn't open in the saved session, nothing to do + return + else + let in_tagbar = 1 + if winnr() != tagbarwinnr + execute tagbarwinnr . 'wincmd w' + let in_tagbar = 0 + endif + endif + + if !s:type_init_done + call s:InitTypes() + endif + + if !s:checked_ctags + if !s:CheckForExCtags() + return + endif + endif + + call s:InitWindow(g:tagbar_autoclose) + + " Leave the Tagbar window and come back so the update event gets triggered + execute 'wincmd p' + execute tagbarwinnr . 'wincmd w' + + if !in_tagbar + execute 'wincmd p' + endif +endfunction + " s:MapKeys() {{{2 function! s:MapKeys() nnoremap