dotfiles/vim/doc/signature.txt
Frank Villaro-Dixon b9bac31d4a using stow nowe
2016-06-13 12:11:18 +02:00

249 lines
9.3 KiB
Plaintext

signature.txt A plugin to toggle, display and navigate marks
_________.__ __ ~
/ _____/|__| ____ ____ _____ _/ |_ __ __ _______ ____ ~
\_____ \ | | / ___\ / \ \__ \ \ __\| | \\_ __ \_/ __ \ ~
/ \| | / /_/ >| | \ / __ \_ | | | | / | | \/\ ___/ ~
/_______ /|__| \___ / |___| /(____ / |__| |____/ |__| \___ > ~
\/ /_____/ \/ \/ \/ ~
==============================================================================
1. Contents *signature-contents* *signature*
1. Contents |signature-contents|
2. Mappings |signature-mappings|
3. Commands |signature-commands|
4. Customization |signature-customization|
5. Contributing |signature-contributing|
6. Credits |signature-credits|
7. License |signature-license|
==============================================================================
2. Mappings *signature-mappings*
Out of the box, the followings mappings are defined by default
m[a-zA-Z] Toggle mark and display it in the leftmost column
m, Place the next available mark
m<Space> Delete all marks
]` Jump to next mark
[` Jump to prev mark
]' Jump to start of next line containing a mark
[' Jump to start of prev line containing a mark
`] Jump by alphabetical order to next mark
`[ Jump by alphabetical order to prev mark
'] Jump by alphabetical order to start of next line having a mark
'[ Jump by alphabetical order to start of prev line having a mark
m[0-9] Toggle the corresponding marker !@#$%^&*()
m<S-[0-9]> Remove all markers of the same type
]- Jump to next line having a marker of the same type
[- Jump to prev line having a marker of the same type
]= Jump to next line having a marker of any type
[= Jump to prev line having a marker of any type
m<BS> Remove all markers
This will allow the use of default behavior of m to set marks and, if
the line already contains the mark, it'll be unset. The default behavior
of ]', [', ]` and [` is supported and enhanced by wrapping around when
beginning or end of file is reached.
==============================================================================
3. Commands *signature-commands*
Signature provides just two commands
'SignatureToggleSigns'
Toggle the display of signs. This won't affect the marks or the mappings.
'SignatureRefresh'
Force the display of signs in the buffer to refresh. Use this to correct
the signs if things go awry
==============================================================================
4. Customization *signature-customization*
Set up Signature the way you want using the following options
*'g:SignatureMap'*
Type: Dictionary, Default:
To set up your own mappings copy the following dictionary and edit it
let g:SignatureMap = {
\ 'Leader' : "m",
\ 'PlaceNextMark' : ",",
\ 'PurgeMarks' : "<Space>",
\ 'PurgeMarkers' : "<BS>",
\ 'GotoNextLineAlpha' : "']",
\ 'GotoPrevLineAlpha' : "'[",
\ 'GotoNextSpotAlpha' : "`]",
\ 'GotoPrevSpotAlpha' : "`[",
\ 'GotoNextLineByPos' : "]'",
\ 'GotoPrevLineByPos' : "['",
\ 'GotoNextSpotByPos' : "]`",
\ 'GotoPrevSpotByPos' : "[`",
\ 'GotoNextMarker' : "]-",
\ 'GotoPrevMarker' : "[-",
\ 'GotoNextMarkerAny' : "]=",
\ 'GotoPrevMarkerAny' : "[=",
\ }
By default, it defines the mappings as shown in |signature-mappings|
To disable a map entirely, specify it as an empty string.
If a key is not specified, the default value will be picked up.
These same characters will be used to invoke the shortcuts.
*'g:SignatureIncludeMarks'*
String, Default : 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
Specify the marks that can be controlled by this plugin.
Only supports Alphabetical marks at the moment.
'b:SignatureIncludeMarks' can be set separately for buffer-specific marks.
*'g:SignatureIncludeMarkers'*
String, Default : '!@#$%^&*()'
Specify the markers that can be used by the plugin.
'b:SignatureIncludeMarkers' can be specified separately for each buffer
*g:SignatureMap['Leader']* *'SignatureMapLeader'*
String, Default: 'm'
Set the key used to toggle marks and markers.
For eg. If this key is set to `<leader>m`,
`<leader>ma` will toggle the mark 'a' on the current line
`<leader>m,` will place the next available mark
`<leader>m<Space>` will delete all marks
`<leader>m1` will toggle the marker '!'
`<leader>m!` will remove all the '!' markers
`<leader>m<BS>` will remove all markers
Note:
Currently, either marks or markers can be displayed in front of a line.
Both can't be displayed simultaenously.
To set this to mapleader or maplocalleader
let g:SignatureMap['Leader'] = '<Leader>'
let g:SignatureMap['Leader'] = '<LocalLeader>'
Assigning this to <LocalLeader> allows this to be buffer-specific
*'g:SignatureWrapJumps'*
Boolean, Default : 1
Specify if jumping to marks should wrap-around.
'b:SignatureWrapJumps' can be set to specify buffer-specific settings.
*'g:SignatureMarkOrder'*
String, Default : "\p\m"
Signature allows you to display upto marks in front of a line. This controls
the order in which marks are displayed.
'\m' indicates the current or latest mark placed on the line
'\p' indicates the previous mark placed on the line
For eg.
g:SignatureMarkOrder = "\m." : Display last mark with '.' suffixed
g:SignatureMarkOrder = "_\m" : Display last mark with '_' prefixed
g:SignatureMarkOrder = ">" : Display only a ">" for a line with a mark.
The mark is not displayed
g:SignatureMarkOrder = "\m\p" : Display last two marks placed
Note:
The signs feature allows only 2 characters to be displayed. This is not and
arbitratry limitation of the plugin.
*'g:SignatureMarkTextHL'*
String, Default : 'Exception'
The highlight group used for mark signs.
*'g:SignatureMarkerTextHL'*
String, Default : 'WarningMsg'
The highlight group used for marker signs.
*'g:SignaturePurgeConfirmation'*
Boolean, Default: 0
An option for the more clumsy-fingered of us. Asks for confirmation before
deleting all marks/markers
*'g:SignatureMenu'*
String, Default: "P&lugins.&Signature"
Set where the menu options are to be displayed. For more details refer,
`:h usr_42.txt`
To disable the menu, set to 0
*'g:SignaturePeriodicRefresh'*
Boolean, Default: 1
Enable the display to refresh periodically. Generally a good thing to have.
This makes use of the CursorHold autocmd event to execute periodically.
The frequency of this event can be controlled by changing the value of the
updatetime variable in milliseconds
`set updatetime = 100`
*'g:SignaturePrioritizeMarks'*
Boolean, Default: 1
When a line has both marks and markers, display the sign for marks. If set
to 0, it will display the sign for markers instead
*'g:SignatureEnabledAtStartup'*
Boolean, Default: 1
Control if the signs should be shown by default. If set to 0, the signs
won't be visible until `:SignatureToggleSigns` has been called
==============================================================================
5. Contributing *signature-contributing*
Please post any issues and all your suggestions on Github
https://github.com/kshenoy/vim-signature
Show some love by spreading the word and rating on
http://www.vim.org/scripts/script.php?script_id=4118
==============================================================================
6. Credits *signature-credits*
A great thanks to these guys for providing the idea and inspiration to develop
Signature
* Sergey Khorev for mark-tools
http://www.vim.org/scripts/script.php?script_id=2929
* Zak Johnson for vim-showmarks
https://github.com/zakj/vim-showmarks
I'd also like to thank Steve J. Losh for learningvimscriptthehardway.com
without whose detailed guide this plugin would not have seen the light of day.
==============================================================================
7. License *signature-license*
Signature is MIT/X11 licensed
vim:tw=78:ts=2:et:sts=2:sw=2:ft=help