My personal VIM-config
This repository is meant to be used with the wonderful Homesick-Gem:
homesick clone thenoseman/vim_config homesick symlink vim_config
Added non-plugin features
- CopyMatches Script from vimtips (
- 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_headscript that updates all submodules and creates a commit for those updates
renew_php_functionlistscript 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 is a a grep alternative written in perl. It sports context sensitive search and is generally
: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.
Ack! because I don't like the auto-opening.
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.
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.
Auto closes ruby structures with
end where appropriate
A (the) git wrapper for vim. Use
:Gc to commit,
:Gs for status. When you are in a conflicted file use
to copy the current hunk from left or right to the working copy.
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!
: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!
Adds syntax support for HTML5 elements like "data-*" or
Filetype sensitive commenting and uncommenting of textblocks.
,c (thats ,c[space]) to toggle commenting in visual-mode.
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.
Once there was a time where I was knee-deep into PHP :) See this "blog" about what it does.
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.
Adds all the rails.vim goodies to your plain old ruby files.
Allows to repeat (
.) plugin commands like they were edit-commands.
Snippet expansion using the
tab key. There are three places currently with snippets:
home/.vim/snipmate/honza-snippetsA collection of snippets for a lot of filetypes including ruby
home/.vim/snipmate/scroolooseHtml, HAML, CSS, Javacript and ruby snippets and a few more
home/.vim/customMy personal snippets Depends on tlib and vim-addon-mw-utils
If you want to add your own directory, go to
home/.vim/config/plugins/snipmate.vim and add your path to the
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.
Easily surround text with brackets, quotes or what have you.
Change an existing surrounding using
csOldNew (eg. "Hello" would become 'Hello' via
add surrounding with
ysTextobjectSurrounding (Hello would become "Hello" with
delete them with
dsSurrounding. With an active visual selection
SSurrounding will also work.
Actions are repeatable with
. via repeat.vim.
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
:Bopen (bundle open) and
:Bundle to vim. That's nice but more importantly it adds all
tags files of all gems in your
Generate those taks via the gem-ctags gem (gem install gem-ctags && gem ctags).
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
w. There is a nice tutorial.
Not really sure if I need his one but ...
git log viewer. Inside a git managed file do
:Gl. Quit the plugin with
Adds support for SASS, Scss and HAML files to VIM.
Markdown syntax highlighting.
Jump to the beginning/end of the current selected group (eg.
def ... end or
class .. end) with
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)
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.
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).
Depends on vim-textobj-user
Select some text in visual mode and hit
? to search it in that file.
Edit XML and HTML files with tag-autoclosing
Manages the copy and paste registers for you. Restore a yanked text with
ctrl-n (previous and next)
Does much more ... see official docs.