1
0
mirror of https://github.com/gryf/.vim.git synced 2025-12-17 19:40:29 +01:00

Mark plugin update, changed order for setting terminal options (turning on

256 colors)
This commit is contained in:
2011-01-16 21:14:28 +01:00
parent 23a9d47b8f
commit 48339a69cc
5 changed files with 44 additions and 24 deletions

4
.vimrc
View File

@@ -89,14 +89,14 @@ autocmd BufRead *.tmux.conf set filetype=tmux
"}}}
"TERMINAL: options for terminal emulators {{{
if $TERM == 'rxvt-unicode' || $TERM == 'xterm'
set t_Co=256 "Enable 256 colors support
set term=rxvt-unicode256 "Set terminal type
set t_Co=256 "Enable 256 colors support
"repair urxvt ctrl+pgup/down behaviour
map [5^ <C-PageUp>
map [6^ <C-PageDown>
elseif $TERM == 'screen' || $TERM == 'screen-256color'
set t_Co=256 "Enable 256 colors support
set term=screen-256color "Set terminal type
set t_Co=256 "Enable 256 colors support
set t_kN=[6;*~
set t_kP=[5;*~
endif

View File

@@ -6,7 +6,7 @@ ScriptID SourceID Filename
1984 13961 fuzzyfinder.vim
311 7645 grep.vim
2727 11120 jsbeautify.vim
2666 13424 Mark
2666 14741 Mark
2262 8944 occur.vim
910 14691 pydoc.vim
#2421 9423 pysmell.vim

View File

@@ -2,7 +2,7 @@
" Description: Highlight several words in different colors simultaneously.
"
" Copyright: (C) 2005-2008 by Yuheng Xie
" (C) 2008-2010 by Ingo Karkat
" (C) 2008-2011 by Ingo Karkat
" The VIM LICENSE applies to this script; see ':help copyright'.
"
" Maintainer: Ingo Karkat <ingo@karkat.de>
@@ -10,8 +10,13 @@
" Dependencies:
" - SearchSpecial.vim autoload script (optional, for improved search messages).
"
" Version: 2.4.0
" Version: 2.4.1
" Changes:
" 13-Jan-2011, Ingo Karkat
" - FIX: Using a named register for capturing the visual selection on
" {Visual}<Leader>m and {Visual}<Leader>r clobbered the unnamed register. Now
" using the unnamed register.
"
" 13-Jul-2010, Ingo Karkat
" - ENH: The MarkSearch mappings (<Leader>[*#/?]) add the original cursor
" position to the jump list, like the built-in [/?*#nN] commands. This allows
@@ -83,10 +88,13 @@ function! mark#MarkCurrentWord()
endfunction
function! s:GetVisualSelection()
let save_a = @a
silent normal! gv"ay
let res = @a
let @a = save_a
let save_clipboard = &clipboard
set clipboard= " Avoid clobbering the selection and clipboard registers.
let save_reg = @@
silent normal! gvy
let res = @@
let @@ = save_reg
let &clipboard = save_clipboard
return res
endfunction
function! mark#GetVisualSelectionAsLiteralPattern()

View File

@@ -7,7 +7,6 @@ description |mark-description|
usage |mark-usage|
installation |mark-installation|
configuration |mark-configuration|
integration |mark-integration|
limitations |mark-limitations|
known problems |mark-known-problems|
todo |mark-todo|
@@ -16,7 +15,7 @@ history |mark-history|
==============================================================================
DESCRIPTION *mark-description*
This script adds mappings and a :Mark command to highlight several words in
This plugin adds mappings and a :Mark command to highlight several words in
different colors simultaneously, similar to the built-in 'hlsearch'
highlighting of search results and the * |star| command. For example, when you
are browsing a big program file, you could highlight multiple identifiers in
@@ -24,7 +23,7 @@ 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 script offers the following advantages over
email address in his profile. 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()).
@@ -34,6 +33,7 @@ the original:
over some marks.
RELATED WORKS *
- MultipleSearch (vimscript #479) can highlight in a single window and in all
buffers, but still relies on the :syntax highlighting method, which is
slower and less reliable.
@@ -45,15 +45,17 @@ RELATED WORKS *
USAGE *mark-usage*
HIGHLIGHTING *mark-highlighting*
*<Leader>m* *v_<Leader>m*
<Leader>m Mark or unmark the word under the cursor, similar to
the |star| command.
{Visual}<Leader>m Mark or unmark the visual selection.
*<Leader>r* *v_<Leader>r*
<Leader>r Manually input a regular expression to highlight.
{Visual}<Leader>r (Based on the visual selection.)
In accordance with the built-in |star| command,
all these mappings use 'ignorecase', but not
'smartcase'.
*<Leader>n*
<Leader>n Clear the mark under the cursor / all marks.
*:Mark*
:Mark {pattern} Mark or unmark {pattern}.
@@ -63,7 +65,7 @@ HIGHLIGHTING *mark-highlighting*
SEARCHING *mark-searching*
*<Leader>star* *<Leader>#* *<Leader>/* *<Leader>?*
[count]* [count]#
[count]<Leader>* [count]<Leader>#
[count]<Leader>/ [count]<Leader>?
@@ -130,9 +132,6 @@ this plugin is sourced. To remove the default overriding of * and #, use: >
nmap <Plug>IgnoreMarkSearchNext <Plug>MarkSearchNext
nmap <Plug>IgnoreMarkSearchPrev <Plug>MarkSearchPrev
<
==============================================================================
INTEGRATION *mark-integration*
==============================================================================
LIMITATIONS *mark-limitations*
@@ -165,6 +164,11 @@ http://vim.wikia.com/wiki/Highlight_multiple_words:
==============================================================================
HISTORY *mark-history*
2.4.1 13-Jan-2011
- FIX: Using a named register for capturing the visual selection on
{Visual}<Leader>m and {Visual}<Leader>r clobbered the unnamed register. Now
using the unnamed register.
2.4.0 13-Jul-2010
- ENH: The MarkSearch mappings (<Leader>[*#/?]) add the original cursor
position to the jump list, like the built-in [/?*#nN] commands. This allows
@@ -260,7 +264,7 @@ Initial version published by Yuheng Xie on vim.org.
==============================================================================
Copyright: (C) 2005-2008 by Yuheng Xie
(C) 2008-2010 by Ingo Karkat
(C) 2008-2011 by Ingo Karkat
The VIM LICENSE applies to this script; see|copyright|.
Maintainer: Ingo Karkat <ingo@karkat.de>

View File

@@ -126,6 +126,13 @@
:VimwikiToggleListItem vimwiki.txt /*:VimwikiToggleListItem*
:VimwikiUISelect vimwiki.txt /*:VimwikiUISelect*
:VimwikiVSplitLink vimwiki.txt /*:VimwikiVSplitLink*
<Leader># mark.txt /*<Leader>#*
<Leader>/ mark.txt /*<Leader>\/*
<Leader>? mark.txt /*<Leader>?*
<Leader>m mark.txt /*<Leader>m*
<Leader>n mark.txt /*<Leader>n*
<Leader>r mark.txt /*<Leader>r*
<Leader>star mark.txt /*<Leader>star*
ExtractSnips() snipMate.txt /*ExtractSnips()*
ExtractSnipsFile() snipMate.txt /*ExtractSnipsFile()*
Filename() snipMate.txt /*Filename()*
@@ -404,7 +411,6 @@ mark-highlighting mark.txt /*mark-highlighting*
mark-history mark.txt /*mark-history*
mark-ideas mark.txt /*mark-ideas*
mark-installation mark.txt /*mark-installation*
mark-integration mark.txt /*mark-integration*
mark-known-problems mark.txt /*mark-known-problems*
mark-limitations mark.txt /*mark-limitations*
mark-searching mark.txt /*mark-searching*
@@ -840,6 +846,8 @@ surround-replacements surround.txt /*surround-replacements*
surround-targets surround.txt /*surround-targets*
surround.txt surround.txt /*surround.txt*
vS surround.txt /*vS*
v_<Leader>m mark.txt /*v_<Leader>m*
v_<Leader>r mark.txt /*v_<Leader>r*
vcscommand vcscommand.txt /*vcscommand*
vcscommand-buffer-management vcscommand.txt /*vcscommand-buffer-management*
vcscommand-buffer-variables vcscommand.txt /*vcscommand-buffer-variables*