| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
NOTE: this project is no longer supported. The development moved to the Dotvim v2. Beta testers and contributions are welcome.
All the right plugins are in. Nerdtree, CtrlP, you name it.
The focus is on supporting Rails, but there is a lot of generic stuff too, so it will surely serve you well with any language of your choice.
The config is using NeoBundle for easy upgrading. The list of installed bundles is in the bundles.vim
IMPORTANT:
- Vundle was replaced with Neobundle. See Neobundle upgrade instructions if you have an older Vundle based install.
- vim-powerline was replaced with vim-airline. Please see installation instructions
Some help tips are provided for some of the plugins. please check out the plugin's docs for more info.
Follow @vkushner and @astrails on Twitter to receive announcements of new versions, tips, etc.
#### ContentsFrom your homedirectory (on Linux/Mac OSX):
git clone https://github.com/astrails/dotvim.git # or git@github.com:astrails/dotvim.git for ssh
ln -sfn dotvim .vim
ln -sfn dotvim/vimrc .vimrc
cd .vim; make install
Note: if you already have ~/.vim ~/.vimrc REMOVE THEM (you might want to backup them first :)
create ~/.vimrc.before or ~/.vimrc.after if you want to have some local/personal settings you don't want to commit into the repo. see "Local Configuration"
Dotvim was updated to use Neobundle instead of Vundle. NeoBundle is mostly similar but supports more ways to install bundles, better install, locked revisions and more.
To upgrade from an older Vundle based setup simply pull the latest version and run make.
#### General configurationNote: if you modified your bundles.vim you will need to replace all instances of Bundle with NeoBundle in it. Until you do your vim might print error messages during startup. ignore them and fix the bundles.vim, then run make.
, is used as mapleader backslash is used as localleader
Check out the 'plugins.vim' and 'after/plugin/bindings.vim' files for more...
#### Local configurationFor easy upgrades its preferable not to change the dotvim configuration files. Instead you can add your own local configuration into one of the local override files. There are several override files supported by dotvim.
They are loaded in the following order:
base dotvim configuration (global, plugin configurations, bindings, macros)
~/.vimrc.bundles
Loads additional bundles inside the neobundle#begin/end block. Should contain lines like NeoBundle 'my-custom/bundle'
~/.local-before.vim [deprecated]
~/.vimrc.before
Loaded before the plugins
This is where you should pre-set various plugin flags, enable/disable options etc. This is for things you would normally put into your vimrc file.
~/.gvimrc.before [when GUI running]
vim plugins
dotvim bindings and overrides (loaded from ~/.vim/after.vim)
.local-after.vim [deprecated]
.vimrc.after
Loaded after the plugins
This is where you can override settings set by plugins that have no customization options.
.gvimrc.after [when GUI running]
Backups and swapfiles are disabled. I really hate them both.
You can re-enable backups by adding the following to your ~/.local.vim:
set backup
and swapfiles by
set swapfile
backup dir is set to ~/.backup/
The directory is created if it doesn't exist.
#### Persistent UndoPersistent undos are enabled by default.
You can disable by adding the following to your ~/.local.vim:
set noundo
I included a couple of macros that I frequently use in macros.vim which is loaded from after.vim:
You really should start writing your own macros. The life will never be the same ;).
I recommend editing your macros in a vim buffer.
To load a macro into a register you can 'yank' it.
For example if you have a line with a macro and cursor is at the beginning of it "ay$ will load the macro into register a, so that you will be able to execute it with @a.
#### "Interesting" Plugins:hax0r vim script to give you a tree explorer
NERDTree and tabs together in Vim, painlessly
Vim plugin for intensely orgasmic commenting
TextMate Command-T like file finder for vim
Note: This plugin is currently DISABLED. See CtrlP plugin that is used instead
Fuzzy file, buffer, mru, tag, etc finder.
This is the new fuzzy finder used by dotvim. It replaced Command-T that was used before.
The default mapping is still the same:
This plugin has lots of options, see :h ctrlp for more.
Automatically opens popup menu for completions
Shouldn't require config.
Source code browser (supports C/C++, java, perl, python, tcl, sql, php, etc)
Maintains a history of previous yanks, changes and deletes
A Git wrapper so awesome, it should be illegal
:Gstatus
Bring up the output of git-status in the preview window. Press - to stage or unstage the file on the cursor line. Press p to do so on a per hunk basis (--patch). Press C to invoke :Gcommit.
:Gcommit [args]
A wrapper around git-commit.
:Ggrep [args]
:grep with git-grep as 'grepprg'.
,g
shortcut to run :Ggrep
//
global git search for the word under the cursor for for selection (in visual mode)
:Gblame
Run git-blame on the file and open the results in a scroll bound vertical split. Press enter on a line to reblame the file as it was in that commit.
Much more in the plugin's doc
syntax checking plugin
it will display the number of syntax errors in the current file in the vim's status line.
use :Errors to display a window detailing the errors
TextMate-style snippets for Vim
write a snipped text and press TAB to expand it.
To see the list of available snippets type Ctrl-R <Tab> in the insert mode
Delete/change/add parentheses/quotes/XML-tags/much more with ease
You should REALLY read the docs if you want to use this one
Align and AlignMaps lets you align statements on their equal signs, make comment boxes, align comments, align declarations, etc.
This plugin is a front for ag, A.K.A. the_silver_searcher. Ag can be used as a replacement for 153% of the uses of ack. This plugin will allow you to run ag from vim, and shows the results in a split window.
Installation:
A text object for manipulating blocks based on their indentation
This is good for Python, YAML, HAML etc.
Usage is similar to textobj-rubyblock, just with i instead of r
Replace a pattern across multiple files interactively
Use :Gsearch to search for a pattern. Edit the result buffer to your liking, then :Greplace to incorporate your edits into the source files
Lean & mean status/tabline for vim that's light as air.
A better replacement for vim-powerline. Optimized for speed; it loads in under a millisecond.
Install fonts for best results.
A plugin for resolving conflicts during three-way merges.
Add the following lines to ~/.gitconfig to use
[merge] tool = splice
[mergetool "splice"] cmd = "vim -f $BASE $LOCAL $REMOTE $MERGED -c 'SpliceInit'" trustExitCode = true
Bindings:
-g - switch to grid view
-l - switch to loupe view
-c - switch to compare view
-p - switch to path view
-o - select the original file
-1 - select file one
-2 - select file two
-r - select the results file
-n - next unresolved conflict
-N - prev unresolved conflict
-<space> - cycle layout
-s - toggle scrolllocking
-d - cycle diff combinations
-D - turn off all diffs
-CC - exits vim with error code (like :cquit). this will indicate to git that merge resolution failed
-q - exits vim with success; this will indicate to git that merge succeeded
:h splice - you should probably read it ;)
Wisely add "end" in ruby, endfunction/endif/more in vim script, etc
auto-completion for quotes, parens, brackets, etc. in insert mode.
Homepage is here
Graphs your vim undo tree in a side window.
Asynchronous build and test dispatcher from Tpope.
This plugin allows to run sync/async builds and other shell commands in background, with progress support.
try :Dispatch from inside a Rails rspec file. :h dispatch for more info.
Search and display information from arbitrary sources like files, buffers, recently used files or registers.
This plugins is to powerful to present here, read the documentation.
Just to give you the taste of it, try:
:Unite -no-start-insert -auto-preview colorscheme
Then try to navigate up and down and see what happens ;)
Vim Git Gutter (top) A Vim plugin which shows a git diff in the 'gutter' (sign column). It shows whether each line has been added, modified, and where lines have been removed.
In the screenshot above you can see:
Commands:
Bindings:
There are quite some customization options. see help.
Extracts i18n strings from source files into .yml file.
A plugin to switch segments of text with predefined replacements
it will switch "foo" to 'foo' to :foo. or {:foo => bar} to {foo: bar}, etc. See :h switch for more.
emmet.io like html/css workflow plugin.
.editorconfig file support.
Ruby on Rails: easy file navigation, enhanced syntax highlighting, and more
Lightweight support for Ruby's Bundler
TBD
A custom text object for selecting ruby blocks.
In other words it teaches vim to understand what is ruby block, just like vim already understands what is word, paragraph, sentence etc.
It works with begin/end, if/else/end etc.
Some 'trickier' usage patterns.
Refactoring tool for Ruby in vim!
Toggle ruby blocks style, e.g {} to do .. end
NOTE: thre is an unfortunate interaction with delimitMate, the opening brase gets completed. i.e. you get {} ... }
Vim plugin that searches http://apidock.com Ruby, Rails, and RSpec docs from within Vim.
Lightweight Rspec runner for Vim.
Commands are self explanatory:
Bindings:
Vim now has support for Emacs' Org mode provided by the VimOrganizer plugin.
Below you will also find a couple of plugins that support it, but can be also used intependently.
Calendar support w/o calling external programs.
A Narrow Region Plugin (similar to Emacs)
Allows to open selected text in a separate buffer for editing preserving the rest of the file around it.
Universal Text Linking plugin allow to open urls from text files.
:h utl_usr to read the help.
Bindings:
VimOrganizer is partly a clone of Emacs' Org-mode, and partly a front end to Org-mode itself. Do Org in Vim.
Some bindings:
Datetime prompt works mostly like the one in emacs org mode. See docs here
Its too big to give much userful information here. open any .org file to start using it. read the help:
:h VimOrganizer
You can find cheat sheet here
Working with TODO help is here
Org mode site is [here](http://orgmode.org/]
precision colorscheme for the vim text editor
A colorscheme strangely reminiscent of Vibrant Ink for a certain OS X editor
syntax suupport (extracted from tmux-1.1)
Syntax Highlighting for Puppet
synntax highlighting file for JSON
syntax, indent, etc. for Cucumber
HAML syntax etc.
syntax for Markdown
syntax for Coffee script
syntax for Jade
Slim syntax support.
stylus
TBD
Golang syntax support
Syntax for Docker build files.
Syntax for LESS.
Syntax for mustache and handlebars templates.
Clojure syntax support by the following plugins:
vim-clojure-static vim-fireplace rainbow_parentheses
rainbow_parentheses can be useful to other languages as well ;)
Rust support.
using files from rust repository
Support for user-defined text objects
Use the repeat command "." with supported plugins
Smart Space key for Vim
press SPACE to repeat last motion command
create gists on github
The following is a list of commands and key bindings that I personally find interesting stored for easy refreshing my memory of them. there is no much 'system' to it, just randomly chosen bits of vim goodness.
There is ~/.vim/bindings-ru-translit.vim file.
OSX has a nice russian translit keyboard layout which I use when I need to write any russian text. The problem is that once I go to the normal mode nothing works. This is an attempt to make vim at least partially useful when the kerboard is in russioan translit mode and not in the default US mode. The idea is to remap the russian characters to the english characters that correspond to the same keyboard key. And a couple of userful multy-key combinations.
Similar can be done for other keyboard layouts, your pull requests are welcome ;).
To use this feature: just include the file from your ~/.local.vim:
source ~/.vim/bindings-ru-translit.vim
My attempt to make vim look like iWriter ;) You can read about the details on our blog.
In short, just do :so ~/.vim/writer.vim when you are going to do some plain text writing.
© 2012 Vitaly Kushner
| Back | FazBrowse Home | New Git URL |