mirror of
https://github.com/gryf/.vim.git
synced 2026-02-15 23:35:47 +01:00
Updated zenburn, mark and tagbar
This commit is contained in:
90
doc/mark.txt
90
doc/mark.txt
@@ -55,14 +55,15 @@ HIGHLIGHTING *mark-highlighting*
|
||||
{Visual}<Leader>m Mark or unmark the visual selection.
|
||||
*<Leader>r* *v_<Leader>r*
|
||||
<Leader>r Manually input a regular expression to mark.
|
||||
{Visual}<Leader>r (Based on the visual selection.)
|
||||
{Visual}<Leader>r Ditto, 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.
|
||||
If not on a mark: Clear all marks.
|
||||
If not on a mark: Disable all marks, similar to
|
||||
|:nohlsearch|.
|
||||
|
||||
Note: Marks that span multiple lines are not detected,
|
||||
so the use of <Leader>n on such a mark will
|
||||
@@ -73,7 +74,13 @@ HIGHLIGHTING *mark-highlighting*
|
||||
:Mark {pattern} Mark or unmark {pattern}.
|
||||
For implementation reasons, {pattern} cannot use the
|
||||
'smartcase' setting, only 'ignorecase'.
|
||||
:Mark Clear all marks.
|
||||
:Mark Disable all marks, similar to |:nohlsearch|. Marks
|
||||
will automatically re-enable when a mark is added or
|
||||
removed, or a search for marks is performed.
|
||||
*:MarkClear*
|
||||
:MarkClear Clear all marks. In contrast to disabling marks, the
|
||||
actual mark information is cleared, the next mark will
|
||||
use the first highlight group. This cannot be undone.
|
||||
|
||||
|
||||
SEARCHING *mark-searching*
|
||||
@@ -109,16 +116,47 @@ SEARCHING *mark-searching*
|
||||
You can use Vim's |jumplist| to go back to previous
|
||||
mark matches and the position before a mark search.
|
||||
|
||||
MARK PERSISTENCE *mark-persistence*
|
||||
|
||||
The marks can be kept and restored across Vim sessions, using the |viminfo|
|
||||
file. For this to work, the "!" flag must be part of the 'viminfo' setting: >
|
||||
set viminfo+=! " Save and restore global variables.
|
||||
< *:MarkLoad*
|
||||
:MarkLoad Restore the marks from the previous Vim session. All
|
||||
current marks are discarded.
|
||||
*:MarkSave*
|
||||
:MarkSave Save the currently defined marks (or clear the
|
||||
persisted marks if no marks are currently defined) for
|
||||
use in a future Vim session.
|
||||
|
||||
By default, automatic persistence is enabled (so you don't need to explicitly
|
||||
|:MarkSave|), but you have to explicitly load the persisted marks in a new Vim
|
||||
session via |:MarkLoad|, to avoid that you accidentally drag along outdated
|
||||
highlightings from Vim session to session, and be surprised by the arbitrary
|
||||
highlight groups and occasional appearance of forgotten marks. If you want
|
||||
just that though and automatically restore any marks, set |g:mwAutoLoadMarks|.
|
||||
|
||||
You can also initialize the marks to static values, e.g. by including this in
|
||||
|vimrc|: >
|
||||
runtime plugin/mark.vim
|
||||
silent MarkClear
|
||||
Mark foo
|
||||
Mark bar
|
||||
Or you can define custom commands that preset certain marks: >
|
||||
command -bar MyMarks silent MarkClear | execute 'Mark foo' | execute 'Mark bar'
|
||||
Or a command that adds to the existing marks and then toggles them: >
|
||||
command -bar ToggleFooBarMarks execute 'Mark foo' | execute 'Mark bar'
|
||||
|
||||
==============================================================================
|
||||
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
|
||||
the archive first, e.g. using WinZip. Inside Vim, install by sourcing the
|
||||
vimball or via the|:UseVimball|command. >
|
||||
vimball or via the |:UseVimball| command. >
|
||||
vim mark.vba.gz
|
||||
:so %
|
||||
To uninstall, use the|:RmVimball|command.
|
||||
To uninstall, use the |:RmVimball| command.
|
||||
|
||||
DEPENDENCIES *mark-dependencies*
|
||||
|
||||
@@ -135,13 +173,30 @@ Higher numbers always take precedence and are displayed above lower ones.
|
||||
|
||||
The search type highlighting (in the search message) can be changed via: >
|
||||
highlight link SearchSpecialSearchType MoreMsg
|
||||
< *g:mwHistAdd*
|
||||
<
|
||||
*g:mwHistAdd*
|
||||
By default, any marked words are also added to the search (/) and input (@)
|
||||
history; if you don't want that, remove the corresponding symbols from: >
|
||||
let g:mwHistAdd = '/@'
|
||||
<
|
||||
You can use different mappings by mapping to the <Plug>Mark... mappings before
|
||||
this plugin is sourced. To remove the default overriding of * and #, use: >
|
||||
*g:mwAutoLoadMarks*
|
||||
To enable the automatic restore of marks from a previous Vim session: >
|
||||
let g:mwAutoLoadMarks = 1
|
||||
< *g:mwAutoSaveMarks*
|
||||
To turn off the automatic persistence of marks across Vim sessions: >
|
||||
let g:mwAutoSaveMarks = 0
|
||||
You can still explicitly save marks via |:MarkSave|.
|
||||
|
||||
*mark-mappings*
|
||||
You can use different mappings by mapping to the <Plug>Mark... mappings (use
|
||||
":map <Plug>Mark" to list them all) before this plugin is sourced.
|
||||
|
||||
There are no default mappings for toggling all marks and for the |:MarkClear|
|
||||
command, but you can define some yourself: >
|
||||
nmap <Leader>M <Plug>MarkToggle
|
||||
nmap <Leader>N <Plug>MarkAllClear
|
||||
<
|
||||
To remove the default overriding of * and #, use: >
|
||||
nmap <Plug>IgnoreMarkSearchNext <Plug>MarkSearchNext
|
||||
nmap <Plug>IgnoreMarkSearchPrev <Plug>MarkSearchPrev
|
||||
<
|
||||
@@ -163,20 +218,21 @@ IDEAS *mark-ideas*
|
||||
|
||||
Taken from an alternative implementation at
|
||||
http://vim.wikia.com/wiki/Highlight_multiple_words:
|
||||
- Allow to specify the highlight group number via :Mark [n] {regexp}
|
||||
- Allow to specify the highlight group number via :[N]Mark {regexp}
|
||||
- Use keys 1-9 on the numeric keypad to toggle a highlight group number.
|
||||
- Persist the patterns in a uppercase global variable across Vim sessions.
|
||||
(Request from Mun Johl, 16-Apr-2010.)
|
||||
Can be somewhat emulated by placing something like this in |vimrc|: >
|
||||
runtime plugin/mark.vim
|
||||
Mark foo
|
||||
Mark bar
|
||||
< or defining a custom command a la: >
|
||||
command -bar MyMarks execute "Mark foo" | execute "Mark bar"
|
||||
|
||||
==============================================================================
|
||||
HISTORY *mark-history*
|
||||
|
||||
2.5.0 07-May-2011
|
||||
- ENH: Add explicit mark persistence via :MarkLoad and :MarkSave commands and
|
||||
automatic persistence via the g:mwAutoLoadMarks and g:mwAutoSaveMarks
|
||||
configuration flags. (Request from Mun Johl, 16-Apr-2010)
|
||||
- Expose toggling of mark display (keeping the mark patterns) via new
|
||||
<Plug>MarkToggle mapping. Offer :MarkClear command as a replacement for the
|
||||
old argumentless :Mark command, which now just disables, but not clears all
|
||||
marks.
|
||||
|
||||
2.4.4 18-Apr-2011
|
||||
- BUG: Include trailing newline character in check for current mark, so that a
|
||||
mark that matches the entire line (e.g. created by V<Leader>m) can be
|
||||
|
||||
Reference in New Issue
Block a user