SkillAgentSearch skills...

Dotvim

An attempt at The Ultimate Vim Configuration™ with focus on Rails development. DEPRECATED, SEE https://github.com/vitaly/dotvim2

Install / Use

/learn @astrails/Dotvim
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Dotvim

NOTE: this project is no longer supported. The development moved to the Dotvim v2. Beta testers and contributions are welcome.

An attempt at The Ultimate Vim Configuration™ ;)

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:

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.

<a name=top> #### Contents <a name=installation> ##### Installation

From 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"

<a name=installation_note> > **IMPORTANT** > - **always** add a `colorscheme` to your `~/.vimrc.after` file. Even if you > use the defaults scheme add `colorscheme default`. Othewise you will get a > highlighting error `"E411: highlight group not found: Normal"` during vim > startup. > - [vim-airline](#airline) requires some extra glyphs to work properly. Check > the official documentation on [font > > installation](https://github.com/bling/vim-airline#integrating-with-powerline-fonts) > and follow the instructions. If you do not, then strange symbols will be > displayed instead (can be fixed by configuring it to use regular fonts. see > help)

top

<a name=upgrade_neobundle> #### Neobundle Upgrade

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.

Note: 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.

top

<a name=general> #### General configuration

, is used as mapleader backslash is used as localleader

  • ,e mapped to :e **/. essentially you do ,efoo<tab> to get a list of all files starting with foo
  • ,s - toggle invisible characters display
  • ,n - next quicklist result (like :Ggrep etc)
  • ,N - previous quicklist result (like :Ggrep etc)
  • Ctrl-E - switch between 2 last buffers (its just a :b#<cr> :)
  • Ctrl-N to cancel current search highlighing
  • ,f global Ggrep for word under the cursor or for selection
  • +, - - easily inc/decrement integers
  • ,W - remove trailing spaces
  • Ctrl-h/j/k/l - simplified split panes navigation
  • ,d - :diffupdate
  • ,dp - :diffput
  • ,dg - :diffget
  • %% - in control mode, i.e. after you typed : it will expand to the directory name of the currently opened file.

Check out the 'plugins.vim' and 'after/plugin/bindings.vim' files for more...

top

<a name=local> #### Local configuration

For 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]

top

<a name=backups> #### Backups

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.

top

<a name=undo> #### Persistent Undo

Persistent undos are enabled by default.

You can disable by adding the following to your ~/.local.vim:

set noundo

top

<a name=macros> #### Macros

I included a couple of macros that I frequently use in macros.vim which is loaded from after.vim:

  • @q (re)format paragraph forward
  • @s enclose selection with double *. e.g. **foo**.

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.

top

<a name=interesting> #### "Interesting" Plugins:
  • <a name=nerdtree>nerdtree (top)

    hax0r vim script to give you a tree explorer

    • Ctrl-P - open directory browser (Note: this is now handled by nerdtree-tabs (see below))
    • ,p - to find and highlight the currently open file in the tree
  • <a name=nerdtreetabs>nerdtree-tabs (top)

    NERDTree and tabs together in Vim, painlessly

    • Ctrl-P - open directory browser
  • <a name=nerdcommenter>nerdcommenter (top)

    Vim plugin for intensely orgasmic commenting

    • ,/ - toggle comment
    • ,cc - add commenting
    • ,cu - Uncomment
    • check docs for more
  • <a name=Command-T>Command-T (top)

    TextMate Command-T like file finder for vim

    Note: This plugin is currently DISABLED. See CtrlP plugin that is used instead

    • ,, - CommandT - find file
    • ,. - CommandTFlush - refresh the file list and then find a file
    • while at the finder prompt:
      • Ctrl-Enter - open file in a new split
      • Ctrl-s - open file in a new split
      • Ctrl-v - open file in a new vertical split
      • Ctrl-U - clear current partial path
      • Esc - cancel
      • Ctrl-c - cancel
  • <a name=CtrlP>CtrlP (top)

    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:

    • ,, - CtrlP - fuzzy find.
    • ,. - CtrlPClearCache followed by CtrlP - clears the cache and searches the files (not including MRU and buffers)
    • ,m - CtrlPBufTag - search tags in the current buffer
    • `,M
View on GitHub
GitHub Stars544
CategoryDevelopment
Updated16d ago
Forks131

Languages

VimL

Security Score

95/100

Audited on Mar 16, 2026

No findings