mirror of
https://github.com/gryf/.vim.git
synced 2025-12-17 11:30:29 +01:00
Mark plugin update, changed order for setting terminal options (turning on
256 colors)
This commit is contained in:
4
.vimrc
4
.vimrc
@@ -89,14 +89,14 @@ autocmd BufRead *.tmux.conf set filetype=tmux
|
|||||||
"}}}
|
"}}}
|
||||||
"TERMINAL: options for terminal emulators {{{
|
"TERMINAL: options for terminal emulators {{{
|
||||||
if $TERM == 'rxvt-unicode' || $TERM == 'xterm'
|
if $TERM == 'rxvt-unicode' || $TERM == 'xterm'
|
||||||
set t_Co=256 "Enable 256 colors support
|
|
||||||
set term=rxvt-unicode256 "Set terminal type
|
set term=rxvt-unicode256 "Set terminal type
|
||||||
|
set t_Co=256 "Enable 256 colors support
|
||||||
"repair urxvt ctrl+pgup/down behaviour
|
"repair urxvt ctrl+pgup/down behaviour
|
||||||
map [5^ <C-PageUp>
|
map [5^ <C-PageUp>
|
||||||
map [6^ <C-PageDown>
|
map [6^ <C-PageDown>
|
||||||
elseif $TERM == 'screen' || $TERM == 'screen-256color'
|
elseif $TERM == 'screen' || $TERM == 'screen-256color'
|
||||||
set t_Co=256 "Enable 256 colors support
|
|
||||||
set term=screen-256color "Set terminal type
|
set term=screen-256color "Set terminal type
|
||||||
|
set t_Co=256 "Enable 256 colors support
|
||||||
set t_kN=[6;*~
|
set t_kN=[6;*~
|
||||||
set t_kP=[5;*~
|
set t_kP=[5;*~
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ ScriptID SourceID Filename
|
|||||||
1984 13961 fuzzyfinder.vim
|
1984 13961 fuzzyfinder.vim
|
||||||
311 7645 grep.vim
|
311 7645 grep.vim
|
||||||
2727 11120 jsbeautify.vim
|
2727 11120 jsbeautify.vim
|
||||||
2666 13424 Mark
|
2666 14741 Mark
|
||||||
2262 8944 occur.vim
|
2262 8944 occur.vim
|
||||||
910 14691 pydoc.vim
|
910 14691 pydoc.vim
|
||||||
#2421 9423 pysmell.vim
|
#2421 9423 pysmell.vim
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
" Description: Highlight several words in different colors simultaneously.
|
" Description: Highlight several words in different colors simultaneously.
|
||||||
"
|
"
|
||||||
" Copyright: (C) 2005-2008 by Yuheng Xie
|
" 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'.
|
" The VIM LICENSE applies to this script; see ':help copyright'.
|
||||||
"
|
"
|
||||||
" Maintainer: Ingo Karkat <ingo@karkat.de>
|
" Maintainer: Ingo Karkat <ingo@karkat.de>
|
||||||
@@ -10,8 +10,13 @@
|
|||||||
" Dependencies:
|
" Dependencies:
|
||||||
" - SearchSpecial.vim autoload script (optional, for improved search messages).
|
" - SearchSpecial.vim autoload script (optional, for improved search messages).
|
||||||
"
|
"
|
||||||
" Version: 2.4.0
|
" Version: 2.4.1
|
||||||
" Changes:
|
" 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
|
" 13-Jul-2010, Ingo Karkat
|
||||||
" - ENH: The MarkSearch mappings (<Leader>[*#/?]) add the original cursor
|
" - ENH: The MarkSearch mappings (<Leader>[*#/?]) add the original cursor
|
||||||
" position to the jump list, like the built-in [/?*#nN] commands. This allows
|
" position to the jump list, like the built-in [/?*#nN] commands. This allows
|
||||||
@@ -83,10 +88,13 @@ function! mark#MarkCurrentWord()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:GetVisualSelection()
|
function! s:GetVisualSelection()
|
||||||
let save_a = @a
|
let save_clipboard = &clipboard
|
||||||
silent normal! gv"ay
|
set clipboard= " Avoid clobbering the selection and clipboard registers.
|
||||||
let res = @a
|
let save_reg = @@
|
||||||
let @a = save_a
|
silent normal! gvy
|
||||||
|
let res = @@
|
||||||
|
let @@ = save_reg
|
||||||
|
let &clipboard = save_clipboard
|
||||||
return res
|
return res
|
||||||
endfunction
|
endfunction
|
||||||
function! mark#GetVisualSelectionAsLiteralPattern()
|
function! mark#GetVisualSelectionAsLiteralPattern()
|
||||||
|
|||||||
32
doc/mark.txt
32
doc/mark.txt
@@ -4,10 +4,9 @@
|
|||||||
(original version by Yuheng Xie)
|
(original version by Yuheng Xie)
|
||||||
*mark.vim*
|
*mark.vim*
|
||||||
description |mark-description|
|
description |mark-description|
|
||||||
usage |mark-usage|
|
usage |mark-usage|
|
||||||
installation |mark-installation|
|
installation |mark-installation|
|
||||||
configuration |mark-configuration|
|
configuration |mark-configuration|
|
||||||
integration |mark-integration|
|
|
||||||
limitations |mark-limitations|
|
limitations |mark-limitations|
|
||||||
known problems |mark-known-problems|
|
known problems |mark-known-problems|
|
||||||
todo |mark-todo|
|
todo |mark-todo|
|
||||||
@@ -16,7 +15,7 @@ history |mark-history|
|
|||||||
==============================================================================
|
==============================================================================
|
||||||
DESCRIPTION *mark-description*
|
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'
|
different colors simultaneously, similar to the built-in 'hlsearch'
|
||||||
highlighting of search results and the * |star| command. For example, when you
|
highlighting of search results and the * |star| command. For example, when you
|
||||||
are browsing a big program file, you could highlight multiple identifiers in
|
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
|
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
|
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:
|
the original:
|
||||||
- Much faster, all colored words can now be highlighted, no more clashes with
|
- Much faster, all colored words can now be highlighted, no more clashes with
|
||||||
syntax highlighting (due to use of matchadd()).
|
syntax highlighting (due to use of matchadd()).
|
||||||
@@ -33,7 +32,8 @@ the original:
|
|||||||
- Like the built-in commands, jumps take an optional [count] to quickly skip
|
- Like the built-in commands, jumps take an optional [count] to quickly skip
|
||||||
over some marks.
|
over some marks.
|
||||||
|
|
||||||
RELATED WORKS *
|
RELATED WORKS *
|
||||||
|
|
||||||
- MultipleSearch (vimscript #479) can highlight in a single window and in all
|
- MultipleSearch (vimscript #479) can highlight in a single window and in all
|
||||||
buffers, but still relies on the :syntax highlighting method, which is
|
buffers, but still relies on the :syntax highlighting method, which is
|
||||||
slower and less reliable.
|
slower and less reliable.
|
||||||
@@ -44,16 +44,18 @@ RELATED WORKS *
|
|||||||
==============================================================================
|
==============================================================================
|
||||||
USAGE *mark-usage*
|
USAGE *mark-usage*
|
||||||
|
|
||||||
HIGHLIGHTING *mark-highlighting*
|
HIGHLIGHTING *mark-highlighting*
|
||||||
|
*<Leader>m* *v_<Leader>m*
|
||||||
<Leader>m Mark or unmark the word under the cursor, similar to
|
<Leader>m Mark or unmark the word under the cursor, similar to
|
||||||
the |star| command.
|
the |star| command.
|
||||||
{Visual}<Leader>m Mark or unmark the visual selection.
|
{Visual}<Leader>m Mark or unmark the visual selection.
|
||||||
|
*<Leader>r* *v_<Leader>r*
|
||||||
<Leader>r Manually input a regular expression to highlight.
|
<Leader>r Manually input a regular expression to highlight.
|
||||||
{Visual}<Leader>r (Based on the visual selection.)
|
{Visual}<Leader>r (Based on the visual selection.)
|
||||||
In accordance with the built-in |star| command,
|
In accordance with the built-in |star| command,
|
||||||
all these mappings use 'ignorecase', but not
|
all these mappings use 'ignorecase', but not
|
||||||
'smartcase'.
|
'smartcase'.
|
||||||
|
*<Leader>n*
|
||||||
<Leader>n Clear the mark under the cursor / all marks.
|
<Leader>n Clear the mark under the cursor / all marks.
|
||||||
*:Mark*
|
*:Mark*
|
||||||
:Mark {pattern} Mark or unmark {pattern}.
|
:Mark {pattern} Mark or unmark {pattern}.
|
||||||
@@ -63,7 +65,7 @@ HIGHLIGHTING *mark-highlighting*
|
|||||||
|
|
||||||
|
|
||||||
SEARCHING *mark-searching*
|
SEARCHING *mark-searching*
|
||||||
|
*<Leader>star* *<Leader>#* *<Leader>/* *<Leader>?*
|
||||||
[count]* [count]#
|
[count]* [count]#
|
||||||
[count]<Leader>* [count]<Leader>#
|
[count]<Leader>* [count]<Leader>#
|
||||||
[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>IgnoreMarkSearchNext <Plug>MarkSearchNext
|
||||||
nmap <Plug>IgnoreMarkSearchPrev <Plug>MarkSearchPrev
|
nmap <Plug>IgnoreMarkSearchPrev <Plug>MarkSearchPrev
|
||||||
<
|
<
|
||||||
==============================================================================
|
|
||||||
INTEGRATION *mark-integration*
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
LIMITATIONS *mark-limitations*
|
LIMITATIONS *mark-limitations*
|
||||||
|
|
||||||
@@ -165,6 +164,11 @@ http://vim.wikia.com/wiki/Highlight_multiple_words:
|
|||||||
==============================================================================
|
==============================================================================
|
||||||
HISTORY *mark-history*
|
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
|
2.4.0 13-Jul-2010
|
||||||
- ENH: The MarkSearch mappings (<Leader>[*#/?]) add the original cursor
|
- ENH: The MarkSearch mappings (<Leader>[*#/?]) add the original cursor
|
||||||
position to the jump list, like the built-in [/?*#nN] commands. This allows
|
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
|
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|.
|
The VIM LICENSE applies to this script; see|copyright|.
|
||||||
|
|
||||||
Maintainer: Ingo Karkat <ingo@karkat.de>
|
Maintainer: Ingo Karkat <ingo@karkat.de>
|
||||||
|
|||||||
10
doc/tags
10
doc/tags
@@ -126,6 +126,13 @@
|
|||||||
:VimwikiToggleListItem vimwiki.txt /*:VimwikiToggleListItem*
|
:VimwikiToggleListItem vimwiki.txt /*:VimwikiToggleListItem*
|
||||||
:VimwikiUISelect vimwiki.txt /*:VimwikiUISelect*
|
:VimwikiUISelect vimwiki.txt /*:VimwikiUISelect*
|
||||||
:VimwikiVSplitLink vimwiki.txt /*:VimwikiVSplitLink*
|
: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()*
|
ExtractSnips() snipMate.txt /*ExtractSnips()*
|
||||||
ExtractSnipsFile() snipMate.txt /*ExtractSnipsFile()*
|
ExtractSnipsFile() snipMate.txt /*ExtractSnipsFile()*
|
||||||
Filename() snipMate.txt /*Filename()*
|
Filename() snipMate.txt /*Filename()*
|
||||||
@@ -404,7 +411,6 @@ mark-highlighting mark.txt /*mark-highlighting*
|
|||||||
mark-history mark.txt /*mark-history*
|
mark-history mark.txt /*mark-history*
|
||||||
mark-ideas mark.txt /*mark-ideas*
|
mark-ideas mark.txt /*mark-ideas*
|
||||||
mark-installation mark.txt /*mark-installation*
|
mark-installation mark.txt /*mark-installation*
|
||||||
mark-integration mark.txt /*mark-integration*
|
|
||||||
mark-known-problems mark.txt /*mark-known-problems*
|
mark-known-problems mark.txt /*mark-known-problems*
|
||||||
mark-limitations mark.txt /*mark-limitations*
|
mark-limitations mark.txt /*mark-limitations*
|
||||||
mark-searching mark.txt /*mark-searching*
|
mark-searching mark.txt /*mark-searching*
|
||||||
@@ -840,6 +846,8 @@ surround-replacements surround.txt /*surround-replacements*
|
|||||||
surround-targets surround.txt /*surround-targets*
|
surround-targets surround.txt /*surround-targets*
|
||||||
surround.txt surround.txt /*surround.txt*
|
surround.txt surround.txt /*surround.txt*
|
||||||
vS surround.txt /*vS*
|
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 vcscommand.txt /*vcscommand*
|
||||||
vcscommand-buffer-management vcscommand.txt /*vcscommand-buffer-management*
|
vcscommand-buffer-management vcscommand.txt /*vcscommand-buffer-management*
|
||||||
vcscommand-buffer-variables vcscommand.txt /*vcscommand-buffer-variables*
|
vcscommand-buffer-variables vcscommand.txt /*vcscommand-buffer-variables*
|
||||||
|
|||||||
Reference in New Issue
Block a user