Skip to content

Latest commit

 

History

History
229 lines (119 loc) · 4.59 KB

vim setup.mdown

File metadata and controls

229 lines (119 loc) · 4.59 KB

MacVim Setup

Install Vim

Homebrew

install homebrew from http://brew.sh/

brew doctor

and do what it recommends (like installing the xcode command line tools)

now you can install anything you need:

brew install macvim
brew install ctags

and if you have not yet:

brew install git
brew install hg

Set paths

edit /etc/paths to always first search for brew installations:

sudo nano /etc/paths

to look like this: /usr/local/bin /usr/bin /bin /usr/sbin /sbin

Link with vimRC file

This repository includes a vimrc file. You can create a symbolic link to this file so your own local .vimrc file points to the one in this repository and is always updated. (It is important to use full paths for the ln command. It will not work with relative paths) mv ~/.vimrc old_vimrc ln -s /vimrc ~/.vimrc

Install Add-Ons

Pathogen

https://github.com/tpope/vim-pathogen

With Pathogen any plugins you wish to install can be extracted to a subdirectory under ~/.vim/bundle, and they will be added to the 'runtimepath'

Install

mkdir -p ~/.vim/autoload ~/.vim/bundle; \
curl -Sso ~/.vim/autoload/pathogen.vim \
https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim

Vim-Sensible

https://github.com/tpope/vim-sensible

A universal set of defaults that (hopefully) everyone can agree on.

Install

cd ~/.vim/bundle
git clone https://github.com/tpope/vim-sensible.git

Solarized

http://ethanschoonover.com/solarized/vim-colors-solarized

Solarized colorscheme for vim

Install

cd ~/.vim/bundle
git clone git://github.com/altercation/vim-colors-solarized.git

VimRC

syntax enable
set background=dark
colorscheme solarized

EasyTags

https://github.com/xolox/vim-easytags

Automated tag generation and syntax highlighting

Requires vim-misc: https://github.com/xolox/vim-misc

Install

cd ~/.vim/bundle
git clone https://github.com/xolox/vim-misc.git
git clone https://github.com/xolox/vim-easytags.git

File Browser

https://github.com/scrooloose/nerdtree

The NERD tree allows you to explore your filesystem and to open files and directories. It presents the filesystem to you in the form of a tree which you manipulate with the keyboard and/or mouse. Also allows bookmarking folders.

https://github.com/jistr/vim-nerdtree-tabs

This plugin aims at making NERDTree feel like a true panel, independent of tabs.

Install

cd ~/.vim/bundle
git clone https://github.com/scrooloose/nerdtree.git
git clone https://github.com/jistr/vim-nerdtree-tabs.git

Buffers as Tabs

https://github.com/techlivezheng/vim-plugin-minibufexpl

Open buffers as tabs along the top or bottom of your screen. (This is prefered to using the built in tabs and uses less space)

Install

cd ~/.vim/bundle
git clone https://github.com/techlivezheng/vim-plugin-minibufexpl.git

File Opening Ctrl-P

https://github.com/kien/ctrlp.vim

Full path fuzzy file, buffer, mru, tag, ... finder for Vim.

Install

cd ~/.vim/bundle
git clone https://github.com/kien/ctrlp.vim.git

VimRC

let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'

syntastic

https://github.com/scrooloose/syntastic

Syntax checking with advanced error displaying

Install

cd ~/.vim/bundle
git clone https://github.com/scrooloose/syntastic.git

surround

https://github.com/tpope/vim-surround

Everything for sorroundings: brackets, parantheses, tags

Install

cd ~/.vim/bundle
git clone git://github.com/tpope/vim-surround.git

Zen Coding / Emmet

https://github.com/mattn/emmet-vim/ Zen Coding like in Tincta Pro.

Install

cd ~/.vim/bundle git clone https://github.com/mattn/emmet-vim.git

VimRC

" emmet / zen coding remapping " factory default is , but that does not work let g:user_emmet_leader_key=''

Usage

Usage is a bit strange: Type zen shortcut like 'div' or 'html:5' then ctrl+z and IMMEDIATELY , (comma key).

DelimtMate / Auto Brackets

https://github.com/Raimondi/delimitMate.git Automatic bracket completion. No setup required but everything can be config'ed

Install

cd ~/.vim/bundle git clone https://github.com/Raimondi/delimitMate.git

Other Stuff

Caps-Lock as Escape key

Use Caps-Lock key as escape with PCKeyboardHack.http://tekezo.github.io/pqrs.org/

Description here: http://stackoverflow.com/questions/127591/using-caps-lock-as-esc-in-mac-os-x

Better icon

Nice icon replacement: http://www.imeos.com/blog/2013/01/04/macvim-replacement-icon/