First commit
This commit is contained in:
1022
.vim/doc/rails.txt
Normal file
1022
.vim/doc/rails.txt
Normal file
File diff suppressed because it is too large
Load Diff
264
.vim/doc/showmarks.txt
Normal file
264
.vim/doc/showmarks.txt
Normal file
@@ -0,0 +1,264 @@
|
||||
*showmarks.txt* Visually show the location of marks
|
||||
|
||||
By Anthony Kruize <trandor@labyrinth.net.au>
|
||||
Michael Geddes <michaelrgeddes@optushome.com.au>
|
||||
|
||||
|
||||
ShowMarks provides a visual representation of |marks| local to a buffer.
|
||||
Marks are useful for jumping back and forth between interesting points in a
|
||||
buffer, but can be hard to keep track of without any way to see where you have
|
||||
placed them.
|
||||
|
||||
ShowMarks hopefully makes life easier by placing a |sign| in the
|
||||
leftmost column of the buffer. The sign indicates the label of the mark and
|
||||
its location.
|
||||
|
||||
ShowMarks is activated by the |CursorHold| |autocommand| which is triggered
|
||||
every |updatetime| milliseconds. This is set to 4000(4 seconds) by default.
|
||||
If this is too slow, setting it to a lower value will make it more responsive.
|
||||
|
||||
Note: This plugin requires Vim 6.x compiled with the |+signs| feature.
|
||||
|
||||
===============================================================================
|
||||
1. Contents *showmarks* *showmarks-contents*
|
||||
|
||||
1. Contents |showmarks-contents|
|
||||
2. Configuration |showmarks-configuration|
|
||||
3. Highlighting |showmarks-highlighting|
|
||||
4. Key mappings |showmarks-mappings|
|
||||
5. Commands |showmarks-commands|
|
||||
6. ChangeLog |showmarks-changelog|
|
||||
|
||||
Appendix
|
||||
A. Using marks |marks|
|
||||
B. Using signs |sign|
|
||||
C. Defining updatetime |updatetime|
|
||||
D. Defining a mapleader |mapleader|
|
||||
E. Defining highlighting |highlight|
|
||||
|
||||
===============================================================================
|
||||
2. Configuration *showmarks-configuration*
|
||||
|
||||
ShowMarks can be configured to suit your needs.
|
||||
The following options can be added to your |vimrc| to change how ShowMarks
|
||||
behaves:
|
||||
|
||||
*'showmarks_enable'*
|
||||
'showmarks_enable' boolean (default: 1)
|
||||
global
|
||||
This option enables or disables ShowMarks on startup. Normally ShowMarks
|
||||
will be enabled when Vim starts, setting this to 0 will disable ShowMarks
|
||||
by default.
|
||||
ShowMarks can be turned back on using the |ShowMarksToggle| command.
|
||||
|
||||
*'showmarks_include'*
|
||||
'showmarks_include' string (default:
|
||||
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.'`^<>[]{}()\"")
|
||||
global or local to buffer
|
||||
This option specifies which marks will be shown and in which order if
|
||||
placed on the same line. Marks earlier in the list take precedence over
|
||||
marks later in the list.
|
||||
This option can also be specified as a buffer option which will override
|
||||
the global version.
|
||||
|
||||
NOTE: When including the " mark, it must be escaped with a \.
|
||||
|
||||
For example to only include marks 'abcdefzxABHJio', in that order:
|
||||
>
|
||||
let g:showmarks_include="abcdefzxABJio"
|
||||
<
|
||||
To override this for a particular buffer with 'ABCDhj.'^':
|
||||
>
|
||||
let b:showmarks_include="abcdefzxABJio"
|
||||
<
|
||||
*'showmarks_ignore_type'*
|
||||
'showmarks_ignore_type' string (default: "hq")
|
||||
global
|
||||
This option defines which types of buffers should be ignored.
|
||||
Each type is represented by a letter. This option is not case-sensitive.
|
||||
Valid buffer types are:
|
||||
- h : Help
|
||||
- m : Non-modifiable
|
||||
- p : Preview
|
||||
- q : Quickfix
|
||||
- r : Readonly
|
||||
|
||||
For example to ignore help, preview and readonly files:
|
||||
>
|
||||
let g:showmarks_ignore_type="hpr"
|
||||
<
|
||||
*'showmarks_ignore_name'*
|
||||
'showmarks_textlower' string (default: ">" )
|
||||
global
|
||||
This option defines how the marks a-z will be displayed.
|
||||
A maximum of two characters can be defined.
|
||||
To include the mark in the text use a tab(\t) character. A single
|
||||
character will display as the mark with the character suffixed (same as
|
||||
"\t<character>"). Specifying two characters will simply display those two
|
||||
characters.
|
||||
|
||||
Some examples:
|
||||
To display the mark with a > suffixed: >
|
||||
let g:showmarks_textlower="\t>"
|
||||
< or >
|
||||
let g:showmarks_textlower=">"
|
||||
<
|
||||
To display the mark with a ( prefixed: >
|
||||
let g:showmarks_textlower="(\t"
|
||||
<
|
||||
To display two > characters: >
|
||||
let g:showmarks_textlower=">>"
|
||||
<
|
||||
*'showmarks_textupper'*
|
||||
'showmarks_textupper' string (default: ">")
|
||||
global
|
||||
This option defines how the marks A-Z will be displayed. It behaves the same
|
||||
as the |'showmarks_textlower'| option.
|
||||
|
||||
*'showmarks_textother'*
|
||||
'showmarks_textother' string (default: ">")
|
||||
global
|
||||
This option defines how all other marks will be displayed. It behaves the
|
||||
same as the |'showmarks_textlower'| option.
|
||||
|
||||
'showmarks_hlline_lower' boolean (default: 0) *'showmarks_hlline_lower'*
|
||||
global
|
||||
This option defines whether the entire line a lowercase mark is on will
|
||||
be highlighted.
|
||||
|
||||
'showmarks_hlline_upper' boolean (default: 0) *'showmarks_hlline_upper'*
|
||||
global
|
||||
This option defines whether the entire line an uppercase mark is on will
|
||||
be highlighted.
|
||||
|
||||
'showmarks_hlline_other' boolean (default: 0) *'showmarks_hlline_other'*
|
||||
global
|
||||
This option defines whether the entire line other marks are on will be
|
||||
highlighted.
|
||||
|
||||
===============================================================================
|
||||
3. Highlighting *showmarks-highlighting*
|
||||
|
||||
Four highlighting groups are used by ShowMarks to define the colours used to
|
||||
highlight each of the marks.
|
||||
|
||||
- ShowMarksHLl : This group is used to highlight all the lowercase marks.
|
||||
- ShowMarksHLu : This group is used to highlight all the uppercase marks.
|
||||
- ShowMarksHLo : This group is used to highlight all other marks.
|
||||
- ShowMarksHLm : This group is used when multiple marks are on the same line.
|
||||
|
||||
You can define your own highlighting by overriding these groups in your |vimrc|.
|
||||
For example: >
|
||||
|
||||
highlight ShowMarksHLl guifg=red guibg=green
|
||||
<
|
||||
Will set all lowercase marks to be red on green when running in GVim.
|
||||
See |highlight| for more information.
|
||||
|
||||
===============================================================================
|
||||
4. Mappings *showmarks-mappings*
|
||||
|
||||
The following mappings are setup by default:
|
||||
|
||||
<Leader>mt - Toggles ShowMarks on and off.
|
||||
<Leader>mo - Forces ShowMarks on.
|
||||
<Leader>mh - Clears the mark at the current line.
|
||||
<Leader>ma - Clears all marks in the current buffer.
|
||||
<Leader>mm - Places the next available mark on the current line.
|
||||
|
||||
(see |mapleader| for how to setup the mapleader variable.)
|
||||
|
||||
===============================================================================
|
||||
5. Commands *showmarks-commands*
|
||||
|
||||
*ShowMarksToggle*
|
||||
:ShowMarksToggle
|
||||
This command will toggle the display of marks on or off.
|
||||
|
||||
|
||||
:ShowMarksOn *ShowMarksOn*
|
||||
This command will force the display of marks on.
|
||||
|
||||
*ShowMarksClearMark*
|
||||
:ShowMarksClearMark
|
||||
This command will clear the mark on the current line.
|
||||
It doesn't actually remove the mark, it simply moves it to line 1 and
|
||||
removes the sign.
|
||||
|
||||
*ShowMarksClearAll*
|
||||
:ShowMarksClearAll
|
||||
This command will clear all marks in the current buffer.
|
||||
It doesn't actually remove the marks, it simply moves them to line 1 and
|
||||
removes the signs.
|
||||
|
||||
*ShowMarksPlaceMark*
|
||||
:ShowMarksPlaceMark
|
||||
This command will place the next available mark on the current line. This
|
||||
effectively automates mark placement so you don't have to remember which
|
||||
marks are placed or not. Hidden marks are considered to be available.
|
||||
NOTE: Only marks a-z are supported by this function.
|
||||
|
||||
===============================================================================
|
||||
6. ChangeLog *showmarks-changelog*
|
||||
|
||||
2.2 - 2004-08-17
|
||||
Fixed highlighting of the A-Z marks when ignorecase is on. (Mike Kelly)
|
||||
Fixed the delay with ShowMarks triggering when entering a buffer for the
|
||||
first time. (Mikolaj Machowski)
|
||||
Added support for highlighting the entire line where a mark is placed.
|
||||
Now uses HelpExtractor by Charles E. Campbell to install the help file.
|
||||
|
||||
2.1 - 2004-03-04
|
||||
Added ShowMarksOn. It forces ShowMarks to be enabled whether it's on or not.
|
||||
(Gary Holloway)
|
||||
Marks now have a definable order of precedence for when mulitple alpha marks
|
||||
have been placed on the same line. A new highlight group, ShowMarksHLm is
|
||||
used to identify this situation. (Gary Holloway)
|
||||
- showmarks_include has changed accordingly.
|
||||
- ShowMarksHL is now ShowMarksHLl.
|
||||
ShowMarksPlaceMark now places marks in the order specified by
|
||||
showmarks_include. (Gary Holloway)
|
||||
showmarks_include can now be specified per buffer. (Gary Holloway)
|
||||
|
||||
2.0 - 2003-08-11
|
||||
Added ability to ignore buffers by type.
|
||||
Fixed toggling ShowMarks off when switching buffers.
|
||||
ShowMarksHideMark and ShowMarksHideAll have been renamed to
|
||||
ShowMarksClearMark and ShowMarksClearAll.
|
||||
Marks a-z, A-Z and others now have different highlighting from each other.
|
||||
Added support for all other marks. (Gary Holloway)
|
||||
Enhanced customization of how marks are displayed by allowing a prefix to
|
||||
be specified.(Gary Holloway & Anthony Kruize)
|
||||
Fixed CursorHold autocmd triggering even when ShowMarks is disabled.
|
||||
(Charles E. Campbell)
|
||||
|
||||
1.5 - 2002-07-16
|
||||
Added ability to customize how the marks are displayed.
|
||||
|
||||
1.4 - 2002-05-29
|
||||
Added support for placing the next available mark.
|
||||
(Thanks to Shishir Ramam for the idea)
|
||||
Added support for hiding all marks.
|
||||
Marks on line 1 are no longer shown. This stops hidden marks from
|
||||
reappearing when the file is opened again.
|
||||
Added a help file.
|
||||
|
||||
1.3 - 2002-05-20
|
||||
Fixed toggling ShowMarks not responding immediately.
|
||||
Added user commands for toggling/hiding marks.
|
||||
Added ability to disable ShowMarks by default.
|
||||
|
||||
1.2 - 2002-03-06
|
||||
Added a check that Vim was compiled with +signs support.
|
||||
Added the ability to define which marks are shown.
|
||||
Removed debugging code that was accidently left in.
|
||||
|
||||
1.1 - 2002-02-05
|
||||
Added support for the A-Z marks.
|
||||
Fixed sign staying placed if the line it was on is deleted.
|
||||
Clear autocommands before making new ones.
|
||||
|
||||
1.0 - 2001-11-20
|
||||
First release.
|
||||
|
||||
vim:tw=78:ts=8:ft=help
|
||||
1501
.vim/doc/taglist.txt
Executable file
1501
.vim/doc/taglist.txt
Executable file
File diff suppressed because it is too large
Load Diff
161
.vim/doc/tags
Normal file
161
.vim/doc/tags
Normal file
@@ -0,0 +1,161 @@
|
||||
'Tlist_Auto_Highlight_Tag' taglist.txt /*'Tlist_Auto_Highlight_Tag'*
|
||||
'Tlist_Auto_Open' taglist.txt /*'Tlist_Auto_Open'*
|
||||
'Tlist_Auto_Update' taglist.txt /*'Tlist_Auto_Update'*
|
||||
'Tlist_Close_On_Select' taglist.txt /*'Tlist_Close_On_Select'*
|
||||
'Tlist_Compact_Format' taglist.txt /*'Tlist_Compact_Format'*
|
||||
'Tlist_Ctags_Cmd' taglist.txt /*'Tlist_Ctags_Cmd'*
|
||||
'Tlist_Display_Prototype' taglist.txt /*'Tlist_Display_Prototype'*
|
||||
'Tlist_Display_Tag_Scope' taglist.txt /*'Tlist_Display_Tag_Scope'*
|
||||
'Tlist_Enable_Fold_Column' taglist.txt /*'Tlist_Enable_Fold_Column'*
|
||||
'Tlist_Exit_OnlyWindow' taglist.txt /*'Tlist_Exit_OnlyWindow'*
|
||||
'Tlist_File_Fold_Auto_Close' taglist.txt /*'Tlist_File_Fold_Auto_Close'*
|
||||
'Tlist_GainFocus_On_ToggleOpen' taglist.txt /*'Tlist_GainFocus_On_ToggleOpen'*
|
||||
'Tlist_Highlight_Tag_On_BufEnter' taglist.txt /*'Tlist_Highlight_Tag_On_BufEnter'*
|
||||
'Tlist_Inc_Winwidth' taglist.txt /*'Tlist_Inc_Winwidth'*
|
||||
'Tlist_Max_Submenu_Items' taglist.txt /*'Tlist_Max_Submenu_Items'*
|
||||
'Tlist_Max_Tag_Length' taglist.txt /*'Tlist_Max_Tag_Length'*
|
||||
'Tlist_Process_File_Always' taglist.txt /*'Tlist_Process_File_Always'*
|
||||
'Tlist_Show_Menu' taglist.txt /*'Tlist_Show_Menu'*
|
||||
'Tlist_Show_One_File' taglist.txt /*'Tlist_Show_One_File'*
|
||||
'Tlist_Sort_Type' taglist.txt /*'Tlist_Sort_Type'*
|
||||
'Tlist_Use_Horiz_Window' taglist.txt /*'Tlist_Use_Horiz_Window'*
|
||||
'Tlist_Use_Right_Window' taglist.txt /*'Tlist_Use_Right_Window'*
|
||||
'Tlist_Use_SingleClick' taglist.txt /*'Tlist_Use_SingleClick'*
|
||||
'Tlist_WinHeight' taglist.txt /*'Tlist_WinHeight'*
|
||||
'Tlist_WinWidth' taglist.txt /*'Tlist_WinWidth'*
|
||||
'showmarks_enable' showmarks.txt /*'showmarks_enable'*
|
||||
'showmarks_hlline_lower' showmarks.txt /*'showmarks_hlline_lower'*
|
||||
'showmarks_hlline_other' showmarks.txt /*'showmarks_hlline_other'*
|
||||
'showmarks_hlline_upper' showmarks.txt /*'showmarks_hlline_upper'*
|
||||
'showmarks_ignore_name' showmarks.txt /*'showmarks_ignore_name'*
|
||||
'showmarks_ignore_type' showmarks.txt /*'showmarks_ignore_type'*
|
||||
'showmarks_include' showmarks.txt /*'showmarks_include'*
|
||||
'showmarks_textother' showmarks.txt /*'showmarks_textother'*
|
||||
'showmarks_textupper' showmarks.txt /*'showmarks_textupper'*
|
||||
:CVSEdit vcscommand.txt /*:CVSEdit*
|
||||
:CVSEditors vcscommand.txt /*:CVSEditors*
|
||||
:CVSUnedit vcscommand.txt /*:CVSUnedit*
|
||||
:CVSWatch vcscommand.txt /*:CVSWatch*
|
||||
:CVSWatchAdd vcscommand.txt /*:CVSWatchAdd*
|
||||
:CVSWatchOff vcscommand.txt /*:CVSWatchOff*
|
||||
:CVSWatchOn vcscommand.txt /*:CVSWatchOn*
|
||||
:CVSWatchRemove vcscommand.txt /*:CVSWatchRemove*
|
||||
:CVSWatchers vcscommand.txt /*:CVSWatchers*
|
||||
:TlistAddFiles taglist.txt /*:TlistAddFiles*
|
||||
:TlistAddFilesRecursive taglist.txt /*:TlistAddFilesRecursive*
|
||||
:TlistClose taglist.txt /*:TlistClose*
|
||||
:TlistDebug taglist.txt /*:TlistDebug*
|
||||
:TlistHighlightTag taglist.txt /*:TlistHighlightTag*
|
||||
:TlistLock taglist.txt /*:TlistLock*
|
||||
:TlistMessages taglist.txt /*:TlistMessages*
|
||||
:TlistOpen taglist.txt /*:TlistOpen*
|
||||
:TlistSessionLoad taglist.txt /*:TlistSessionLoad*
|
||||
:TlistSessionSave taglist.txt /*:TlistSessionSave*
|
||||
:TlistShowPrototype taglist.txt /*:TlistShowPrototype*
|
||||
:TlistShowTag taglist.txt /*:TlistShowTag*
|
||||
:TlistToggle taglist.txt /*:TlistToggle*
|
||||
:TlistUndebug taglist.txt /*:TlistUndebug*
|
||||
:TlistUnlock taglist.txt /*:TlistUnlock*
|
||||
:TlistUpdate taglist.txt /*:TlistUpdate*
|
||||
:VCSAdd vcscommand.txt /*:VCSAdd*
|
||||
:VCSAnnotate vcscommand.txt /*:VCSAnnotate*
|
||||
:VCSBlame vcscommand.txt /*:VCSBlame*
|
||||
:VCSCommit vcscommand.txt /*:VCSCommit*
|
||||
:VCSDelete vcscommand.txt /*:VCSDelete*
|
||||
:VCSDiff vcscommand.txt /*:VCSDiff*
|
||||
:VCSGotoOriginal vcscommand.txt /*:VCSGotoOriginal*
|
||||
:VCSInfo vcscommand.txt /*:VCSInfo*
|
||||
:VCSLock vcscommand.txt /*:VCSLock*
|
||||
:VCSLog vcscommand.txt /*:VCSLog*
|
||||
:VCSRemove vcscommand.txt /*:VCSRemove*
|
||||
:VCSRevert vcscommand.txt /*:VCSRevert*
|
||||
:VCSReview vcscommand.txt /*:VCSReview*
|
||||
:VCSStatus vcscommand.txt /*:VCSStatus*
|
||||
:VCSUnlock vcscommand.txt /*:VCSUnlock*
|
||||
:VCSUpdate vcscommand.txt /*:VCSUpdate*
|
||||
:VCSVimDiff vcscommand.txt /*:VCSVimDiff*
|
||||
ShowMarksClearAll showmarks.txt /*ShowMarksClearAll*
|
||||
ShowMarksClearMark showmarks.txt /*ShowMarksClearMark*
|
||||
ShowMarksOn showmarks.txt /*ShowMarksOn*
|
||||
ShowMarksPlaceMark showmarks.txt /*ShowMarksPlaceMark*
|
||||
ShowMarksToggle showmarks.txt /*ShowMarksToggle*
|
||||
Tlist_Get_Tag_Prototype_By_Line() taglist.txt /*Tlist_Get_Tag_Prototype_By_Line()*
|
||||
Tlist_Get_Tagname_By_Line() taglist.txt /*Tlist_Get_Tagname_By_Line()*
|
||||
Tlist_Set_App() taglist.txt /*Tlist_Set_App()*
|
||||
Tlist_Update_File_Tags() taglist.txt /*Tlist_Update_File_Tags()*
|
||||
VCSCommandCVSDiffOpt vcscommand.txt /*VCSCommandCVSDiffOpt*
|
||||
VCSCommandCVSExec vcscommand.txt /*VCSCommandCVSExec*
|
||||
VCSCommandCommitOnWrite vcscommand.txt /*VCSCommandCommitOnWrite*
|
||||
VCSCommandDeleteOnHide vcscommand.txt /*VCSCommandDeleteOnHide*
|
||||
VCSCommandDiffSplit vcscommand.txt /*VCSCommandDiffSplit*
|
||||
VCSCommandDisableAll vcscommand.txt /*VCSCommandDisableAll*
|
||||
VCSCommandDisableExtensionMappings vcscommand.txt /*VCSCommandDisableExtensionMappings*
|
||||
VCSCommandDisableMappings vcscommand.txt /*VCSCommandDisableMappings*
|
||||
VCSCommandDisableMenu vcscommand.txt /*VCSCommandDisableMenu*
|
||||
VCSCommandEdit vcscommand.txt /*VCSCommandEdit*
|
||||
VCSCommandEnableBufferSetup vcscommand.txt /*VCSCommandEnableBufferSetup*
|
||||
VCSCommandMapPrefix vcscommand.txt /*VCSCommandMapPrefix*
|
||||
VCSCommandMappings vcscommand.txt /*VCSCommandMappings*
|
||||
VCSCommandMenuPriority vcscommand.txt /*VCSCommandMenuPriority*
|
||||
VCSCommandMenuRoot vcscommand.txt /*VCSCommandMenuRoot*
|
||||
VCSCommandResultBufferNameExtension vcscommand.txt /*VCSCommandResultBufferNameExtension*
|
||||
VCSCommandResultBufferNameFunction vcscommand.txt /*VCSCommandResultBufferNameFunction*
|
||||
VCSCommandSVKExec vcscommand.txt /*VCSCommandSVKExec*
|
||||
VCSCommandSVNDiffExt vcscommand.txt /*VCSCommandSVNDiffExt*
|
||||
VCSCommandSVNDiffOpt vcscommand.txt /*VCSCommandSVNDiffOpt*
|
||||
VCSCommandSVNExec vcscommand.txt /*VCSCommandSVNExec*
|
||||
VCSCommandSplit vcscommand.txt /*VCSCommandSplit*
|
||||
VCSCommandVCSTypeOverride vcscommand.txt /*VCSCommandVCSTypeOverride*
|
||||
b:VCSCommandCommand vcscommand.txt /*b:VCSCommandCommand*
|
||||
b:VCSCommandOriginalBuffer vcscommand.txt /*b:VCSCommandOriginalBuffer*
|
||||
b:VCSCommandSourceFile vcscommand.txt /*b:VCSCommandSourceFile*
|
||||
b:VCSCommandVCSType vcscommand.txt /*b:VCSCommandVCSType*
|
||||
cvscommand-changes vcscommand.txt /*cvscommand-changes*
|
||||
showmarks showmarks.txt /*showmarks*
|
||||
showmarks-changelog showmarks.txt /*showmarks-changelog*
|
||||
showmarks-commands showmarks.txt /*showmarks-commands*
|
||||
showmarks-configuration showmarks.txt /*showmarks-configuration*
|
||||
showmarks-contents showmarks.txt /*showmarks-contents*
|
||||
showmarks-highlighting showmarks.txt /*showmarks-highlighting*
|
||||
showmarks-mappings showmarks.txt /*showmarks-mappings*
|
||||
showmarks.txt showmarks.txt /*showmarks.txt*
|
||||
taglist-commands taglist.txt /*taglist-commands*
|
||||
taglist-debug taglist.txt /*taglist-debug*
|
||||
taglist-extend taglist.txt /*taglist-extend*
|
||||
taglist-faq taglist.txt /*taglist-faq*
|
||||
taglist-functions taglist.txt /*taglist-functions*
|
||||
taglist-install taglist.txt /*taglist-install*
|
||||
taglist-internet taglist.txt /*taglist-internet*
|
||||
taglist-intro taglist.txt /*taglist-intro*
|
||||
taglist-keys taglist.txt /*taglist-keys*
|
||||
taglist-license taglist.txt /*taglist-license*
|
||||
taglist-menu taglist.txt /*taglist-menu*
|
||||
taglist-options taglist.txt /*taglist-options*
|
||||
taglist-requirements taglist.txt /*taglist-requirements*
|
||||
taglist-session taglist.txt /*taglist-session*
|
||||
taglist-todo taglist.txt /*taglist-todo*
|
||||
taglist-using taglist.txt /*taglist-using*
|
||||
taglist.txt taglist.txt /*taglist.txt*
|
||||
vcscommand vcscommand.txt /*vcscommand*
|
||||
vcscommand-buffer-management vcscommand.txt /*vcscommand-buffer-management*
|
||||
vcscommand-buffer-variables vcscommand.txt /*vcscommand-buffer-variables*
|
||||
vcscommand-bugs vcscommand.txt /*vcscommand-bugs*
|
||||
vcscommand-commands vcscommand.txt /*vcscommand-commands*
|
||||
vcscommand-config vcscommand.txt /*vcscommand-config*
|
||||
vcscommand-contents vcscommand.txt /*vcscommand-contents*
|
||||
vcscommand-customize vcscommand.txt /*vcscommand-customize*
|
||||
vcscommand-events vcscommand.txt /*vcscommand-events*
|
||||
vcscommand-install vcscommand.txt /*vcscommand-install*
|
||||
vcscommand-intro vcscommand.txt /*vcscommand-intro*
|
||||
vcscommand-manual vcscommand.txt /*vcscommand-manual*
|
||||
vcscommand-mappings vcscommand.txt /*vcscommand-mappings*
|
||||
vcscommand-mappings-override vcscommand.txt /*vcscommand-mappings-override*
|
||||
vcscommand-naming vcscommand.txt /*vcscommand-naming*
|
||||
vcscommand-options vcscommand.txt /*vcscommand-options*
|
||||
vcscommand-ssh vcscommand.txt /*vcscommand-ssh*
|
||||
vcscommand-ssh-config vcscommand.txt /*vcscommand-ssh-config*
|
||||
vcscommand-ssh-env vcscommand.txt /*vcscommand-ssh-env*
|
||||
vcscommand-ssh-other vcscommand.txt /*vcscommand-ssh-other*
|
||||
vcscommand-ssh-wrapper vcscommand.txt /*vcscommand-ssh-wrapper*
|
||||
vcscommand-statusline vcscommand.txt /*vcscommand-statusline*
|
||||
vcscommand.txt vcscommand.txt /*vcscommand.txt*
|
||||
835
.vim/doc/vcscommand.txt
Normal file
835
.vim/doc/vcscommand.txt
Normal file
@@ -0,0 +1,835 @@
|
||||
*vcscommand.txt* vcscommand
|
||||
Copyright (c) Bob Hiestand
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
|
||||
For instructions on installing this file, type
|
||||
:help add-local-help
|
||||
inside Vim.
|
||||
|
||||
Author: Bob Hiestand <bob.hiestand@gmail.com>
|
||||
Credits: Benji Fisher's excellent MatchIt documentation
|
||||
|
||||
==============================================================================
|
||||
1. Contents *vcscommand-contents*
|
||||
|
||||
Installation : |vcscommand-install|
|
||||
vcscommand Intro : |vcscommand|
|
||||
vcscommand Manual : |vcscommand-manual|
|
||||
Customization : |vcscommand-customize|
|
||||
SSH "integration" : |vcscommand-ssh|
|
||||
Changes from cvscommand : |cvscommand-changes|
|
||||
Bugs : |vcscommand-bugs|
|
||||
|
||||
==============================================================================
|
||||
|
||||
2. vcscommand Installation *vcscommand-install*
|
||||
|
||||
The vcscommand plugin comprises five files: vcscommand.vim, vcssvn.vim,
|
||||
vcscvs.vim, vcssvk.vim and vcscommand.txt (this file). In order to install
|
||||
the plugin, place the vcscommand.vim, vcssvn.vim, vcssvk.vim, and vcscvs.vim
|
||||
files into a plugin directory in your runtime path (please see
|
||||
|add-global-plugin| and |'runtimepath'|.
|
||||
|
||||
This help file can be included in the VIM help system by copying it into a
|
||||
'doc' directory in your runtime path and then executing the |:helptags|
|
||||
command, specifying the full path of the 'doc' directory. Please see
|
||||
|add-local-help| for more details.
|
||||
|
||||
vcscommand may be customized by setting variables, creating maps, and
|
||||
specifying event handlers. Please see |vcscommand-customize| for more
|
||||
details.
|
||||
|
||||
==============================================================================
|
||||
|
||||
3. vcscommand Intro *vcscommand*
|
||||
*vcscommand-intro*
|
||||
|
||||
The vcscommand plugin provides global ex commands for manipulating
|
||||
version-controlled source files, currently those controlled either by CVS or
|
||||
Subversion. In general, each command operates on the current buffer and
|
||||
accomplishes a separate source control function, such as update, commit, log,
|
||||
and others (please see |vcscommand-commands| for a list of all available
|
||||
commands). The results of each operation are displayed in a scratch buffer.
|
||||
Several buffer variables are defined for those scratch buffers (please see
|
||||
|vcscommand-buffer-variables|).
|
||||
|
||||
The notion of "current file" means either the current buffer, or, in the case
|
||||
of a directory buffer (such as Explorer or netrw buffers), the directory (and
|
||||
all subdirectories) represented by the the buffer.
|
||||
|
||||
For convenience, any vcscommand invoked on a vcscommand scratch buffer acts as
|
||||
though it was invoked on the original file and splits the screen so that the
|
||||
output appears in a new window.
|
||||
|
||||
Many of the commands accept revisions as arguments. By default, most operate
|
||||
on the most recent revision on the current branch if no revision is specified.
|
||||
|
||||
Each vcscommand is mapped to a key sequence starting with the |<Leader>|
|
||||
keystroke. The default mappings may be overridden by supplying different
|
||||
mappings before the plugin is loaded, such as in the vimrc, in the standard
|
||||
fashion for plugin mappings. For examples, please see
|
||||
|vcscommand-mappings-override|.
|
||||
|
||||
The vcscommand plugin may be configured in several ways. For more details,
|
||||
please see |vcscommand-customize|.
|
||||
|
||||
==============================================================================
|
||||
|
||||
4. vcscommand Manual *vcscommand-manual*
|
||||
|
||||
4.1 vcscommand commands *vcscommand-commands*
|
||||
|
||||
vcscommand defines the following commands:
|
||||
|
||||
|:VCSAdd|
|
||||
|:VCSAnnotate|
|
||||
|:VCSBlame|
|
||||
|:VCSCommit|
|
||||
|:VCSDelete|
|
||||
|:VCSDiff|
|
||||
|:VCSGotoOriginal|
|
||||
|:VCSLog|
|
||||
|:VCSRemove|
|
||||
|:VCSRevert|
|
||||
|:VCSReview|
|
||||
|:VCSStatus|
|
||||
|:VCSUpdate|
|
||||
|:VCSVimDiff|
|
||||
|
||||
The following commands are specific to CVS files:
|
||||
|
||||
|:CVSEdit|
|
||||
|:CVSEditors|
|
||||
|:CVSUnedit|
|
||||
|:CVSWatch|
|
||||
|:CVSWatchAdd|
|
||||
|:CVSWatchOn|
|
||||
|:CVSWatchOff|
|
||||
|:CVSWatchRemove|
|
||||
|:CVSWatchers|
|
||||
|
||||
:VCSAdd *:VCSAdd*
|
||||
|
||||
This command adds the current file to source control. Please note, this does
|
||||
not commit the newly-added file. All parameters to the command are passed to
|
||||
the underlying VCS.
|
||||
|
||||
:VCSAnnotate[!] *:VCSAnnotate*
|
||||
|
||||
This command displays the current file with each line annotated with the
|
||||
version in which it was most recently changed. If an argument is given, the
|
||||
argument is used as a revision number to display. If not given an argument,
|
||||
it uses the most recent version of the file (on the current branch, if under
|
||||
CVS control). Additionally, if the current buffer is a VCSAnnotate buffer
|
||||
already, the version number on the current line is used.
|
||||
|
||||
If '!' is used, the view of the annotated buffer is split so that the
|
||||
annotation is in a separate window from the content, and each is highlighted
|
||||
separately.
|
||||
|
||||
For CVS buffers, the 'VCSCommandCVSAnnotateParent' option, if set to non-zero,
|
||||
will cause the above behavior to change. Instead of annotating the version on
|
||||
the current line, the parent revision is used instead, crossing branches if
|
||||
necessary.
|
||||
|
||||
With no arguments the cursor will jump to the line in the annotated buffer
|
||||
corresponding to the current line in the source buffer.
|
||||
|
||||
:VCSBlame[!] *:VCSBlame*
|
||||
|
||||
Alias for |:VCSAnnotate|.
|
||||
|
||||
:VCSCommit[!] *:VCSCommit*
|
||||
|
||||
This command commits changes to the current file to source control.
|
||||
|
||||
If called with arguments, the arguments are the log message.
|
||||
|
||||
If '!' is used, an empty log message is committed.
|
||||
|
||||
If called with no arguments, this is a two-step command. The first step opens
|
||||
a buffer to accept a log message. When that buffer is written, it is
|
||||
automatically closed and the file is committed using the information from that
|
||||
log message. The commit can be abandoned if the log message buffer is deleted
|
||||
or wiped before being written.
|
||||
|
||||
Alternatively, the mapping that is used to invoke :VCSCommit (by default
|
||||
|<Leader>|cc, please see |vcscommand-mappings|) can be used in the log message
|
||||
buffer in Normal mode to immediately commit. This is useful if the
|
||||
|VCSCommandCommitOnWrite| variable is set to 0 to disable the normal
|
||||
commit-on-write behavior.
|
||||
|
||||
:VCSDelete *:VCSDelete*
|
||||
|
||||
Deletes the current file and removes it from source control. All parameters
|
||||
to the command are passed to the underlying VCS.
|
||||
|
||||
:VCSDiff *:VCSDiff*
|
||||
|
||||
With no arguments, this displays the differences between the current file and
|
||||
its parent version under source control in a new scratch buffer.
|
||||
|
||||
With one argument, the diff is performed on the current file against the
|
||||
specified revision.
|
||||
|
||||
With two arguments, the diff is performed between the specified revisions of
|
||||
the current file.
|
||||
|
||||
For CVS, this command uses the |VCSCommandCVSDiffOpt| variable to specify diff
|
||||
options. If that variable does not exist, a plugin-specific default is used.
|
||||
If you wish to have no options, then set it to the empty string.
|
||||
|
||||
For SVN, this command uses the |VCSCommandSVNDiffOpt| variable to specify diff
|
||||
options. If that variable does not exist, the SVN default is used.
|
||||
Additionally, |VCSCommandSVNDiffExt| can be used to select an external diff
|
||||
application.
|
||||
|
||||
:VCSGotoOriginal *:VCSGotoOriginal*
|
||||
|
||||
This command jumps to the source buffer if the current buffer is a VCS scratch
|
||||
buffer.
|
||||
|
||||
:VCSGotoOriginal!
|
||||
|
||||
Like ":VCSGotoOriginal" but also executes :bufwipeout on all VCS scrach
|
||||
buffers associated with the original file.
|
||||
|
||||
:VCSInfo *:VCSInfo*
|
||||
|
||||
This command displays extended information about the current file in a new
|
||||
scratch buffer.
|
||||
|
||||
:VCSLock *:VCSLock*
|
||||
|
||||
This command locks the current file in order to prevent other users from
|
||||
concurrently modifying it. The exact semantics of this command depend on the
|
||||
underlying VCS. This does nothing in CVS. All parameters are passed to the
|
||||
underlying VCS.
|
||||
|
||||
:VCSLog *:VCSLog*
|
||||
|
||||
Displays the version history of the current file in a new scratch buffer. If
|
||||
there is one parameter supplied, it is taken as as a revision parameters to be
|
||||
passed through to the underlying VCS. Otherwise, all parameters are passed to
|
||||
the underlying VCS.
|
||||
|
||||
:VCSRemove *:VCSRemove*
|
||||
|
||||
Alias for |:VCSDelete|.
|
||||
|
||||
:VCSRevert *:VCSRevert*
|
||||
|
||||
This command replaces the current file with the most recent version from the
|
||||
repository in order to wipe out any undesired changes.
|
||||
|
||||
:VCSReview *:VCSReview*
|
||||
|
||||
Displays a particular version of the current file in a new scratch buffer. If
|
||||
no argument is given, the most recent version of the file on the current
|
||||
branch is retrieved.
|
||||
|
||||
:VCSStatus *:VCSStatus*
|
||||
|
||||
Displays versioning information about the current file in a new scratch
|
||||
buffer. All parameters are passed to the underlying VCS.
|
||||
|
||||
|
||||
:VCSUnlock *:VCSUnlock*
|
||||
|
||||
Unlocks the current file in order to allow other users from concurrently
|
||||
modifying it. The exact semantics of this command depend on the underlying
|
||||
VCS. All parameters are passed to the underlying VCS.
|
||||
|
||||
:VCSUpdate *:VCSUpdate*
|
||||
|
||||
Updates the current file with any relevant changes from the repository. This
|
||||
intentionally does not automatically reload the current buffer, though vim
|
||||
should prompt the user to do so if the underlying file is altered by this
|
||||
command.
|
||||
|
||||
:VCSVimDiff *:VCSVimDiff*
|
||||
|
||||
Uses vimdiff to display differences between versions of the current file.
|
||||
|
||||
If no revision is specified, the most recent version of the file on the
|
||||
current branch is used. With one argument, that argument is used as the
|
||||
revision as above. With two arguments, the differences between the two
|
||||
revisions is displayed using vimdiff.
|
||||
|
||||
With either zero or one argument, the original buffer is used to perform the
|
||||
vimdiff. When the scratch buffer is closed, the original buffer will be
|
||||
returned to normal mode.
|
||||
|
||||
Once vimdiff mode is started using the above methods, additional vimdiff
|
||||
buffers may be added by passing a single version argument to the command.
|
||||
There may be up to 4 vimdiff buffers total.
|
||||
|
||||
Using the 2-argument form of the command resets the vimdiff to only those 2
|
||||
versions. Additionally, invoking the command on a different file will close
|
||||
the previous vimdiff buffers.
|
||||
|
||||
:CVSEdit *:CVSEdit*
|
||||
|
||||
This command performs "cvs edit" on the current file. Yes, the output buffer
|
||||
in this case is almost completely useless.
|
||||
|
||||
:CVSEditors *:CVSEditors*
|
||||
|
||||
This command performs "cvs edit" on the current file.
|
||||
|
||||
:CVSUnedit *:CVSUnedit*
|
||||
|
||||
Performs "cvs unedit" on the current file. Again, yes, the output buffer here
|
||||
is basically useless.
|
||||
|
||||
:CVSWatch *:CVSWatch*
|
||||
|
||||
This command takes an argument which must be one of [on|off|add|remove]. The
|
||||
command performs "cvs watch" with the given argument on the current file.
|
||||
|
||||
:CVSWatchAdd *:CVSWatchAdd*
|
||||
|
||||
This command is an alias for ":CVSWatch add"
|
||||
|
||||
:CVSWatchOn *:CVSWatchOn*
|
||||
|
||||
This command is an alias for ":CVSWatch on"
|
||||
|
||||
:CVSWatchOff *:CVSWatchOff*
|
||||
|
||||
This command is an alias for ":CVSWatch off"
|
||||
|
||||
:CVSWatchRemove *:CVSWatchRemove*
|
||||
|
||||
This command is an alias for ":CVSWatch remove"
|
||||
|
||||
:CVSWatchers *:CVSWatchers*
|
||||
|
||||
This command performs "cvs watchers" on the current file.
|
||||
|
||||
4.2 Mappings *vcscommand-mappings*
|
||||
|
||||
By default, a mapping is defined for each command. These mappings execute the
|
||||
default (no-argument) form of each command.
|
||||
|
||||
|<Leader>|ca VCSAdd
|
||||
|<Leader>|cn VCSAnnotate
|
||||
|<Leader>|cN VCSAnnotate!
|
||||
|<Leader>|cc VCSCommit
|
||||
|<Leader>|cD VCSDelete
|
||||
|<Leader>|cd VCSDiff
|
||||
|<Leader>|cg VCSGotoOriginal
|
||||
|<Leader>|cG VCSGotoOriginal!
|
||||
|<Leader>|ci VCSInfo
|
||||
|<Leader>|cl VCSLog
|
||||
|<Leader>|cL VCSLock
|
||||
|<Leader>|cr VCSReview
|
||||
|<Leader>|cs VCSStatus
|
||||
|<Leader>|cu VCSUpdate
|
||||
|<Leader>|cU VCSUnlock
|
||||
|<Leader>|cv VCSVimDiff
|
||||
|
||||
Only for CVS buffers:
|
||||
|
||||
|<Leader>|ce CVSEdit
|
||||
|<Leader>|cE CVSEditors
|
||||
|<Leader>|ct CVSUnedit
|
||||
|<Leader>|cwv CVSWatchers
|
||||
|<Leader>|cwa CVSWatchAdd
|
||||
|<Leader>|cwn CVSWatchOn
|
||||
|<Leader>|cwf CVSWatchOff
|
||||
|<Leader>|cwf CVSWatchRemove
|
||||
|
||||
*vcscommand-mappings-override*
|
||||
|
||||
The default mappings can be overridden by user-provided instead by mapping to
|
||||
<Plug>CommandName. This is especially useful when these mappings collide with
|
||||
other existing mappings (vim will warn of this during plugin initialization,
|
||||
but will not clobber the existing mappings).
|
||||
|
||||
There are three methods for controlling mapping:
|
||||
|
||||
First, maps can be overriden for individual commands. For instance, to
|
||||
override the default mapping for :VCSAdd to set it to '\add', add the
|
||||
following to the vimrc:
|
||||
|
||||
nmap \add <Plug>VCSAdd
|
||||
|
||||
Second, the default map prefix ('<Leader>c') can be overridden by defining the
|
||||
|VCSCommandMapPrefix| variable.
|
||||
|
||||
Third, the entire set of default maps can be overridden by defining the
|
||||
|VCSCommandMappings| variable.
|
||||
|
||||
|
||||
4.3 Automatic buffer variables *vcscommand-buffer-variables*
|
||||
|
||||
Several buffer variables are defined in each vcscommand result buffer. These
|
||||
may be useful for additional customization in callbacks defined in the event
|
||||
handlers (please see |vcscommand-events|).
|
||||
|
||||
The following variables are automatically defined:
|
||||
|
||||
b:VCSCommandOriginalBuffer *b:VCSCommandOriginalBuffer*
|
||||
|
||||
This variable is set to the buffer number of the source file.
|
||||
|
||||
b:VCSCommandCommand *b:VCSCommandCommand*
|
||||
|
||||
This variable is set to the name of the vcscommand that created the result
|
||||
buffer.
|
||||
|
||||
b:VCSCommandSourceFile *b:VCSCommandSourceFile*
|
||||
|
||||
This variable is set to the name of the original file under source control.
|
||||
|
||||
b:VCSCommandVCSType *b:VCSCommandVCSType*
|
||||
|
||||
This variable is set to the type of the source control. This variable is also
|
||||
set on the original file itself.
|
||||
==============================================================================
|
||||
|
||||
5. Configuration and customization *vcscommand-customize*
|
||||
*vcscommand-config*
|
||||
|
||||
The vcscommand plugin can be configured in several ways: by setting
|
||||
configuration variables (see |vcscommand-options|) or by defining vcscommand
|
||||
event handlers (see |vcscommand-events|). Additionally, the vcscommand plugin
|
||||
supports a customized status line (see |vcscommand-statusline| and
|
||||
|vcscommand-buffer-management|).
|
||||
|
||||
5.1 vcscommand configuration variables *vcscommand-options*
|
||||
|
||||
Several variables affect the plugin's behavior. These variables are checked
|
||||
at time of execution, and may be defined at the window, buffer, or global
|
||||
level and are checked in that order of precedence.
|
||||
|
||||
|
||||
The following variables are available:
|
||||
|
||||
|VCSCommandCommitOnWrite|
|
||||
|VCSCommandCVSDiffOpt|
|
||||
|VCSCommandCVSExec|
|
||||
|VCSCommandDeleteOnHide|
|
||||
|VCSCommandDiffSplit|
|
||||
|VCSCommandDisableAll|
|
||||
|VCSCommandDisableMappings|
|
||||
|VCSCommandDisableExtensionMappings|
|
||||
|VCSCommandDisableMenu|
|
||||
|VCSCommandEdit|
|
||||
|VCSCommandEnableBufferSetup|
|
||||
|VCSCommandMappings|
|
||||
|VCSCommandMapPrefix|
|
||||
|VCSCommandMenuPriority|
|
||||
|VCSCommandMenuRoot|
|
||||
|VCSCommandResultBufferNameExtension|
|
||||
|VCSCommandResultBufferNameFunction|
|
||||
|VCSCommandSplit|
|
||||
|VCSCommandSVKExec|
|
||||
|VCSCommandSVNDiffExt|
|
||||
|VCSCommandSVNDiffOpt|
|
||||
|VCSCommandSVNExec|
|
||||
|VCSCommandVCSTypeOverride|
|
||||
|
||||
VCSCommandCommitOnWrite *VCSCommandCommitOnWrite*
|
||||
|
||||
This variable, if set to a non-zero value, causes the pending commit
|
||||
to take place immediately as soon as the log message buffer is written.
|
||||
If set to zero, only the VCSCommit mapping will cause the pending commit to
|
||||
occur. If not set, it defaults to 1.
|
||||
|
||||
VCSCommandCVSExec *VCSCommandCVSExec*
|
||||
|
||||
This variable controls the executable used for all CVS commands If not set,
|
||||
it defaults to "cvs".
|
||||
|
||||
VCSCommandDeleteOnHide *VCSCommandDeleteOnHide*
|
||||
|
||||
This variable, if set to a non-zero value, causes the temporary result buffers
|
||||
to automatically delete themselves when hidden.
|
||||
|
||||
VCSCommandCVSDiffOpt *VCSCommandCVSDiffOpt*
|
||||
|
||||
This variable, if set, determines the options passed to the diff command of
|
||||
CVS. If not set, it defaults to 'u'.
|
||||
|
||||
VCSCommandDiffSplit *VCSCommandDiffSplit*
|
||||
|
||||
This variable overrides the |VCSCommandSplit| variable, but only for buffers
|
||||
created with |:VCSVimDiff|.
|
||||
|
||||
VCSCommandDisableAll *VCSCommandDisableAll*
|
||||
|
||||
This variable, if set, prevents the plugin or any extensions from loading at
|
||||
all. This is useful when a single runtime distribution is used on multiple
|
||||
systems with varying versions.
|
||||
|
||||
VCSCommandDisableMappings *VCSCommandDisableMappings*
|
||||
|
||||
This variable, if set to a non-zero value, prevents the default command
|
||||
mappings from being set. This supercedes
|
||||
|VCSCommandDisableExtensionMappings|.
|
||||
|
||||
VCSCommandDisableExtensionMappings *VCSCommandDisableExtensionMappings*
|
||||
|
||||
This variable, if set to a non-zero value, prevents the default command
|
||||
mappings from being set for commands specific to an individual VCS.
|
||||
|
||||
VCSCommandEdit *VCSCommandEdit*
|
||||
|
||||
This variable controls whether the original buffer is replaced ('edit') or
|
||||
split ('split'). If not set, it defaults to 'split'.
|
||||
|
||||
VCSCommandDisableMenu *VCSCommandDisableMenu*
|
||||
|
||||
This variable, if set to a non-zero value, prevents the default command menu
|
||||
from being set.
|
||||
|
||||
VCSCommandEnableBufferSetup *VCSCommandEnableBufferSetup*
|
||||
|
||||
This variable, if set to a non-zero value, activates VCS buffer management
|
||||
mode see (|vcscommand-buffer-management|). This mode means that the
|
||||
'VCSCommandBufferInfo' variable is filled with version information if the file
|
||||
is VCS-controlled. This is useful for displaying version information in the
|
||||
status bar.
|
||||
|
||||
VCSCommandMappings *VCSCommandMappings*
|
||||
|
||||
This variable, if set, overrides the default mappings used for shortcuts. It
|
||||
should be a List of 2-element Lists, each containing a shortcut and function
|
||||
name pair. The value of the '|VCSCommandMapPrefix|' variable will be added to
|
||||
each shortcut.
|
||||
|
||||
VCSCommandMapPrefix *VCSCommandMapPrefix*
|
||||
|
||||
This variable, if set, overrides the default mapping prefix ('<Leader>c').
|
||||
This allows customization of the mapping space used by the vcscommand
|
||||
shortcuts.
|
||||
|
||||
VCSCommandMenuPriority *VCSCommandMenuPriority*
|
||||
|
||||
This variable, if set, overrides the default menu priority '' (empty)
|
||||
|
||||
VCSCommandMenuRoot *VCSCommandMenuRoot*
|
||||
|
||||
This variable, if set, overrides the default menu root 'Plugin.VCS'
|
||||
|
||||
VCSCommandResultBufferNameExtension *VCSCommandResultBufferNameExtension*
|
||||
|
||||
This variable, if set to a non-blank value, is appended to the name of the VCS
|
||||
command output buffers. For example, '.vcs'. Using this option may help
|
||||
avoid problems caused by autocommands dependent on file extension.
|
||||
|
||||
VCSCommandResultBufferNameFunction *VCSCommandResultBufferNameFunction*
|
||||
|
||||
This variable, if set, specifies a custom function for naming VCS command
|
||||
output buffers. This function is expected to return the new buffer name, and
|
||||
will be passed the following arguments:
|
||||
|
||||
command - name of the VCS command being executed (such as 'Log' or
|
||||
'Diff').
|
||||
|
||||
originalBuffer - buffer number of the source file.
|
||||
|
||||
vcsType - type of VCS controlling this file (such as 'CVS' or 'SVN').
|
||||
|
||||
statusText - extra text associated with the VCS action (such as version
|
||||
numbers).
|
||||
|
||||
VCSCommandSplit *VCSCommandSplit*
|
||||
|
||||
This variable controls the orientation of the various window splits that
|
||||
may occur.
|
||||
|
||||
If set to 'horizontal', the resulting windows will be on stacked on top of
|
||||
one another. If set to 'vertical', the resulting windows will be
|
||||
side-by-side. If not set, it defaults to 'horizontal' for all but
|
||||
VCSVimDiff windows. VCSVimDiff windows default to the user's 'diffopt'
|
||||
setting, if set, otherwise 'vertical'.
|
||||
|
||||
VCSCommandSVKExec *VCSCommandSVKExec*
|
||||
|
||||
This variable controls the executable used for all SVK commands If not set,
|
||||
it defaults to "svk".
|
||||
|
||||
VCSCommandSVNDiffExt *VCSCommandSVNDiffExt*
|
||||
|
||||
This variable, if set, is passed to SVN via the --diff-cmd command to select
|
||||
an external application for performing the diff.
|
||||
|
||||
VCSCommandSVNDiffOpt *VCSCommandSVNDiffOpt*
|
||||
|
||||
This variable, if set, determines the options passed with the '-x' parameter
|
||||
to the SVN diff command. If not set, no options are passed.
|
||||
|
||||
VCSCommandSVNExec *VCSCommandSVNExec*
|
||||
|
||||
This variable controls the executable used for all SVN commands If not set,
|
||||
it defaults to "svn".
|
||||
|
||||
VCSCommandVCSTypeOverride *VCSCommandVCSTypeOverride*
|
||||
|
||||
This variable allows the VCS type detection to be overridden on a path-by-path
|
||||
basis. The value of this variable is expected to be a List of Lists. Each
|
||||
item in the high-level List is a List containing two elements. The first
|
||||
element is a regular expression that will be matched against the full file
|
||||
name of a given buffer. If it matches, the second element will be used as the
|
||||
VCS type.
|
||||
|
||||
5.2 VCSCommand events *vcscommand-events*
|
||||
|
||||
For additional customization, vcscommand can trigger user-defined events.
|
||||
Event handlers are provided by defining User event autocommands (see
|
||||
|autocommand|, |User|) in the vcscommand group with patterns matching the
|
||||
event name.
|
||||
|
||||
For instance, the following could be added to the vimrc to provide a 'q'
|
||||
mapping to quit a vcscommand scratch buffer:
|
||||
|
||||
augroup VCSCommand
|
||||
au User VCSBufferCreated silent! nmap <unique> <buffer> q :bwipeout<cr>
|
||||
augroup END
|
||||
|
||||
The following hooks are available:
|
||||
|
||||
VCSBufferCreated This event is fired just after a vcscommand
|
||||
result buffer is created and populated. It is
|
||||
executed within the context of the vcscommand
|
||||
buffer. The vcscommand buffer variables may
|
||||
be useful for handlers of this event (please
|
||||
see |vcscommand-buffer-variables|).
|
||||
|
||||
VCSBufferSetup This event is fired just after vcscommand buffer
|
||||
setup occurs, if enabled.
|
||||
|
||||
VCSPluginInit This event is fired when the vcscommand plugin
|
||||
first loads.
|
||||
|
||||
VCSPluginFinish This event is fired just after the vcscommand
|
||||
plugin loads.
|
||||
|
||||
VCSVimDiffFinish This event is fired just after the VCSVimDiff
|
||||
command executes to allow customization of,
|
||||
for instance, window placement and focus.
|
||||
|
||||
Additionally, there is another hook which is used internally to handle loading
|
||||
the multiple scripts in order. This hook should probably not be used by an
|
||||
end user without a good idea of how it works. Among other things, any events
|
||||
associated with this hook are cleared after they are executed (during
|
||||
vcscommand.vim script initialization).
|
||||
|
||||
VCSLoadExtensions This event is fired just before the
|
||||
VCSPluginFinish. It is used internally to
|
||||
execute any commands from the VCS
|
||||
implementation plugins that needs to be
|
||||
deferred until the primary plugin is
|
||||
initialized.
|
||||
|
||||
5.3 vcscommand buffer naming *vcscommand-naming*
|
||||
|
||||
vcscommand result buffers use the following naming convention:
|
||||
[{VCS type} {VCS command} {Source file name}]
|
||||
|
||||
If additional buffers are created that would otherwise conflict, a
|
||||
distinguishing number is added:
|
||||
|
||||
[{VCS type} {VCS command} {Source file name}] (1,2, etc)
|
||||
|
||||
5.4 vcscommand status line support *vcscommand-statusline*
|
||||
|
||||
It is intended that the user will customize the |'statusline'| option to
|
||||
include vcscommand result buffer attributes. A sample function that may be
|
||||
used in the |'statusline'| option is provided by the plugin,
|
||||
VCSCommandGetStatusLine(). In order to use that function in the status line, do
|
||||
something like the following:
|
||||
|
||||
set statusline=%<%f\ %{VCSCommandGetStatusLine()}\ %h%m%r%=%l,%c%V\ %P
|
||||
|
||||
of which %{VCSCommandGetStatusLine()} is the relevant portion.
|
||||
|
||||
The sample VCSCommandGetStatusLine() function handles both vcscommand result
|
||||
buffers and VCS-managed files if vcscommand buffer management is enabled
|
||||
(please see |vcscommand-buffer-management|).
|
||||
|
||||
5.5 vcscommand buffer management *vcscommand-buffer-management*
|
||||
|
||||
The vcscommand plugin can operate in buffer management mode, which means that
|
||||
it attempts to set a buffer variable ('VCSCommandBufferInfo') upon entry into
|
||||
a buffer. This is rather slow because it means that the VCS will be invoked
|
||||
at each entry into a buffer (during the |BufEnter| autocommand).
|
||||
|
||||
This mode is disabled by default. In order to enable it, set the
|
||||
|VCSCommandEnableBufferSetup| variable to a true (non-zero) value. Enabling
|
||||
this mode simply provides the buffer variable mentioned above. The user must
|
||||
explicitly include information from the variable in the |'statusline'| option
|
||||
if they are to appear in the status line (but see |vcscommand-statusline| for
|
||||
a simple way to do that).
|
||||
|
||||
The 'VCSCommandBufferInfo' variable is a list which contains, in order, the
|
||||
revision of the current file, the latest revision of the file in the
|
||||
repository, and (for CVS) the name of the branch. If those values cannot be
|
||||
determined, the list is a single element: 'Unknown'.
|
||||
|
||||
==============================================================================
|
||||
|
||||
6. SSH "integration" *vcscommand-ssh*
|
||||
|
||||
The following instructions are intended for use in integrating the
|
||||
vcscommand.vim plugin with an SSH-based CVS environment.
|
||||
|
||||
Familiarity with SSH and CVS are assumed.
|
||||
|
||||
These instructions assume that the intent is to have a message box pop up in
|
||||
order to allow the user to enter a passphrase. If, instead, the user is
|
||||
comfortable using certificate-based authentication, then only instructions
|
||||
6.1.1 and 6.1.2 (and optionally 6.1.4) need to be followed; ssh should then
|
||||
work transparently.
|
||||
|
||||
6.1 Environment settings *vcscommand-ssh-env*
|
||||
|
||||
6.1.1 CVSROOT should be set to something like:
|
||||
|
||||
:ext:user@host:/path_to_repository
|
||||
|
||||
6.1.2 CVS_RSH should be set to:
|
||||
|
||||
ssh
|
||||
|
||||
Together, those settings tell CVS to use ssh as the transport when
|
||||
performing CVS calls.
|
||||
|
||||
6.1.3 SSH_ASKPASS should be set to the password-dialog program. In my case,
|
||||
running gnome, it's set to:
|
||||
|
||||
/usr/libexec/openssh/gnome-ssh-askpass
|
||||
|
||||
This tells SSH how to get passwords if no input is available.
|
||||
|
||||
6.1.4 OPTIONAL. You may need to set SSH_SERVER to the location of the cvs
|
||||
executable on the remote (server) machine.
|
||||
|
||||
6.2 CVS wrapper program *vcscommand-ssh-wrapper*
|
||||
|
||||
Now you need to convince SSH to use the password-dialog program. This means
|
||||
you need to execute SSH (and therefore CVS) without standard input. The
|
||||
following script is a simple perl wrapper that dissasociates the CVS command
|
||||
from the current terminal. Specific steps to do this may vary from system to
|
||||
system; the following example works for me on linux.
|
||||
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use POSIX qw(setsid);
|
||||
open STDIN, '/dev/null';
|
||||
fork and do {wait; exit;};
|
||||
setsid;
|
||||
exec('cvs', @ARGV);
|
||||
|
||||
6.3 Configuring vcscommand.vim *vcscommand-ssh-config*
|
||||
|
||||
At this point, you should be able to use your wrapper script to invoke CVS with
|
||||
various commands, and get the password dialog. All that's left is to make CVS
|
||||
use your newly-created wrapper script.
|
||||
|
||||
6.3.1 Tell vcscommand.vim what CVS executable to use. The easiest way to do this
|
||||
is globally, by putting the following in your .vimrc:
|
||||
|
||||
let VCSCommandCVSExec=/path/to/cvs/wrapper/script
|
||||
|
||||
6.4 Where to go from here *vcscommand-ssh-other*
|
||||
|
||||
The script given above works even when non-SSH CVS connections are used,
|
||||
except possibly when interactively entering the message for CVS commit log
|
||||
(depending on the editor you use... VIM works fine). Since the vcscommand.vim
|
||||
plugin handles that message without a terminal, the wrapper script can be used
|
||||
all the time.
|
||||
|
||||
This allows mixed-mode operation, where some work is done with SSH-based CVS
|
||||
repositories, and others with pserver or local access.
|
||||
|
||||
It is possible, though beyond the scope of the plugin, to dynamically set the
|
||||
CVS executable based on the CVSROOT for the file being edited. The user
|
||||
events provided (such as VCSBufferCreated and VCSBufferSetup) can be used to
|
||||
set a buffer-local value (b:VCSCommandCVSExec) to override the CVS executable
|
||||
on a file-by-file basis. Alternatively, much the same can be done (less
|
||||
automatically) by the various project-oriented plugins out there.
|
||||
|
||||
It is highly recommended for ease-of-use that certificates with no passphrase
|
||||
or ssh-agent are employed so that the user is not given the password prompt
|
||||
too often.
|
||||
|
||||
==============================================================================
|
||||
|
||||
7. Changes from cvscommand *cvscommand-changes*
|
||||
|
||||
1. Require Vim 7 in order to leverage several convenient features; also
|
||||
because I wanted to play with Vim 7.
|
||||
|
||||
2. Renamed commands to start with 'VCS' instead of 'CVS'. The exceptions are
|
||||
the 'CVSEdit' and 'CVSWatch' family of commands, which are specific to CVS.
|
||||
|
||||
3. Renamed options, events to start with 'VCSCommand'.
|
||||
|
||||
4. Removed option to jump to the parent version of the current line in an
|
||||
annotated buffer, as opposed to the version on the current line. This made
|
||||
little sense in the branching scheme used by subversion, where jumping to a
|
||||
parent branch required finding a different location in the repository. It
|
||||
didn't work consistently in CVS anyway.
|
||||
|
||||
5. Removed option to have nameless scratch buffers.
|
||||
|
||||
6. Changed default behavior of scratch buffers to split the window instead of
|
||||
displaying in the current window. This may still be overridden using the
|
||||
'VCSCommandEdit' option.
|
||||
|
||||
7. Split plugin into multiple plugins.
|
||||
|
||||
8. Added 'VCSLock' and 'VCSUnlock' commands. These are implemented for
|
||||
subversion but not for CVS. These were not kept specific to subversion as they
|
||||
seemed more general in nature and more likely to be supported by any future VCS
|
||||
supported by this plugin.
|
||||
|
||||
9. Changed name of buffer variables set by commands.
|
||||
|
||||
'b:cvsOrigBuffNR' became 'b:VCSCommandOriginalBuffer'
|
||||
'b:cvscmd' became 'b:VCSCommandCommand'
|
||||
|
||||
10. Added new automatic variables to command result buffers.
|
||||
|
||||
'b:VCSCommandSourceFile'
|
||||
'b:VCSCommandVCSType'
|
||||
|
||||
==============================================================================
|
||||
|
||||
8. Known bugs *vcscommand-bugs*
|
||||
|
||||
Please let me know if you run across any.
|
||||
|
||||
CVSUnedit may, if a file is changed from the repository, provide prompt text
|
||||
to determine whether the changes should be thrown away. Currently, that text
|
||||
shows up in the CVS result buffer as information; there is no way for the user
|
||||
to actually respond to the prompt and the CVS unedit command does nothing. If
|
||||
this really bothers anyone, please let me know.
|
||||
|
||||
VCSVimDiff, when using the original (real) source buffer as one of the diff
|
||||
buffers, uses some hacks to try to restore the state of the original buffer
|
||||
when the scratch buffer containing the other version is destroyed. There may
|
||||
still be bugs in here, depending on many configuration details.
|
||||
|
||||
vim:tw=78:ts=8:ft=help
|
||||
Reference in New Issue
Block a user