-
Clone this repo wherever you'd like to keep your vimrc files. I keep mine in a folder called
~/.dotfiles
along with a bunch of other stuff.git clone git://github.com/bryankennedy/vimrc.git ~/.dotfiles/vimrc
-
Change directories to the
vimrc
folder.cd ~/.dotfiles/vimrc
-
Run the install script, telling it where you have install the vimrc folder
./install.sh ~/.dotfiles/vimrc
These are the plugins I am currently using, with some justification and some quick tips on how I most commonly use them. This list isn't entirely complete.
I'm using Vundle to install and manage all of these plugins
- css-color - Colorize hex colors and color words in CSS
- less - LESS highlighter
- emmet - HTML5 authoring helper
- javascript - Best JS syntax plugin
- json - JSON highlighting with keyword/value color differences
- markdown - Force .md files to open as Markdown
- php - Enhanced PHP syntax
- python - Best Python helpers
- processing - Enhanced Processing syntax
- puppet - I use this to managing Boxen manifests, written in Puppet
- spacebars - Syntax for MeteorJS' handlebars template variant
- mustache - Mustache templates highliting
- tcl - Tcl syntax for expect scripting
command-p - Quick and intuitive tool to open files quickly.
<leader>t
- Search files from cwd<leader>b
- Search files from current buffers
Once you have a file highlighted, use CTRL + v to open it in a vertical split, and use CTRL + s to open it in a horizontal split.
#####delimitMate - Quote and bracket auto-completion. Best plugin. Doesn't break undo/redo.
#####diminactive - Dim splits when they aren't being used. Makes it easier for find active cursor.
easymotion - Magically jump around the page
<leader\>\<leader\>w
- Jump to a specific word<leader\>\<leader\>t
- Jump to a specific character
exchange - Quickly swap chunks of text.
- "To exchange two words, place your cursor on the first word and type
cxiw
. Then move to the second word and typecxiw
again."
expand-region - Expand selection regions smartly.
- vvv - replaces a bunch of vit, viw, vi', vi" operations.
fugitive - Git wrapper. I don't use this enough.
:Gblame
- Who did what?:Gcommit
- Commit your changes:Gdiff
- See what's different from the git index
HowMuch - Vim calculator.
- Select figures to calculate,
<leader>?=
or<leader>?r
.=
, will add the result after the selection.r
will replace the selection with the result.
indent-guides - Visually highlight indentation levels
Disabled by default. Enable with :IndentGuidesEnable
nerdcommenter - Commenting helper.
<leader>c<space>
- Comment out the current line or text selected in visual mode.<leader>cm
- Comment out the selection using only one surrounding comment tag
nerdtree - File tree explorer in a sidebar.
<leader>n
- Load NERDTree
powerline - Powerful status line at the footer of the Vim window
signature - Show marks in the Vim gutter
:ma {a-z}
- Set a mark'{a-z}
- Jump to a mark
snippets - Some useful snippets of code for ultisnips. This is the library of code, not the actual snippets manager.
- There are many snippets for all kinds of languages
surround - Tim Pope's essential plugin for surrounding things with things
syntastic - Syntax checking.
tagbar - Display tags in a sidebar. Improvement on taglist.
<leader>g
- Open the tag sidebar
translator - Translate selected text using Google Translate. Useful for lorem ipsum with dual languages.
ultisnips - Best snippets manager.
- Ctrl + j to expand snippet after you select it from the YouCompleteMe dropdown
yankring - Browse the paste buffer
<leader>y
- Open a sidebar, showing the paste buffer
YouCompleteMe - Code completion.
gitgutter - Highlight Git changes in the Vim gutter
I'd love to be able to use this again, but it causes some very slow load times, so I've removed it.
A curated list of leaders and other custom shortcuts provided as part of my custom vimrc and by the enabled plugins.
<leader>c
- Toggle ignorecase<leader>cd
- Change to the directory of the current file<leader>e
- Edit this vimrc<leader>s
- Toggle spell checking<leader>w
- Write<leader>z
- Start a find/replace with the selected 'text'<leader><leader>]
- Jump to the next QuickFix error<leader><leader>\[
- Jump to the previous QuickFix error<leader><cr>
- Clear search highlight
- csw" - Put " around a word
- cs"' - Change those " to '
- ds' - Remove those '
- VS# - Wrap a visual selection in #
- za - Toggle a fold open/closed
- zi - Turn folding on and off
- ZM - Close all folds
- zMzv - Close all folds, open the current line fold
- zR - Open all folds
- ]s - Next misspelled word
cn > CTRL + j = console('') con > CTRL + j = console('var', var)