1
0
mirror of https://github.com/gryf/.vim.git synced 2025-12-18 12:00:30 +01:00

Update of CtrlP, Syntastic, Tagbar, Taglisttoo, and Mark plugins

This commit is contained in:
2012-09-20 18:57:57 +02:00
parent 71a1d914e0
commit b033e2bb39
44 changed files with 1987 additions and 994 deletions

View File

@@ -10,8 +10,12 @@
" Dependencies:
" - SearchSpecial.vim autoload script (optional, for improved search messages).
"
" Version: 2.7.0
" Version: 2.7.1
" Changes:
" 13-Sep-2012, Ingo Karkat
" - Enable alternative * / # mappings that do not remember the last search type
" by adding optional search function argument to mark#SearchNext().
"
" 04-Jul-2012, Ingo Karkat
" - ENH: Handle on-the-fly change of mark highlighting via mark#ReInit(), which
" truncates / expands s:pattern and corrects the indices. Also, w:mwMatch List
@@ -771,18 +775,16 @@ function! mark#SearchAnyMark( isBackward )
endfunction
" Search last searched mark.
function! mark#SearchNext( isBackward )
function! mark#SearchNext( isBackward, ... )
let l:markText = mark#CurrentMark()[0]
if empty(l:markText)
return 0
else
if s:lastSearch == -1
call mark#SearchAnyMark(a:isBackward)
else
call mark#SearchCurrentMark(a:isBackward)
endif
return 1
return 0 " Fall back to the built-in * / # command (done by the mapping).
endif
" Use the provided search type or choose depending on last use of
" <Plug>MarkSearchCurrentNext / <Plug>MarkSearchAnyNext.
call call(a:0 ? a:1 : (s:lastSearch == -1 ? 'mark#SearchAnyMark' : 'mark#SearchCurrentMark'), [a:isBackward])
return 1
endfunction
" Load mark patterns from list.
@@ -809,12 +811,12 @@ function! mark#ToPatternList()
" may differ on the next invocation (e.g. due to a different number of
" highlight groups in Vim and GVIM). We want to keep empty patterns in the
" front and middle to maintain the mapping to highlight groups, though.
let l:highestNonEmptyIndex = s:markNum -1
let l:highestNonEmptyIndex = s:markNum - 1
while l:highestNonEmptyIndex >= 0 && empty(s:pattern[l:highestNonEmptyIndex])
let l:highestNonEmptyIndex -= 1
endwhile
return (l:highestNonEmptyIndex < 0 ? [] : s:pattern[0:l:highestNonEmptyIndex])
return (l:highestNonEmptyIndex < 0 ? [] : s:pattern[0 : l:highestNonEmptyIndex])
endfunction
" :MarkLoad command.

View File

@@ -21,10 +21,9 @@ highlighting of search results and the * |star| command. For example, when you
are browsing a big program file, you could highlight multiple identifiers in
parallel. This will make it easier to trace the source code.
This is a continuation of vimscript #1238 by Yuheng Xie, who apparently
doesn't maintain his original version anymore and cannot be reached via the
email address in his profile. This plugin offers the following advantages over
the original:
This is a continuation of vimscript #1238 by Yuheng Xie, who doesn't maintain
his original version anymore and recommends switching to this fork. This
plugin offers the following advantages over the original:
- Much faster, all colored words can now be highlighted, no more clashes with
syntax highlighting (due to use of matchadd()).
- Many bug fixes.
@@ -216,17 +215,17 @@ and |mark-palette-define| for how to add your own custom palettes.
==============================================================================
INSTALLATION *mark-installation*
This script is packaged as a|vimball|. If you have the "gunzip" decompressor
in your PATH, simply edit the *.vba.gz package in Vim; otherwise, decompress
This script is packaged as a |vimball|. If you have the "gunzip" decompressor
in your PATH, simply edit the *.vmb.gz package in Vim; otherwise, decompress
the archive first, e.g. using WinZip. Inside Vim, install by sourcing the
vimball or via the |:UseVimball| command. >
vim mark.vba.gz
vim mark*.vmb.gz
:so %
To uninstall, use the |:RmVimball| command.
DEPENDENCIES *mark-dependencies*
- Requires Vim 7.1 with "matchadd()", or Vim 7.2 or higher.
- Requires Vim 7.1 with |matchadd()|, or Vim 7.2 or higher.
==============================================================================
CONFIGURATION *mark-configuration*
@@ -311,6 +310,12 @@ command, but you can define some yourself: >
To remove the default overriding of * and #, use: >
nmap <Plug>IgnoreMarkSearchNext <Plug>MarkSearchNext
nmap <Plug>IgnoreMarkSearchPrev <Plug>MarkSearchPrev
<
If you don't want the * and # mappings remember the last search type and
instead always search for the next occurrence of the current mark, with a
fallback to Vim's original * command, use: >
nmap * <Plug>MarkSearchOrCurNext
nmap # <Plug>MarkSearchOrCurPrev
<
*mark-whitespace-indifferent*
Some people like to create a mark based on the visual selection, like
@@ -354,6 +359,12 @@ http://vim.wikia.com/wiki/Highlight_multiple_words:
==============================================================================
HISTORY *mark-history*
2.7.1 14-Sep-2012
- Enable alternative * / # mappings that do not remember the last search type
through new <Plug>MarkSearchOrCurNext, <Plug>MarkSearchOrCurPrev,
<Plug>MarkSearchOrAnyNext, <Plug>MarkSearchOrAnyPrev mappings. Based on an
inquiry from Kevin Huanpeng Du.
2.7.0 04-Jul-2012
- ENH: Implement :MarkPalette command to switch mark highlighting on-the-fly
during runtime.
@@ -558,7 +569,7 @@ Initial version published by Yuheng Xie on vim.org.
==============================================================================
Copyright: (C) 2005-2008 Yuheng Xie
(C) 2008-2012 Ingo Karkat
The VIM LICENSE applies to this script; see|copyright|.
The VIM LICENSE applies to this script; see |copyright|.
Maintainer: Ingo Karkat <ingo@karkat.de>
==============================================================================

View File

@@ -14,8 +14,13 @@
" - mark.vim autoload script
" - mark/palettes.vim autoload script for additional palettes
"
" Version: 2.7.0
" Version: 2.7.1
" Changes:
" 13-Sep-2012, Ingo Karkat
" - Enable alternative * / # mappings that do not remember the last search type
" through new <Plug>MarkSearchOrCurNext, <Plug>MarkSearchOrCurPrev,
" <Plug>MarkSearchOrAnyNext, <Plug>MarkSearchOrAnyPrev mappings.
"
" 04-Jul-2012, Ingo Karkat
" - Introduce g:mwPalettes instead of hard-coding them in
" s:DefaultHighlightings(), which got s:DefineHighlightings() extracted and
@@ -298,47 +303,51 @@ nnoremap <silent> <Plug>MarkSearchCurrentNext :<C-u>call mark#SearchCurrentMark(
nnoremap <silent> <Plug>MarkSearchCurrentPrev :<C-u>call mark#SearchCurrentMark(1)<CR>
nnoremap <silent> <Plug>MarkSearchAnyNext :<C-u>call mark#SearchAnyMark(0)<CR>
nnoremap <silent> <Plug>MarkSearchAnyPrev :<C-u>call mark#SearchAnyMark(1)<CR>
nnoremap <silent> <Plug>MarkSearchNext :<C-u>if !mark#SearchNext(0)<Bar>execute 'normal! *zv'<Bar>endif<CR>
nnoremap <silent> <Plug>MarkSearchPrev :<C-u>if !mark#SearchNext(1)<Bar>execute 'normal! #zv'<Bar>endif<CR>
" When typed, [*#nN] open the fold at the search result, but inside a mapping or
" :normal this must be done explicitly via 'zv'.
nnoremap <silent> <Plug>MarkSearchNext :<C-u>if !mark#SearchNext(0)<Bar>execute 'normal! *zv'<Bar>endif<CR>
nnoremap <silent> <Plug>MarkSearchPrev :<C-u>if !mark#SearchNext(1)<Bar>execute 'normal! #zv'<Bar>endif<CR>
nnoremap <silent> <Plug>MarkSearchOrCurNext :<C-u>if !mark#SearchNext(0,'mark#SearchCurrentMark')<Bar>execute 'normal! *zv'<Bar>endif<CR>
nnoremap <silent> <Plug>MarkSearchOrCurPrev :<C-u>if !mark#SearchNext(1,'mark#SearchCurrentMark')<Bar>execute 'normal! #zv'<Bar>endif<CR>
nnoremap <silent> <Plug>MarkSearchOrAnyNext :<C-u>if !mark#SearchNext(0,'mark#SearchAnyMark')<Bar>execute 'normal! *zv'<Bar>endif<CR>
nnoremap <silent> <Plug>MarkSearchOrAnyPrev :<C-u>if !mark#SearchNext(1,'mark#SearchAnyMark')<Bar>execute 'normal! #zv'<Bar>endif<CR>
if !hasmapto('<Plug>MarkSet', 'n')
nmap <unique> <silent> <Leader>m <Plug>MarkSet
nmap <unique> <Leader>m <Plug>MarkSet
endif
if !hasmapto('<Plug>MarkSet', 'v')
xmap <unique> <silent> <Leader>m <Plug>MarkSet
xmap <unique> <Leader>m <Plug>MarkSet
endif
if !hasmapto('<Plug>MarkRegex', 'n')
nmap <unique> <silent> <Leader>r <Plug>MarkRegex
nmap <unique> <Leader>r <Plug>MarkRegex
endif
if !hasmapto('<Plug>MarkRegex', 'v')
xmap <unique> <silent> <Leader>r <Plug>MarkRegex
xmap <unique> <Leader>r <Plug>MarkRegex
endif
if !hasmapto('<Plug>MarkClear', 'n')
nmap <unique> <silent> <Leader>n <Plug>MarkClear
nmap <unique> <Leader>n <Plug>MarkClear
endif
" No default mapping for <Plug>MarkAllClear.
" No default mapping for <Plug>MarkToggle.
if !hasmapto('<Plug>MarkSearchCurrentNext', 'n')
nmap <unique> <silent> <Leader>* <Plug>MarkSearchCurrentNext
nmap <unique> <Leader>* <Plug>MarkSearchCurrentNext
endif
if !hasmapto('<Plug>MarkSearchCurrentPrev', 'n')
nmap <unique> <silent> <Leader># <Plug>MarkSearchCurrentPrev
nmap <unique> <Leader># <Plug>MarkSearchCurrentPrev
endif
if !hasmapto('<Plug>MarkSearchAnyNext', 'n')
nmap <unique> <silent> <Leader>/ <Plug>MarkSearchAnyNext
nmap <unique> <Leader>/ <Plug>MarkSearchAnyNext
endif
if !hasmapto('<Plug>MarkSearchAnyPrev', 'n')
nmap <unique> <silent> <Leader>? <Plug>MarkSearchAnyPrev
nmap <unique> <Leader>? <Plug>MarkSearchAnyPrev
endif
if !hasmapto('<Plug>MarkSearchNext', 'n')
nmap <unique> <silent> * <Plug>MarkSearchNext
nmap <unique> * <Plug>MarkSearchNext
endif
if !hasmapto('<Plug>MarkSearchPrev', 'n')
nmap <unique> <silent> # <Plug>MarkSearchPrev
nmap <unique> # <Plug>MarkSearchPrev
endif