Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
351 lines (257 sloc) 11.9 KB
*vcsi.txt* Version Control System Interface
Version 0.1.1
Copyright (C) 2007-2008 kana <http://whileimautomaton.net/>
License: MIT license {{{
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.
}}}
CONTENTS *vcsi-contents*
Introduction |vcsi-introduction|
Terms |vcsi-terms|
Interface |vcsi-interface|
Commands |vcsi-commands|
Functions |vcsi-functions|
Key Mapings |vcsi-key-mappings|
Customizing |vcsi-customizing|
Bugs |vcsi-bugs|
ChangeLog |vcsi-changelog|
==============================================================================
INTRODUCTION *vcsi-introduction*
*vcsi* is a Vim plugin which provides interface for several version control
systems. You will be able to commit, diff and other daily works quickly.
Note that this plugin doesn't provide interface for commands which are rarely
used.
Requirements:
- Vim 7.0 or later
Supported operating systems:
- *nix
Supported version control systems:
- git
- svk
- Subversion
- CVS (planned)
Latest version:
http://github.com/kana/config/commits/vim-vcsi
Document in HTML format:
http://kana.github.com/config/vim/vcsi.html
==============================================================================
TERMS *vcsi-terms*
Vcsi command
One of |vcsi-commands|, |vcsi-functions| or |vcsi-key-mappings|.
Target *vcsi-target*
Most of vcsi commands take zero or more {target}s:
- A {target} is a file or directory.
- If no {target} is given for a vcsi command, the file or directory
related to the current buffer is used as the {target}.
And if the current buffer is created by a vcsi command, the same
{target}s for the such buffer are used instead. For example, if the
current buffer is created by ":VcsiDiff .", ":VcsiCommit" works as
same as ":VcsiCommit .".
Note that all {target}s given to a command MUST be in the same
repository.
{command} buffer
A temporary buffer created by a vcsi command to edit or to show some
information. For example, a buffer created by |:VcsiDiff| is called
as a "diff buffer", and "{command} buffer" is the generic notation of
such buffers.
If there is no content to show in {command} buffers, such buffers will
be automatically closed.
==============================================================================
INTERFACE *vcsi-interface*
------------------------------------------------------------------------------
COMMANDS *vcsi-commands*
:VcsiAdd [target] ... *:VcsiAdd*
Add targets under the control of a version control system.
:VcsiAmend [target] ... *:VcsiAmend*
Like |:VcsiCommit|, but amend the last commit.
Available only for git.
:VcsiCommit [target] ... *:VcsiCommit*
Open new buffer to edit a commit log.
When the buffer is written, the change of [target]s will be committed.
See also:
- |g:vcsi_diff_in_commit_buffer_p|
- |g:vcsi_status_in_commit_buffer_p|
- |g:vcsi_use_native_message_p|
:[count]VcsiDiff [target] ... *:VcsiDiff*
Open new buffer to show the difference between the current content of
{target}s and the latest commited version of {target}s.
If {count} is given, use the {count}th older version instead of the
latest version to show the difference. (here the latest version is
treated as the 0th older version)
:VcsiLog {target} ... *:VcsiLog*
Open new buffer to show the commit logs related to {target}s, from the
latest version to the oldest version.
(planned) By default, :VcsiLog shows 100 commit logs. When user types
|<Plug>(vcsi-log-more)| on the log buffer, more 100 commit logs will
be appended.
:VcsiRemove[!] [target] ... *:VcsiRemove*
Remove targets under the control of a version control system.
If [!] is given, remove targets forcedly, even if they have local
modifications.
:VcsiRevert [target] ... *:VcsiRevert*
Revert {target}s to the lateset version, recursively.
:VcsiStatus [target] ... *:VcsiStatus*
Open new buffer to show the status of {target}s, recursively.
:VcsiDefaultKeyMappings[!] *VcsiDefaultKeyMappings*
Define |vcsi-default-key-mappings|.
If [!] is specified, this may override existing mappings.
------------------------------------------------------------------------------
FUNCTIONS *vcsi-functions*
vcsi#add([{target}, ...]) *vcsi#add()*
vcsi#amend([{target}, ...]) *vcsi#amend()*
vcsi#commit([{target}, ...]) *vcsi#commit()*
vcsi#diff({count}, [{target}, ...]) *vcsi#diff()*
vcsi#log([{target}, ...]) *vcsi#log()*
vcsi#remove({banged_p}, [{target}, ...]) *vcsi#remove()*
vcsi#revert([{target}, ...]) *vcsi#revert()*
vcsi#status([{target}, ...]) *vcsi#status()*
Function version of the corresponding command.
Return true if it succeeded, otherwise return false.
------------------------------------------------------------------------------
KEY MAPPINGS *vcsi-key-mappings*
<Plug>(vcsi-add-all) *<Plug>(vcsi-add-all)*
<Plug>(vcsi-add-it) *<Plug>(vcsi-add-it)*
<Plug>(vcsi-amend-all) *<Plug>(vcsi-amend-all)*
<Plug>(vcsi-amend-it) *<Plug>(vcsi-amend-it)*
<Plug>(vcsi-commit-all) *<Plug>(vcsi-commit-all)*
<Plug>(vcsi-commit-it) *<Plug>(vcsi-commit-it)*
<Plug>(vcsi-diff-all) *<Plug>(vcsi-diff-all)*
<Plug>(vcsi-diff-it) *<Plug>(vcsi-diff-it)*
<Plug>(vcsi-log-all) *<Plug>(vcsi-log-all)*
<Plug>(vcsi-log-it) *<Plug>(vcsi-log-it)*
<Plug>(vcsi-remove-it) *<Plug>(vcsi-remove-it)*
<Plug>(vcsi-revert-all) *<Plug>(vcsi-revert-all)*
<Plug>(vcsi-revert-it) *<Plug>(vcsi-revert-it)*
<Plug>(vcsi-status-all) *<Plug>(vcsi-status-all)*
<Plug>(vcsi-status-it) *<Plug>(vcsi-status-it)*
These mappings are defined for Normal mode.
Each mapping executes the corresponding command.
"-all" version executes the corresponding command for the current
directory.
"-it" version executes the corresponding command for the current
buffer.
<Plug>(vcsi-remove-all) doesn't exist, because it'll never be used.
*vcsi-default-key-mappings*
The following key mappings will be defined as this plugin is loaded unless
|g:vcsi_no_default_key_mappings| exists. You can redefine these key mappings
by |:VcsiDefaultKeyMappings|.
{lhs} {rhs}
---------- ----------------------- ~
<Leader>vA <Plug>(vcsi-add-all)
<Leader>va <Plug>(vcsi-add-it)
<Leader>vF <Plug>(vcsi-amend-all)
<Leader>vf <Plug>(vcsi-amend-it)
<Leader>vC <Plug>(vcsi-commit-all)
<Leader>vc <Plug>(vcsi-commit-it)
<Leader>vD <Plug>(vcsi-diff-all)
<Leader>vd <Plug>(vcsi-diff-it)
<Leader>vL <Plug>(vcsi-log-all)
<Leader>vl <Plug>(vcsi-log-it)
<Leader>vr <Plug>(vcsi-remove-it)
<Leader>vV <Plug>(vcsi-revert-all)
<Leader>vv <Plug>(vcsi-revert-it)
<Leader>vS <Plug>(vcsi-status-all)
<Leader>vs <Plug>(vcsi-status-it)
Mnemonic: upper case for "-all", lower case for "-it".
==============================================================================
CUSTOMIZING *vcsi-customizing*
g:vcsi_diff_in_commit_buffer_p *g:vcsi_diff_in_commit_buffer_p*
number (default: 0)
Whenever a commit buffer is created, if this value is true, the result
of |:VcsiDiff| will be automatically inserted as a comment.
g:vcsi_echo_script_p *g:vcsi_echo_script_p*
number (default: 1)
Whenever a command of version control systems is executed, |:echomsg|
it if this value is true.
g:vcsi_no_default_key_mappings *g:vcsi_no_default_key_mappings*
See |vcsi-default-key-mappings|.
g:vcsi_open_command *g:vcsi_open_command*
g:vcsi_open_command_commit *g:vcsi_open_command_commit*
g:vcsi_open_command_diff *g:vcsi_open_command_diff*
g:vcsi_open_command_log *g:vcsi_open_command_log*
g:vcsi_open_command_revert *g:vcsi_open_command_revert*
g:vcsi_open_command_status *g:vcsi_open_command_status*
string (default: 'belowright new')
Specify the command to create a {command} buffer.
These values are used like the following: >
execute g:vcsi_open_command
<
If g:vcsi_open_command_{command} exists, use it rather than
g:vcsi_open_command for {command}.
g:vcsi_status_in_commit_buffer_p *g:vcsi_status_in_commit_buffer_p*
number (default: 0)
Whenever a commit buffer is created, if this value is true, the result
of |:VcsiStatus| will be automatically inserted as a comment.
g:vcsi_use_native_message_p *g:vcsi_use_native_message_p*
number (default: 0)
Whenever a commit buffer is created, if this value is true, the
message which is generated by the commit command of a version control
system will be automatically inserted as a comment.
==============================================================================
BUGS *vcsi-bugs*
- |:VcsiCommit|: writing commit log buffer with |:wq| causes closing extra
window.
- |:VcsiDiff|: [count] is supported by git only.
- There are many bugs around the world.
==============================================================================
CHANGELOG *vcsi-changelog*
0.1.1 2008-09-29T01:34:57+09:00 *vcsi-changelog-0.1.1*
- Improve usability to edit commit log.
- Add |:VcsiAmend| and other interfaces for it.
- git: Improve the way to get a template for commit log.
0.1.0 2008-07-13T20:26:10+09:00 *vcsi-changelog-0.1.0*
- Rewritten:
- Revise the internal.
- Remove some commands - :VcsiBranchList, :VcsiBranchSwitch,
:VcsiInfo, :VcsiPropedit.
- Rename some variables (|vcsi-customizing|).
- Add |g:vcsi_use_native_message_p|.
- Add |:VcsiAdd| and |:VcsiRemove|.
- Change the default key mappings for |:VcsiRevert|. Use "v"
instead of "r", because now "r" is used for |:VcsiRemove|.
0.0.7 2008-05-19T20:16:54+09:00 *vcsi-changelog-0.0.7*
- |:VcsiBranchList|: New.
- |:VcsiBranchSwitch|: New.
- |:VcsiDiff| (git): Add separators for staged changes and unstaged
changes
- |:VcsiCommit|, |:VcsiDiff|: Add sysntax highlighting for several
items.
- Fix syntax highlighting for buffers to edit commit log.
- Fix minor bugs.
0.0.6 2008-04-27T12:35:59+09:00 *vcsi-changelog-0.0.6*
- |:VcsiDiff| (git): Show also --cached difference.
0.0.5 2008-03-13T21:48:06+09:00 *vcsi-changelog-0.0.5*
- |:VcsiRevert| (git): Fix to process a file or directory which name
is same as a branch.
0.0.4 2008-02-21T23:21:36+09:00 *vcsi-changelog-0.0.4*
- Support git.
0.0.3 2008-02-11T23:38:25+09:00 *vcsi-changelog-0.0.3*
- Fix the bug that |E676| happens when a commit log buffer is written.
0.0.2 2008-01-26T02:38:14+09:00 *vcsi-changelog-0.0.2*
- Improve the speed to switch between buffers.
- Modify the meaning of g:vcsi_open_command and other variables (open
new window rather than open the specified buffer).
0.0.1 2008-01-13T00:02:47+09:00 *vcsi-changelog-0.0.1*
- Fix the bug that most of temporary buffers are marked as modified.
- Fix the bug that hit-enter prompt is appeared in most of cases.
- Fix the bug that same temporary buffer is showed in two windows in
some cases.
- Add "diff" syntax for commit log buffers.
0.0 2007-12-29T14:49:35+09:00 *vcsi-changelog-0.0*
- Initial version.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:fen:fdl=0:fdm=marker: