These are config files to set up a system the way I like it.
git clone git://github.com/goodtouch/dotfiles2 ~/.dotfiles
cd ~/.dotfiles
rake installI'm running on Mac OS X and Linux Debian.
This mainly comes from Ryan Bates Dot Files (http://github.com/ryanb) and from a lot of other sources. I'll try to list them all here:
- Use
:%s/to_repace/replace_by/gto perform a find & replace in the file
- Keyboard cheat sheet
- Vim movement shortcuts wallpaper
<leader>ewexpands to:e (directory of current file)/(open in the current buffer)<leader>esexpands to:sp (directory of current file)/(open in a horizontal split)<leader>evexpands to:vsp (directory of current file)/(open in a vertical split)<leader>etexpands to:tabe (directory of current file)/(open in a new tab):w!!expands to%!sudo tee > /dev/null %. Write to the current file using sudo (if you forgot to run it with sudo), it will prompt for sudo password when writing<leader>ptoggles paste mode<leader>fefformats the entire file<leader>cdchanges the path to the active buffer's file<leader>mdcreates the directory of the active buffer's file (For example, when editing a new file for which the path does not exist.)<leader>ulunderlines the current line with =<leader>twtoggles line wrap<leader>fcfinds the next conflict marker (tested with Git conflicted files)- Remap
<Down>and<Up>togjandgk(Wrapped text is not considered a single long line of text.) <leader>hsclear highlight search<leader>=adjusts viewports to the same size (=)<C-l>shifts current line or selected lines rightwards (indent)<C-h>shifts current line or selected lines leftwards (outdent)<C-k>bubbles current line or selected lines upwards<C-l>bubbles current line or selected lines downwards<C-Left>go to previous buffer<C-Right>go to next buffer<C-Down>close curren buffer
Grep-like text finder (Ack)
Ack.vim uses ack to search inside the current directory for a pattern. You can learn more about it with :help Ack.
Customizations:
<leader>fbrings up:Ack.
Fuzzy file, buffer, mru, and tag finder.
NERDCommenter allows you to wrangle your code comments, regardless of filetype. View :help NERDCommenter for all the details.
Customizations:
<leader>/toggles comments
NERDTree is a file explorer plugin that provides "project drawer" functionality to your vim projects. You can learn more about it with :help NERDTree.
Customizations:
<leader>ntoggles explorer
Fugitive adds pervasive git support to git directories in vim. For more information, use :help fugitive
Use :Gstatus to view git status and type - on any file to stage or unstage it.
Type p on a file to enter git add -p and stage specific hunks in the file.
Customizations:
<leader>gbmaps to:Gblame<CR><leader>gsmaps to:Gstatus<CR><leader>gdmaps to:Gdiff<CR><leader>glmaps to:Glog<CR><leader>gcmaps to:Gcommit<CR><leader>gpmaps to:Git push<CR>
Tabular makes it easy to align regions of text that match a pattern.
<leader>a=aligns equals signs<leader>a:aligns colon assignments
When working with split windows, ZoomWin lets you zoom into a window and out again using <C-w> o
Vim plugins are installed as submodules in the following folders:
- vim/bundles/colors : themes
- vim/bundles/syntaxes : languages
- vim/bundles/utils : rest
Note that those folders are autoloaded with pathogen.
To install a new plugin:
git submodule add <git repo url> vim/bundles/<plugin type>/<plugin name>