Removed all old bash cruft, supporting only zsh now. Improved README
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,5 +1,7 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
vim/backups
|
vim/backups
|
||||||
|
vim/view
|
||||||
*un~
|
*un~
|
||||||
vim/.netrwhist
|
vim/.netrwhist
|
||||||
|
vim/tmp
|
||||||
.netrwhist
|
.netrwhist
|
||||||
|
|||||||
Submodule KeyBindings deleted from a62dfd4f8a
133
README.md
133
README.md
@@ -1,16 +1,51 @@
|
|||||||
Yan's Excellent Dotfiles!
|
YADR: Yet Another Dotfile Repo
|
||||||
====
|
====
|
||||||
|
|
||||||
There are two main goals accomplished in my dotfiles to produce insane productivity
|
Warning: These dotfiles are opinionated!
|
||||||
|
|
||||||
* All common bash commands should be two and three character mnemonic aliases
|
This is a collection of best of breed tools from across the web,
|
||||||
* Most vim tasks, especially those having to do with navigation, should be mapped to a single Capital Letter or two letter mnemonic.
|
from scouring other people's dotfile repos, blogs, and projects.
|
||||||
|
|
||||||
|
In some ways, this is an alternative to janus (https://github.com/carlhuda/janus), offering
|
||||||
|
many of the same plugins, with minor differnces. But it's also much more,
|
||||||
|
providing shell customizations (zsh), an irb replacement (pry) with customizations,
|
||||||
|
and osx settings that are developer friendly (such as fast key repeat),
|
||||||
|
and remapping your caps-lock to be Esc for vim.
|
||||||
|
|
||||||
|
The strongly held opinions expressed here:
|
||||||
|
|
||||||
|
* OSX is the best operating system for development, but you have to tweak it slightly to be dev friendly.
|
||||||
|
* ZSH is the best shell. I used bash for a long time and I have seen the light. Just
|
||||||
|
its fuzzy typo autocompletion is worth the money and saves huge on keystrokes.
|
||||||
|
* oh-my-zsh is the best collection of plugins for zsh and reduces the switching cost from bash to zsh to one command.
|
||||||
|
* MacVim is the best editor. You will type less and get more done. Vim should be used everywhere (irb, shell, mysql command line).
|
||||||
|
* iTerm2 is the best terminal - it has splits and good full screen capabilities
|
||||||
|
* Git is the best source control manager. There are probably better ones out there, but this one is mine
|
||||||
|
|
||||||
|
The ideas that guide this project:
|
||||||
|
|
||||||
|
* All common commands should be two and three character mnemonic aliases - less keystrokes, RSI reduction
|
||||||
|
* Most used vim commands should be under your fingertips (home row, prefer Shift to other command keys)
|
||||||
|
* Avoid stressful hand motions, e.g. remap Esc to caps lock key, remap underscore to Alt-k in vim
|
||||||
|
* Plugin architecture (using tpope's pathogen for vim)
|
||||||
|
* Colors are _important_ - avoid stressful colors, use the well designed solarized (http://ethanschoonover.com/solarized) colorscheme
|
||||||
|
for both vim and iTerm2
|
||||||
|
|
||||||
|
Before you start
|
||||||
|
---
|
||||||
|
|
||||||
|
* Remap caps-lock to escape: http://stackoverflow.com/questions/127591/using-caps-lock-as-esc-in-mac-os-x
|
||||||
|
|
||||||
|
* Switch to zsh using oh-my-zh (https://github.com/robbyrussell/oh-my-zsh) in one easy step:
|
||||||
|
|
||||||
|
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
|
||||||
|
|
||||||
Submodules
|
Submodules
|
||||||
---
|
---
|
||||||
|
|
||||||
This project uses git submodules for some of its plugins. Please run:
|
This project uses git submodules for some of its plugins. Please run:
|
||||||
|
|
||||||
|
git submodule init
|
||||||
git submodule update
|
git submodule update
|
||||||
|
|
||||||
To get all the current plugins. Over time, I plan to move all plugins into submodules.
|
To get all the current plugins. Over time, I plan to move all plugins into submodules.
|
||||||
@@ -18,31 +53,26 @@ To get all the current plugins. Over time, I plan to move all plugins into submo
|
|||||||
Setup for ZSH
|
Setup for ZSH
|
||||||
---
|
---
|
||||||
I am now using ZSH as my default shell because of its awesome globbing
|
I am now using ZSH as my default shell because of its awesome globbing
|
||||||
and autocomplete features, nice colors, etc. This setup assumes you use
|
and autocomplete features (the spelling fixer autocomplete is worth the money alone).
|
||||||
oh-my-zsh (https://github.com/robbyrussell/oh-my-zsh)
|
|
||||||
|
This setup assumes you use oh-my-zsh (https://github.com/robbyrussell/oh-my-zsh)
|
||||||
|
|
||||||
Place this as the last line in your ~/.zshrc created by oh-my-zsh:
|
Place this as the last line in your ~/.zshrc created by oh-my-zsh:
|
||||||
|
|
||||||
source ~/.dotfiles/zshrc
|
source ~/.dotfiles/zshrc
|
||||||
|
|
||||||
This setup reuses my bash aliases but provides some custom functions.
|
Lots of things I do every day are done with two or three character
|
||||||
|
mnemonic aliases. Please feel free to edit them:
|
||||||
Setup for Bash
|
|
||||||
---
|
|
||||||
To set these up as your own (careful, don't overwrite your bash_profile unintentionally!):
|
|
||||||
|
|
||||||
git clone git://github.com/skwp/dotfiles ~/.dotfiles
|
|
||||||
|
|
||||||
ln -s ~/.dotfiles/bash_profile ~/.bash_profile
|
|
||||||
. ~/.bash_profile
|
|
||||||
|
|
||||||
Lots of things I do every day are done with
|
|
||||||
two or three character mnemonic aliases. Please
|
|
||||||
feel free to edit them:
|
|
||||||
|
|
||||||
ae # alias edit
|
ae # alias edit
|
||||||
ar # alias reload
|
ar # alias reload
|
||||||
|
|
||||||
|
Here are some of the customizations you get with this setup:
|
||||||
|
|
||||||
|
* Vim mode
|
||||||
|
* Bash style ctrl-R for reverse history finder
|
||||||
|
* Fuzzy matching - if you mistype a directory name, tab completoin will fix it
|
||||||
|
|
||||||
Setup for Pry
|
Setup for Pry
|
||||||
---
|
---
|
||||||
Pry (http://pry.github.com/) offers a much better out of the box IRB experience
|
Pry (http://pry.github.com/) offers a much better out of the box IRB experience
|
||||||
@@ -53,8 +83,18 @@ with colors, tab completion, and lots of other tricks. You should:
|
|||||||
ln -s ~/.dotfiles/irb/pryrc ~/.pryrc
|
ln -s ~/.dotfiles/irb/pryrc ~/.pryrc
|
||||||
ln -s ~/.dotfiles/irb/aprc ~/.aprc
|
ln -s ~/.dotfiles/irb/aprc ~/.aprc
|
||||||
|
|
||||||
The pryrc included here also offers some nice commands like 'clear', 'sql', and etc
|
Use pry
|
||||||
Look at the pryrc to see a list of commands or just type 'help' from pry.
|
|
||||||
|
* as irb: 'pry'
|
||||||
|
* as rails console: script/console --irb=pry
|
||||||
|
|
||||||
|
Pry customizations:
|
||||||
|
|
||||||
|
* 'clear' command to clear screen
|
||||||
|
* 'sql' command to execute something (within a rails console)
|
||||||
|
* all objects displayed in readable format (colorized, sorted hash keys) - via awesome_print
|
||||||
|
* a few color modifications to make it more useable
|
||||||
|
* type 'help' to see all the commands
|
||||||
|
|
||||||
Setup for Vim
|
Setup for Vim
|
||||||
---
|
---
|
||||||
@@ -67,7 +107,7 @@ The .vimrc is well commented and broken up by settings. I encourage you
|
|||||||
to take a look and learn some of my handy aliases, or comment them out
|
to take a look and learn some of my handy aliases, or comment them out
|
||||||
if you don't like them, or make your own.
|
if you don't like them, or make your own.
|
||||||
|
|
||||||
These are things I use every day to be insanely productive. Hope you like em.
|
Some of the vim customizations include:
|
||||||
|
|
||||||
* F - instantly Find definition of class (must have exuberant ctags installed)
|
* F - instantly Find definition of class (must have exuberant ctags installed)
|
||||||
* B - show Buffer explorer
|
* B - show Buffer explorer
|
||||||
@@ -85,12 +125,13 @@ These are things I use every day to be insanely productive. Hope you like em.
|
|||||||
* Ctrl-\ - Show NerdTree (project finder) and expose current file
|
* Ctrl-\ - Show NerdTree (project finder) and expose current file
|
||||||
* cf - Copy Filename of current file into system (not vi) paste buffer
|
* cf - Copy Filename of current file into system (not vi) paste buffer
|
||||||
* // - clear the search
|
* // - clear the search
|
||||||
* ,, or z,, - use EasyMotion - type that and then type one of the highlighted letters. I'm just exploring this one.
|
* ,, or z,, - use EasyMotion - type that and then type one of the highlighted letters.
|
||||||
* Apple-k and Apple-K to type underscores and dashes, since they are so common in code but so far away from home row
|
* Apple-k and Apple-K to type underscores and dashes, since they are so common in code but so far away from home row
|
||||||
* yw - remapped to yaw, meaning yanking a word will yank the entire word no matter where your cursor is
|
* yw - remapped to yaw, meaning yanking a word will yank the entire word no matter where your cursor is
|
||||||
* W - write a file (instead of :w, saving you keystrokes for the most common vim operation)
|
* W - write a file (instead of :w, saving you keystrokes for the most common vim operation)
|
||||||
* gcc (comment a line) via tComment, and gcp custom alias to comment a paragraph
|
* gcc (comment a line) via tComment, and gcp custom alias to comment a paragraph
|
||||||
* Cc - (Current command) copies the command under your cursor and executes it in vim. Great for testing single line changes to vimrc.
|
* Cc - (Current command) copies the command under your cursor and executes it in vim. Great for testing single line changes to vimrc.
|
||||||
|
* \ss to run specs, \ll to run a given spec on a line - using my vim-ruby-conque plugin (https://github.com/skwp/vim-ruby-conque)
|
||||||
|
|
||||||
Setup for Git
|
Setup for Git
|
||||||
---
|
---
|
||||||
@@ -98,7 +139,18 @@ To use the gitconfig (some of the git bash aliases rely on my git aliases)
|
|||||||
|
|
||||||
ln -s ~/.dotfiles/gitconfig ~/.gitconfig
|
ln -s ~/.dotfiles/gitconfig ~/.gitconfig
|
||||||
|
|
||||||
Read through the gitconfig to find out what's in store.
|
Some of the customizations provided include:
|
||||||
|
|
||||||
|
* git l - a much more usable git log
|
||||||
|
* git b - a list of branches with summary of last commit
|
||||||
|
* git r - a list of remotes with info
|
||||||
|
* git t - a list of tags with info
|
||||||
|
* git nb - a (n)ew (b)ranch - like checkout -b
|
||||||
|
* git cp - cherry-pick -x (showing what was cherrypicked)
|
||||||
|
* git changelog - a nice format for creating changelogs
|
||||||
|
* Some sensible default configs, such as improving merge messages, push only pushes the current branch, removing status hints, and using mnemonic prefixes in diff: (i)ndex, (w)ork tree, (c)ommit and (o)bject
|
||||||
|
* Slightly imrpoved colors for diff
|
||||||
|
* git unstage (remove from index) and git uncommit (revert to the time prior to the last commit - dangerous if already pushed) aliases
|
||||||
|
|
||||||
OSX Hacks
|
OSX Hacks
|
||||||
---
|
---
|
||||||
@@ -107,24 +159,17 @@ under osx. Read through it before running it. To use:
|
|||||||
|
|
||||||
./osx
|
./osx
|
||||||
|
|
||||||
OSX KeyBindings for systemwide text editing
|
These hacks are Lion-centric. May not work for other OS'es. My favorite mods include:
|
||||||
|
|
||||||
|
* Ultra fast key repeat rate (now you can scroll super quick using j/k)
|
||||||
|
* No disk image verification (downloaded files open quicker)
|
||||||
|
* Display the ~/Library folder in finder (hidden in Lion)
|
||||||
|
|
||||||
|
Other recommended OSX tools
|
||||||
---
|
---
|
||||||
I am also experimenting with Brett Terpstra's OSX KeyBindings (github: ttscoff/KeyBindings)
|
* NValt - Notational Velocity alternative fork - http://brettterpstra.com/project/nvalt/ - syncs with SimpleNote
|
||||||
for good text editing features across the entire OS. To install:
|
* Vimium for Chrome - vim style browsing. The 'f' to type the two char alias of any link is worth it.
|
||||||
|
* QuickCursor - gives you Apple-Shift-E to edit any OSX text field in vim.
|
||||||
git submodule update
|
|
||||||
mkdir -p ~/Library/KeyBindings
|
|
||||||
ln -s KeyBindings/DefaultKeyBinding.dict ~/Library/KeyBindings/DefaultKeyBindings.dict
|
|
||||||
|
|
||||||
More info: http://brettterpstra.com/keybinding-madness/
|
|
||||||
|
|
||||||
other OSX Insane Productivity tools I use
|
|
||||||
---
|
|
||||||
* NValt - Notational Velocity alternative fork - http://brettterpstra.com/project/nvalt/
|
|
||||||
Dirt simple note taking, syncs to simplenote, supports all kinds of fun things like @done for todos
|
|
||||||
|
|
||||||
* Safari Snipe extension - find an open tab. Map it to "Ctrl-/" for ultimate vim-style happiness
|
|
||||||
http://safariextensions.tumblr.com/post/3681229291/snipe-03-06-11
|
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
===
|
===
|
||||||
@@ -134,8 +179,8 @@ and other places for the cream of the crop of vim and bash awesomeness.
|
|||||||
|
|
||||||
COMING SOON
|
COMING SOON
|
||||||
===
|
===
|
||||||
* Full migration to tpope's pathogen for all plugins
|
* Full migration to tpope's pathogen format (~/.vim/bundle) for all plugins
|
||||||
* Better isolation of customizations in smaller chunks
|
* Better isolation of customizations in smaller chunks, maybe as plugins
|
||||||
* Automatic setup script to symlink all dotfiles, or just some selectively
|
* Automatic setup script to symlink all dotfiles, or just some selectively
|
||||||
|
|
||||||
For more tips and tricks
|
For more tips and tricks
|
||||||
|
|||||||
@@ -16,16 +16,8 @@ alias du='du -h -d 2'
|
|||||||
alias lsg='ll | grep'
|
alias lsg='ll | grep'
|
||||||
|
|
||||||
# Alias Editing
|
# Alias Editing
|
||||||
alias ae='vi ~/.dotfiles/bash_aliases' #alias edit
|
alias ae='vi ~/.dotfiles/aliases' #alias edit
|
||||||
alias ar='source ~/.dotfiles/bash_aliases' #alias reload
|
alias ar='source ~/.dotfiles/aliases' #alias reload
|
||||||
|
|
||||||
# Bash Options Editing
|
|
||||||
alias boe='vi ~/.dotfiles/bash_options'
|
|
||||||
alias bor='source ~/.dotfiles/bash_options'
|
|
||||||
|
|
||||||
# .bash_profile editing
|
|
||||||
alias bp='vi ~/.bash_profile'
|
|
||||||
alias br='source ~/.bash_profile'
|
|
||||||
|
|
||||||
# vimrc editing
|
# vimrc editing
|
||||||
alias ve='vi ~/.vimrc'
|
alias ve='vi ~/.vimrc'
|
||||||
@@ -76,12 +68,11 @@ alias grsh='git reset --hard'
|
|||||||
alias gcln='git clean'
|
alias gcln='git clean'
|
||||||
alias gclndf='git clean -df'
|
alias gclndf='git clean -df'
|
||||||
|
|
||||||
# Common bash functions
|
# Common shell functions
|
||||||
alias less='less -r'
|
alias less='less -r'
|
||||||
alias tf='tail -f'
|
alias tf='tail -f'
|
||||||
alias l='less'
|
alias l='less'
|
||||||
alias lh='ls -alt | head' # see the last modified files
|
alias lh='ls -alt | head' # see the last modified files
|
||||||
alias fn="find . -name"
|
|
||||||
alias screen='TERM=screen screen'
|
alias screen='TERM=screen screen'
|
||||||
alias cl='clear'
|
alias cl='clear'
|
||||||
alias ps='ps aux'
|
alias ps='ps aux'
|
||||||
26
bash_options
26
bash_options
@@ -1,26 +0,0 @@
|
|||||||
# vi mode, of course
|
|
||||||
set -o vi
|
|
||||||
|
|
||||||
# case-insensitive globbing (used in pathname expansion)
|
|
||||||
shopt -s nocaseglob
|
|
||||||
|
|
||||||
# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
|
|
||||||
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2)" scp sftp ssh
|
|
||||||
|
|
||||||
# Colors the way I like em
|
|
||||||
export LSCOLORS=BxGxFxdxCxDxDxhbadBxBx
|
|
||||||
|
|
||||||
# Larger bash history (allow 32k entries; default is 500)
|
|
||||||
export HISTSIZE=32768
|
|
||||||
export HISTFILESIZE=$HISTSIZE
|
|
||||||
export HISTCONTROL=ignoredups
|
|
||||||
|
|
||||||
# Make some commands not show up in history
|
|
||||||
export HISTIGNORE="ls:ls *"
|
|
||||||
|
|
||||||
export EVENT_NOKQUEUE=1
|
|
||||||
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
|
|
||||||
export COPYFILE_DISABLE=true
|
|
||||||
|
|
||||||
# Prompt
|
|
||||||
export PS1='\[\033[01;34m\]\u:\[\033[01;32m\]\w\[\033[00;34m\]\[\033[01;32m\]\[\033[00m\]\[\033[01;33m\]$(__git_ps1)$ \[\033[00;37m\]'
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export PATH=$PATH:~/.dotfiles/bin:~/.dotfiles/bin/willmorgan/bin
|
|
||||||
15
bash_profile
15
bash_profile
@@ -1,15 +0,0 @@
|
|||||||
# Load secret stuff that I don't want to share with the world on github :)
|
|
||||||
if [ -e ~/.secrets ]; then
|
|
||||||
. ~/.secrets
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Load git completion
|
|
||||||
. ~/.dotfiles/git-completion.bash
|
|
||||||
|
|
||||||
# My aliases and options
|
|
||||||
. ~/.dotfiles/bash_aliases
|
|
||||||
. ~/.dotfiles/bash_options
|
|
||||||
. ~/.dotfiles/bash_path
|
|
||||||
|
|
||||||
# RVM
|
|
||||||
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
|
|
||||||
2276
git-completion.bash
2276
git-completion.bash
File diff suppressed because it is too large
Load Diff
12
gitconfig
12
gitconfig
@@ -11,13 +11,13 @@
|
|||||||
old = red bold
|
old = red bold
|
||||||
new = green bold
|
new = green bold
|
||||||
[alias]
|
[alias]
|
||||||
d = diff # show unstaged changes
|
d = diff # show unstaged changes
|
||||||
dc = diff --cached # show staged changes
|
dc = diff --cached # show staged changes
|
||||||
last = diff HEAD^ # show last committed change
|
last = diff HEAD^ # show last committed change
|
||||||
unstage = reset HEAD # remove files from index (tracking)
|
unstage = reset HEAD # remove files from index (tracking)
|
||||||
uncommit = reset --soft HEAD^ # go back before last commit, with files in uncommitted state
|
uncommit = reset --soft HEAD^ # go back before last commit, with files in uncommitted state
|
||||||
chunkyadd = add --patch # stage commits chunk by chunk
|
chunkyadd = add --patch # stage commits chunk by chunk
|
||||||
filelog = log -u # show changes to a file
|
filelog = log -u # show changes to a file
|
||||||
amend = commit --amend
|
amend = commit --amend
|
||||||
ammend = commit --amend
|
ammend = commit --amend
|
||||||
mt = mergetool #fire up the merge tool
|
mt = mergetool #fire up the merge tool
|
||||||
|
|||||||
@@ -1,819 +0,0 @@
|
|||||||
*vcscommand.txt* vcscommand
|
|
||||||
Copyright (c) 2007 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|
|
|
||||||
|VCSCommandEdit|
|
|
||||||
|VCSCommandEnableBufferSetup|
|
|
||||||
|VCSCommandMappings|
|
|
||||||
|VCSCommandMapPrefix|
|
|
||||||
|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'.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
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
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
" Vim syntax file
|
|
||||||
" Language: CVS annotate output
|
|
||||||
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
|
|
||||||
" Remark: Used by the cvscommand plugin. Originally written by Mathieu
|
|
||||||
" Clabaut
|
|
||||||
" License:
|
|
||||||
" Copyright (c) 2007 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.
|
|
||||||
|
|
||||||
if version < 600
|
|
||||||
syntax clear
|
|
||||||
elseif exists("b:current_syntax")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
syn match cvsDate /\d\d-...-\d\d/ contained
|
|
||||||
syn match cvsName /(\S* /hs=s+1,he=e-1 contained nextgroup=cvsDate
|
|
||||||
syn match cvsVer /^\d\+\(\.\d\+\)\+/ contained nextgroup=cvsName
|
|
||||||
syn region cvsHead start="^\d\+\.\d\+" end="):" contains=cvsVer,cvsName,cvsDate
|
|
||||||
|
|
||||||
if !exists("did_cvsannotate_syntax_inits")
|
|
||||||
let did_cvsannotate_syntax_inits = 1
|
|
||||||
hi link cvsDate Comment
|
|
||||||
hi link cvsName Type
|
|
||||||
hi link cvsVer Statement
|
|
||||||
endif
|
|
||||||
|
|
||||||
let b:current_syntax="CVSAnnotate"
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
" Vim syntax file
|
|
||||||
" Language: git annotate output
|
|
||||||
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
|
|
||||||
" Remark: Used by the vcscommand plugin.
|
|
||||||
" License:
|
|
||||||
" Copyright (c) 2009 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.
|
|
||||||
|
|
||||||
if exists("b:current_syntax")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
syn region gitName start="(\@<=" end="\( \d\d\d\d-\)\@=" contained
|
|
||||||
syn match gitCommit /^\^\?\x\+/ contained
|
|
||||||
syn match gitDate /\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d [+-]\d\d\d\d/ contained
|
|
||||||
syn match gitLineNumber /\d\+)\@=/ contained
|
|
||||||
syn region gitAnnotation start="^" end=") " oneline keepend contains=gitCommit,gitLineNumber,gitDate,gitName
|
|
||||||
|
|
||||||
if !exists("did_gitannotate_syntax_inits")
|
|
||||||
let did_gitannotate_syntax_inits = 1
|
|
||||||
hi link gitName Type
|
|
||||||
hi link gitCommit Statement
|
|
||||||
hi link gitDate Comment
|
|
||||||
hi link gitLineNumber Label
|
|
||||||
endif
|
|
||||||
|
|
||||||
let b:current_syntax="gitAnnotate"
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
" Vim syntax file
|
|
||||||
" Language: HG annotate output
|
|
||||||
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
|
|
||||||
" Remark: Used by the vcscommand plugin.
|
|
||||||
" License:
|
|
||||||
" Copyright (c) 2010 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.
|
|
||||||
|
|
||||||
if exists("b:current_syntax")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
syn match hgVer /\d\+/ contained
|
|
||||||
syn match hgName /^\s*\S\+/ contained
|
|
||||||
syn match hgHead /^\s*\S\+\s\+\d\+:/ contains=hgVer,hgName
|
|
||||||
|
|
||||||
if !exists("did_hgannotate_syntax_inits")
|
|
||||||
let did_hgannotate_syntax_inits = 1
|
|
||||||
hi link hgName Type
|
|
||||||
hi link hgVer Statement
|
|
||||||
endif
|
|
||||||
|
|
||||||
let b:current_syntax="hgAnnotate"
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
" Vim syntax file
|
|
||||||
" Language: SVK annotate output
|
|
||||||
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
|
|
||||||
" Remark: Used by the vcscommand plugin.
|
|
||||||
" License:
|
|
||||||
" Copyright (c) 2007 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.
|
|
||||||
|
|
||||||
if exists("b:current_syntax")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
syn match svkDate /\d\{4}-\d\{1,2}-\d\{1,2}/ skipwhite contained
|
|
||||||
syn match svkName /(\s*\zs\S\+/ contained nextgroup=svkDate skipwhite
|
|
||||||
syn match svkVer /^\s*\d\+/ contained nextgroup=svkName skipwhite
|
|
||||||
syn region svkHead start=/^/ end="):" contains=svkVer,svkName,svkDate oneline
|
|
||||||
|
|
||||||
if !exists("did_svkannotate_syntax_inits")
|
|
||||||
let did_svkannotate_syntax_inits = 1
|
|
||||||
hi link svkName Type
|
|
||||||
hi link svkDate Comment
|
|
||||||
hi link svkVer Statement
|
|
||||||
endif
|
|
||||||
|
|
||||||
let b:current_syntax="svkAnnotate"
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
" Vim syntax file
|
|
||||||
" Language: SVN annotate output
|
|
||||||
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
|
|
||||||
" Remark: Used by the vcscommand plugin.
|
|
||||||
" License:
|
|
||||||
" Copyright (c) 2007 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.
|
|
||||||
|
|
||||||
if exists("b:current_syntax")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
syn match svnName /\S\+/ contained
|
|
||||||
syn match svnVer /^\s\+\zs\d\+/ contained nextgroup=svnName skipwhite
|
|
||||||
syn match svnHead /^\s\+\d\+\s\+\S\+/ contains=svnVer,svnName
|
|
||||||
|
|
||||||
if !exists("did_svnannotate_syntax_inits")
|
|
||||||
let did_svnannotate_syntax_inits = 1
|
|
||||||
hi link svnName Type
|
|
||||||
hi link svnVer Statement
|
|
||||||
endif
|
|
||||||
|
|
||||||
let b:current_syntax="svnAnnotate"
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
" Vim syntax file
|
|
||||||
" Language: VCS commit file
|
|
||||||
" Maintainer: Bob Hiestand (bob.hiestand@gmail.com)
|
|
||||||
" License:
|
|
||||||
" Copyright (c) 2007 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.
|
|
||||||
|
|
||||||
if exists("b:current_syntax")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
syntax region vcsComment start="^VCS: " end="$"
|
|
||||||
highlight link vcsComment Comment
|
|
||||||
let b:current_syntax = "vcscommit"
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
<suspended file='/Users/yan/Sites/git-vamp/vendor/rails/activerecord/lib/active_record/validations.rb' line='945' threadId='640' frames='19'/>++vim-ruby-debugger separator++<variables><variable name="self" kind="local" value="-" type="User" hasChildren="true" objectId="+0x83046e3c"/></variables>++vim-ruby-debugger separator++<frames><frame no='1' file='/Users/yan/Sites/git-vamp/vendor/rails/activerecord/lib/active_record/validations.rb' line='945' current='true' /><frame no='2' file='/Users/yan/Sites/git-vamp/vendor/rails/activerecord/lib/active_record/validations.rb' line='940' /><frame no='3' file='/Users/yan/Sites/git-vamp/vendor/rails/activerecord/lib/active_record/callbacks.rb' line='267' /><frame no='4' file='/Users/yan/Sites/git-vamp/vendor/rails/activerecord/lib/active_record/validations.rb' line='910' /><frame no='5' file='/Users/yan/Sites/git-vamp/vendor/rails/activerecord/lib/active_record/dirty.rb' line='83' /><frame no='6' file='/Users/yan/Sites/git-vamp/vendor/rails/activerecord/lib/active_record/transactions.rb' line='110' /><frame no='7' file='/Users/yan/Sites/git-vamp/vendor/rails/activerecord/lib/active_record/transactions.rb' line='79' /><frame no='8' file='/Users/yan/Sites/git-vamp/vendor/rails/activerecord/lib/active_record/transactions.rb' line='98' /><frame no='9' file='/Users/yan/Sites/git-vamp/vendor/rails/activerecord/lib/active_record/transactions.rb' line='110' /><frame no='10' file='/Users/yan/Sites/git-vamp/vendor/rails/activerecord/lib/active_record/transactions.rb' line='110' /><frame no='11' file='/Users/yan/Sites/git-vamp/app/controllers/account_controller.rb' line='126' /><frame no='12' file='/Users/yan/Sites/git-vamp/vendor/rails/actionpack/lib/action_controller/base.rb' line='1162' /><frame no='13' file='/Users/yan/Sites/git-vamp/vendor/rails/actionpack/lib/action_controller/base.rb' line='1162' /><frame no='14' file='/Users/yan/Sites/git-vamp/vendor/rails/actionpack/lib/action_controller/filters.rb' line='580' /><frame no='15' file='/Users/yan/Sites/git-vamp/vendor/rails/actionpack/lib/action_controller/filters.rb' line='601' /><frame no='16' file='/Users/yan/Sites/git-vamp/vendor/rails/actionpack/lib/action_controller/filters.rb' line='415' /><frame no='17' file='/Users/yan/Sites/git-vamp/vendor/rails/activesupport/lib/active_support/callbacks.rb' line='177' /><frame no='18' file='/Users/yan/Sites/git-vamp/vendor/rails/actionpack/lib/action_controller/filters.rb' line='393' /><frame no='19' file='/Users/yan/Sites/git-vamp/vendor/rails/actionpack/lib/action_controller/filters.rb' line='598' /></frames>
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
2011/01/25 11:25:22 Toggling window with name: frames
|
|
||||||
2011/01/25 11:25:22 Opened window with name: frames
|
|
||||||
2011/01/25 11:25:22 Start displaying data in window with name: frames
|
|
||||||
2011/01/25 11:25:22 Set focus to window with name: frames
|
|
||||||
2011/01/25 11:25:22 Inserted data to window with name: frames
|
|
||||||
2011/01/25 11:25:22 Restored view of window with name: frames
|
|
||||||
2011/01/25 11:25:22 Complete displaying data in window with name: frames
|
|
||||||
2011/01/25 11:25:22 Opened frames window
|
|
||||||
2011/01/25 11:25:28 Toggling window with name: frames
|
|
||||||
2011/01/25 11:25:28 Opened window with name: frames
|
|
||||||
2011/01/25 11:25:28 Start displaying data in window with name: frames
|
|
||||||
2011/01/25 11:25:28 Set focus to window with name: frames
|
|
||||||
2011/01/25 11:25:28 Inserted data to window with name: frames
|
|
||||||
2011/01/25 11:25:28 Restored view of window with name: frames
|
|
||||||
2011/01/25 11:25:28 Complete displaying data in window with name: frames
|
|
||||||
2011/01/25 11:25:28 Opened frames window
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
Fast Debugger (ruby-debug-ide 0.4.16, ruby-debug-base 0.10.4) listens on 127.0.0.1:39767
|
|
||||||
=> Booting WEBrick
|
|
||||||
=> Rails 2.3.6 application starting on http://0.0.0.0:3000
|
|
||||||
** [NewRelic] NewRelic Agent Developer Mode enabled.
|
|
||||||
** [NewRelic] To view performance information, go to http://localhost:3000/newrelic
|
|
||||||
** [NewRelic] New Relic RPM Agent 2.10.1 Initialized: pid = 95408
|
|
||||||
** [NewRelic] Agent Log found in /Users/yan/Sites/git-vamp/log/newrelic_agent.log
|
|
||||||
=> QueryTrace disabled; CTRL-\ to toggle
|
|
||||||
=> Call with -d to detach
|
|
||||||
=> Ctrl-C to shutdown server
|
|
||||||
[2010-12-11 00:51:22] INFO WEBrick 1.3.1
|
|
||||||
[2010-12-11 00:51:22] INFO ruby 1.8.7 (2009-06-12) [universal-darwin10.0]
|
|
||||||
[2010-12-11 00:51:22] WARN TCPServer Error: Address already in use - bind(2)
|
|
||||||
Exiting
|
|
||||||
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/utils.rb:73:in `initialize'
|
|
||||||
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/utils.rb:73:in `new'
|
|
||||||
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/utils.rb:73:in `create_listeners'
|
|
||||||
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/utils.rb:70:in `each'
|
|
||||||
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/utils.rb:70:in `create_listeners'
|
|
||||||
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:75:in `listen'
|
|
||||||
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize'
|
|
||||||
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize'
|
|
||||||
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:10:in `new'
|
|
||||||
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:10:in `run'
|
|
||||||
/Users/yan/Sites/git-vamp/vendor/rails/railties/lib/commands/server.rb:111
|
|
||||||
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
|
|
||||||
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
|
|
||||||
/Users/yan/Sites/git-vamp/script/server:3
|
|
||||||
/Library/Ruby/Gems/1.8/gems/ruby-debug-ide-0.4.16/lib/ruby-debug-ide.rb:112:in `debug_load'
|
|
||||||
/Library/Ruby/Gems/1.8/gems/ruby-debug-ide-0.4.16/lib/ruby-debug-ide.rb:112:in `debug_program'
|
|
||||||
/Library/Ruby/Gems/1.8/gems/ruby-debug-ide-0.4.16/bin/rdebug-ide:87
|
|
||||||
/usr/bin/rdebug-ide:19:in `load'
|
|
||||||
/usr/bin/rdebug-ide:19
|
|
||||||
Uncaught exception: Address already in use - bind(2)
|
|
||||||
5
vimrc
5
vimrc
@@ -135,16 +135,13 @@ if has("gui_running")
|
|||||||
|
|
||||||
" http://ethanschoonover.com/solarized/vim-colors-solarized
|
" http://ethanschoonover.com/solarized/vim-colors-solarized
|
||||||
colorscheme solarized
|
colorscheme solarized
|
||||||
|
|
||||||
|
|
||||||
set background=dark
|
set background=dark
|
||||||
|
|
||||||
set guitablabel=%M%t
|
set guitablabel=%M%t
|
||||||
set lines=60
|
set lines=60
|
||||||
set columns=190
|
set columns=190
|
||||||
|
|
||||||
set guifont=Monaco:h17
|
set guifont=Inconsolata:h20,Monaco:h17
|
||||||
set guifont=Inconsolata:h20 " if available, this one is nicer
|
|
||||||
else
|
else
|
||||||
"dont load csapprox if we no gui support - silences an annoying warning
|
"dont load csapprox if we no gui support - silences an annoying warning
|
||||||
let g:CSApprox_loaded = 1
|
let g:CSApprox_loaded = 1
|
||||||
|
|||||||
@@ -14,5 +14,4 @@ alias -g G='| grep' # now you can do: ls foo G something
|
|||||||
# (f)ind by (n)ame
|
# (f)ind by (n)ame
|
||||||
# usage: fn foo
|
# usage: fn foo
|
||||||
# to find all files containing 'foo' in the name
|
# to find all files containing 'foo' in the name
|
||||||
unalias fn
|
|
||||||
function fn() { ls **/*$1* }
|
function fn() { ls **/*$1* }
|
||||||
|
|||||||
8
zshrc
8
zshrc
@@ -1,8 +1,7 @@
|
|||||||
# Configuration
|
# Configuration
|
||||||
source ~/.dotfiles/bash_aliases
|
source ~/.dotfiles/aliases
|
||||||
source ~/.dotfiles/zsh_aliases
|
source ~/.dotfiles/zsh_aliases
|
||||||
source ~/.dotfiles/bash_path
|
|
||||||
#
|
|
||||||
# Things I don't want to publish to github
|
# Things I don't want to publish to github
|
||||||
source ~/.secrets
|
source ~/.secrets
|
||||||
|
|
||||||
@@ -28,3 +27,6 @@ zstyle ':completion:*:approximate:*' max-errors 1 numeric
|
|||||||
|
|
||||||
# RVM
|
# RVM
|
||||||
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|
||||||
|
|
||||||
|
# Add path to our custom bins
|
||||||
|
export PATH=$PATH:~/.dotfiles/bin
|
||||||
|
|||||||
Reference in New Issue
Block a user