Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 4366f6e56a
Fetching contributors…

Cannot retrieve contributors at this time

207 lines (167 sloc) 11.868 kb

My personal VIM-config

This is my personal configuration for everybodies favorite editor VIM. I use it mainly for ruby development with a touch of PHP. My configuration is based on duwanis wonderful work.

This repository is meant to be used with the wonderful Homesick-Gem:

homesick clone thenoseman/vim_config
homesick symlink vim_config

Fork away!

Current Plugins:

Added non-plugin features

  • CopyMatches Script from vimtips (:CopyMatches)
  • my own "mvim" script (extras/mvim) that makes all passed cmdargs available to vim ($VIM_CMDARGS) This is used to enable you to call "mvim -d" with two directories (normally only two files). If you call "mvim -d" with two directories, the DirDiff Plugin will automatically be called to diff the directories.
  • A modified version of the railscasts theme as default theme
  • My favorite font Inconsolata-dz in extras
  • update_all_submodules_to_head script that updates all submodules and creates a commit for those updates
  • renew_php_functionlist script to update the PHP-OmniComplete Function list from the PHP SVN Repository
  • DiffOrig Function (:DiffOrig) to show the changes made to the current unsaved buffer

Ack.vim

ack is a a grep alternative written in perl. It sports context sensitive search and is generally blazingly fast. Commands are :Ack which searches for a term and jumps to the first hit and :Ack! which searches and justs opens the hits in the quickfix window. I mapped Ack to Ack! because I don't like the auto-opening.

Ctrl-P

The revelation when it comes to file-finding. Alternative to fuzzyfinder and Command-T. Far superior to to those two in my opinion. Use ,m to open the finder in file-mode. If you add files to your project run :ClearCtrlPCache so the plugin can find those new files.

dirdiff

Enables the comparison of directories in addition to files. If you use my mvim shell script instead of the MacVim supplied one you can use mvim -d dir1 dir2 and vim will automatically jump into DirDiff mode. Manually usage is DirDiff SourceDir1 SourceDir2. After the comparison window is open use the commands described in the DirDiff readme.

endwise

Auto closes ruby structures with end where appropriate

Fugitive

A (the) git wrapper for vim. Use :Gc to commit, :Gs for status. When you are in a conflicted file use :Dland :Dr to copy the current hunk from left or right to the working copy.

greplace

Ever wanted to search/replace in all/some of the files in your project? That's an absolute nightmare using vimgrep. Fret not! :Gsearch has you covered! Use :Gsearch to search project-wide. The results will be opened in a buffer for you to edit in place. After editing (don't save that buffer) use :Greplace to integrate your changes back into the original files. This thing so rocks!

html5-syntax

Adds syntax support for HTML5 elements like "data-*" or

NERDCommenter

Filetype sensitive commenting and uncommenting of textblocks. Mapped to ,c (thats ,c[space]) to toggle commenting in visual-mode.

NERDTree

The file-explorer for vim. Closed by default. Use ,d to open. After you add or delete files use :CtrlPClearCache to regenerate the ctrl-p cache.

PHP-Indention

Once there was a time where I was knee-deep into PHP :) See this "blog" about what it does.

Rails.vim

This does so much good for you I can't even find a feature to start with. If you are in a rails file (eg. controller) you can use :Test to open the corresponding test-file in a horizontal-split.

Rake.vim

Adds all the rails.vim goodies to your plain old ruby files.

Repeat.vim

Allows to repeat (.) plugin commands like they were edit-commands.

Snipmate.vim

Snippet expansion using the tab key. There are three places currently with snippets:

  • home/.vim/snipmate/honza-snippets A collection of snippets for a lot of filetypes including ruby
  • home/.vim/snipmate/scrooloose Html, HAML, CSS, Javacript and ruby snippets and a few more
  • home/.vim/custom My personal snippets

If you want to add your own directory, go to home/.vim/config/plugins/snipmate.vim and add your path to the runtimepath

Supertab

Smart text completion (eg. OmniComplete) configured to use the ctrl-space () key combo instead of tab which snipmate uses. I tried to make it as smart as possible. It first tries Omni-Completion and then falls back to local file complete. Soon: Try auto-completion based on the current tags. Doesn't work at the moment.

Surround.vim

Easily surround text with brakets, quotes or what have you. Change an existing surrounding using csOldNew (eg. "Hello" would become 'Hello' via cs"'), add surrounding with ysTextobjectSurrounding (Hello would become "Hello" with ysiw") or delete them with dsSurrounding. Actions are repeatable with . via repeat.vim.

Syntastic

On the fly (actually "on the save" :)) syntax checking for a lot of languages. A locationlist will open if you have an error in your file. Deactivated filetypes (changeable home/.vim/config/plugins/syntastic.vim):

  • html
  • coffee
  • haml
  • sass

vim-bundler

Adds :Bopen (bundle open) and :Bundle to vim. That's nice but more importantly it adds all tags files of all gems in your Gemfile to vims tags list. Generate those taks via the gem-ctags gem (gem install gem-ctags && gem ctags).

vim-coffee-script

Support for CoffeeScript in VIM. Adds syntax highlighting, indention and compilation support. Also includes syntax support for eco templates.

vim-easymotion

Jump to characters the easy way: ,,tCharacter and easymotion will show letters for every Hit it got. Type those letters and easymotion jumps to that point. Also works with f or w. There is a nice tutorial.

extradite

Not really sure if I need his one but ... A git log viewer. Inside a git managed file do :Dl. Quit the plugin with q.

vim-haml

Adds support for SASS, Scss and HAML files to VIM.

vim-javascript

Improvements to javascript indention in VIM.

Markdown syntax

Markdown syntax highlighting.

matchit

Jump to the beginning/end of the current selected group (eg. def ... end or class .. end) with %.

vim-ruby

The Standard ruby support plugin. Configured in home/.vim/config/plugins/vim-ruby.vim to highlight trailing whitespace and for best OmniComplete support without booting rails inside vim (see the official docs on how this works)

vim-smartinput

Smart autocompletion of brakets, quotes and additionally highly customizable. There are additional mappings in home/.vim/config/plugins/vim-smartinput.vim to fix an issue smartinput currently has.

vim-textobj-rubyblock

Adds the ar and ir text-objects to VIM so you can for example delete a complete method (with the cursor somewhere in it) via dir (deletes without def .. .end) or dar (deletes incl. def .. .end)

vim-visual-star-search

Select some text in visual mode and hit * or ? to search it in that file.

xmledit

Edit XML and HTML files with tag-autoclosing

YankRing

Manages the copy and paste registers for you. Restore a yanked text with ctrl-p or ctrl-n (previous and next) Does much more ... see official docs.

Jump to Line
Something went wrong with that request. Please try again.