svnj.vim : vim svn plugin (subversion svn ) and browser
| script karma
Downloaded by 319
Comments, bugs, improvements
script versions (upload new version)
|VIM (VIM 7 and up) plugin for subversion (svn)
Support for svn add,commit, view logs, diff, checkout and browsing the repository, working copy, bookmarks plus more
keywords: svn vim subversion SVN
Repo : https://github.com/juneedahamed/svnj.vim
svn add, commit, log, status, diff, blame, list, info, co
1. SVNAdd [<file>|<dir>|%]
Add and Commit File(s)/Directories to svn repo. SVNAdd is supported as a command and also as an
operation from SVNStatus and SVNBrowse output. Available options are to just add or add and commit
2. SVNCommit[!] [<file>|<dir>|%]
Performs svn commit. A new buffer will be opened to accept comments. The buffer will list
the files which are candidates for commit. Files/Directories can also be updated in this buffer.
A commit can be forced with no comments with a bang. SVNCommit is supported as a command and
also as an operation from the SVNStatus|SVNBrowseWorkingCopy|SVNBrowseBuffer output window.
3. SVNBlame [<file>|<dir>|%]
Vertically splits the blame info for the file in bufffer. Scrollbinds to the file.
4. SVNStatus [ <dir> | . [q] [u]]
Get the output of svn status. With the listed files in the split buffer which states the filename
and status, the following are few of the operations supported
- Open file under cursor or all
- SVN info, SVN Diff
- SVN Commit selected/marked files, opens a commit log for accepting comments (svn ci)
- SVN Add selected/marked files as new repo elements (svn add)
5. SVNLog [<file> | <dir> | . | % [,nooflogs]]
Lists the log for the current file in buffer. The output displays the revision, author, comments
and the revision when the branch was created. With the revisions listed can diff the required
revisions with the file in buffer. Also provides mechanism to diff the file across branches/trunk.
A menu will be displayed to list revisions from available branches and trunk. This requires that
g:svnj_branch_url and g:svnj_trunk_url be defined.
- Diff revision(s) from current working copy or across branches/trunk
- List Affected/Modified files for the revision (most useful with dirs)
- SVN Diff :HEAD | :PREV with selected revision (most useful with dirs)
- Open marked revisons or revison under cursor as new file - newbuffer or vspilt
- View SVN Info and Log of revision
Immediate diff the file in buffer with the previous revision. If there are more than one file in
buffer Ctrl-n/Ctrl-p will close the current diff and move to the next/prev file in buffer.
Browse the svn repository, working copy files, buffer files, favorites, bookmarks
This command brings up a menu of available options for browsing.
- SVNBrowseRepo [<dir>|/]
This command lists files/directories from the repository. The current directory should be
a working copy for the plugin to pick up the svn path.
- SVNBrowseWorkingCopy [<dir>]
This command lists files/directories from the current directory.
This command lists files/directories specified using g:svnj_browse_mylist see
While browsing the repo/working copy you can bookmarks the dir/files
All of the book marked files will be listed as output.
These bookmarked files/dirs are available only for the current vim session unless caching
is enabled, Once vim is closed all bookmarks are lost if caching is not enabled.
List the files from Buffer
Cache for browsing:
The caching feature is off by default, On enabling the caching the listing of files for
SVNBrowseRepo and SVNBrowseWorkingCopy will be faster. There are many levels at which the caching
can be enabled see help:g:svnj_cache_dir
Some of the operations supported are
- Recursive/Non-recursive listing of files from directory
- Open file(s) in new buffer or vertical split
- Navigate up/down the directory, Jump to Respository Root/Working Root/Home where applicable
- SVN info, SVN Log
- Bookmark the dir/file. To persist the bookmarks across sessions see :help g:svnj_browse_bookmarks_cache
- SVN Checkout (svn co)
Hint : Use Bookmarks or MyList feature to store the repo root so that can be browsed
when need to checkout.
- SVN Copy (Paste) the selected urls to new dir location, (svn cp)
The paste on repo requires a commit so a buffer will be opened to enter comments for the commit
- SVN Add, SVN Commit
8. SVNCommits [ <dir> | . | [,nooflogs]]
Get the list of files checked in across project revision. This command lists the output of svn log
of the project directory.
The cache/persistency is not enabled by default. please see :help SVNClearCache for more info.
10. SVNInfo [<file> | <dir> | % | . ]
Will display svn info.
Recomended settings at .vimrc
let g:svnj_custom_statusbar_ops_hide = 1
Supported operations are listed on the status line of the svnj_window. With growing support for
many commands, recomend to hide it. You can still have a quick glance of supported operations by
let g:svnj_browse_cache_all = 1
This enables caching, Listing of files will be faster, On MAC/Unix the default location is $HOME/.cache.
A new directory svnj will be created in the specified directory.
For windows this option must be specified along with the cache dir
let g:svnj_branch_url = ["svn://127.0.0.1/Path/until/branches/", "svn://127.0.0.1/Path/until/tags/"]
This settings when available will provide menu's to navigate available branches and tags for SVNLog
let g:svnj_trunk_url = "svn://127.0.0.1/Path/until/trunk";
This settings when available will provide menu's to navigate trunk files for SVNLog
Global Options :help svnj-options and :help svnj-customize
+ g:svnj_max_logs, g:svnj_max_open_files, g:svnj_max_diff,
g:svnj_window_max_size, g:svnj_warn_branch_log, g:svnj_browse_max_files_cnt,
g:svnj_browse_repo_max_files, g:svnj_sticky_on_start, g:svnj_send_soc_command
+ g:svnj_browse_cache_all, g:svnj_browse_bookmarks_cache, g:svnj_browse_repo_cache,
+ g:svnj_signs, g:svnj_ignore_files,
+ g:svnj_branch_url, g:svnj_trunk_url
+ g:svnj_custom_fuzzy_match_hl, g:svnj_custom_menu_color, g:svnj_custom_error_color,
g:svnj_custom_prompt_color, g:svnj_custom_statusbar_hl, g:svnj_custom_statusbar_title
g:svnj_custom_sticky_hl, g:svnj_custom_commit_files_hl, g:svnj_custom_commit_header_hl
Run from vim command line
:SVNBrowse , :SVNBrowseWorkingCopy , :SVNBrowseRepo, :SVNBrowseBookMarks , :SVNBrowseMyList
|Options 1: (Pathogen Users)
Download to some folder
cp -r svnj.vim/plugin/* ~/.vim/plugin
cp -r svnj.vim/autoload/* ~/.vim/autoload
cp -r svnj.vim/doc/* ~/.vim/doc
Run at vim's command :helptags doc
Click on the package to download.
ip used for rating: 18.104.22.168
SVNAdd (svn add), SVNCommit (svn ci) , Checkout (svn co), Copy (svn copy) and
stop-on-copy for svn log, SVNBrowseBuffer
As a command SVNAdd or operation from SVNStatus, SVNBrowse. Provides option to add and commit
or just add the elements to repository.
Can execute :SVNCommit , will commit file in buffer or files/dirs passed as
+ Added commit as operation for SVN Status and SVNBrowse
select the required files from SVNStatus | SVNBrowseWorkingCopy | SVNBrowseBuffer
output and press Ctrl-z, this will bring up the commit log
+ SVN Log
1. Now shows the --stop-on-copy revision on the status bar as "S@"revision_num
This will be the revision number when the working copy was created.
Those who prefer not want to see this info can opt to not
send this command by setting g:svnj_send_soc_command to 0
2. Added Ctrl-h : Brings up svn diff passing :HEAD to selected revision
3. Added Ctrl-p : Brings up svn diff passing :PREV to selected revision
Now simplifies the operation of finding all changes to current directory
At vim execute :SVNLog .
The title now shows the s@ revision
Go to the said revision and press Ctrl-h
+ SVN Status has following new ops
+ Select All
+ Commit selected
+ Add selected files to repo
+ SVNBrowse commands has following new ops
+ Add (svn add)
+ Commit (svn ci)
+ Copy (svn cp)
+ Checkout (svn co)
+ Added operation to checkout to browse operation (should be a respository browse)
Hint : Use bookmarks, mylist feature to store the repository root and then
check out from there
+ SVNInfo now takes arguments
+ Added options g:svnj_send_soc_command, g:svnj_custom_commit_files_hl,
+ Now providing browser to select file when doing a file diff in SVNLog
across branches/trunk when svnj fails to create a proper svn url.
Now not using svn list -r command to hunt down the file.
||+ NEW Highlights:
Sticky (Ctrl-s), Browsing(Ctrl-h), Diffed files(Ctrl-q)
Bookmark files listed in SVNStatus window
Browsing recursive up, Vertical split
Number of logs to display as argument where applicable
Fuzzzy speed improvements
Quick glance operation using "?"
New options g:svnj_sticky_on_start, g:svnj_window_max_size
+ STICKY, Now can have the svnj window remain on after file selections. Useful
for doing multiple operations on different files/directories.
Ctrl-s toggles the STICKY behavior. This operation is available for all
SVNJ commands which brings up the svnj window.
If you like the sticky behavior and would like to start as default on use
the option g:svnj_sticky_on_start as 1 default is 0. At .vimrc
let g:svnj_sticky_on_start = 1
+ Added Ctrl-q to the files diffed from SVNJWindow. Press Ctrl-q on the diffed
file. If the sticky is enabled on svnj window, the control/cursor will land back
on the svnj window. Very helpfull when need to diff/compare a few versions for
a given file. See an example usage above as |How to use sticky and Ctrl-q|
+ Speed up fuzzy search
+ Added Ctrl-h to browsing, Takes to repository root if the current directory is
a revisioned else to Working copy root if working copy. If at working copy
the first Ctrl-h jumps to Working copy root and again the second Ctrl-h jumps
to $HOME. Save a few keystorkes
+ Now can bookmark status output, the file/dir will can be bookmarked to open and
operate on later
+ SVNLog, SVNCommits takes in an optional numeric values as the number of logs to
display, When not provided will use the default or the value specified
+ Browsing recursive, If navigating downwards was recursive so will be the upward
navigation and vice versa
+ Added Ctrl-v to open as vertical split
+ SVNBlame now scrollbinds to file. When the cursor in the blame buffer is moved
the file on the right buffer will be in sync with the blame file
+ Added g:svnj_window_max_size to handle the size of svnj window
+ Added F5 to redraw buffer
+ Added "?" as help display supported operations. Now can disable the
let g:svnj_custom_statusbar_ops_hide = 1
and then use ? to bring out the supported operations for a quick glance
+ Added Ctrl-i for log output to display info and log (Useful if the comments are
+ Bookmark sign is shown while browsing bookmarks list, now its easier to unbook
+ Fixed filename/dirs with spaces/special chars.
+ statusline getting disappeared in few scenarios
+ Added BrowseWorkingCopyRec
- This command recusrively lists file, avoids a few key strokes
+ BrowseWorkingCopy[Rec] command now works for local files/directories also,
The svn commands like show logs will report error if the selected entry is not
an svn entity, Other operations like open should work
+ Supported Ctrl-Enter for BrowseMenu on Repo and Workingcopy , saves again few keystorkes
+ OpenAll [Ctrl-o ] operation in case of Browse, Status and Commits will honor the filter,
Files shown only on the buffer will be candidates to be opened
+ Added Ctrl-i for browsed and stats file, this lists the svn info of file/dir
+ Enhanced file fetcher, limits the depth/number of files fetched
+ status line shows number for files selected/marked
+ Added more customization options
|| + Added support to browse the entire svn using |SVNBrowse| command
+ Added support to browse the working directory using |SVNBrowseWorkingCopy| command
+ Added support for permanent bookmarks see g:svnj_browse_mylist
+ Added support for multiple branches at g:svnj_branch_url
- Hint svn tag
+ Added support to navigate entire SVN without any configuration
NOTE: Using configuration options like g:svnj_browse_mylist and g:svnj_branch_url
will help navigate faster. Again g:svnj_branch_url supports coma seperated
+ Added sign(s) for file/logs selection
+ Added support for customization
use :help svnj-customize
+ Added following Key Mapping
|Ctrl-t| : Go to start
|Ctrl-u| : Go up
+ Added more files to ignore list
- Removed |SVNList|, |SVNListRec| in favor of SVNBrowse and SVNBrowseWorkingCopy and
1. Marking/Selecting the file/directory using Ctrl-Space highlights the line
Later navigating away from the path say going up the directory and recusrive list
of contents donot highlights the line though remembers the marked file and open/diffs
the file. (Will Fix later)
||+ Added Fuzzy search at filter
NOTE: Needs vim with python for fuzzy search
+ Added SVNList, SVNListRec
+ Stream lined operations
+ Added option to open files without splits
+ Bug fixes