/dotvim-old

Personal Vim Settings.

Primary LanguageVim scriptApache License 2.0Apache-2.0

Vim for Mac

This is my personal vim bundle mainly for Mac, but it should also work on Linux/Unix with a little tweaks.

Prerequisites

  • Updated Vim Version
  • Build Tools Supports
brew install cmake ctags
brew install macvim --with-cscope --with-lua
brew install vim --with-lua --override-system-vim
brew linkapps

Issues with MacVim

Install

Run the following line from your terminal

curl https://raw.githubusercontent.com/jimzhan/dotvim/master/setup -L -o - | sh

Preview

Vim with NERDTree + Tagbar Opened

Plugins

Plugins Manager

File Manager

map <C-o>   <plug>NERDTreeTabsToggle<CR>

GIT

nnoremap <silent> <leader>gs :Gstatus<CR>
nnoremap <silent> <leader>gd :Gdiff<CR>
nnoremap <silent> <leader>gc :Gcommit<CR>
nnoremap <silent> <leader>gb :Gblame<CR>
nnoremap <silent> <leader>gl :Glog<CR>
nnoremap <silent> <leader>gp :Git push<CR>
nnoremap <silent> <leader>gw :Gwrite<CR>
nnoremap <silent> <leader>gr :Gremove<CR>

Autocomplete

  • Shougo/neocomplete: lightweight (especially comparing to YCM, compiled size: 175MB on my laptop...) yet powerful. (Required Vim with lua compiled)
  • SirVer/ultisnips: as its name, ultimate solution for snippets in Vim.

File Editing

File Types

Programming

  • mattn/emmet-vim: previously known as Zen Coding, improve HTML/CSS workflow by combining shortcuts & snippets.
  • majutsushi/tagbar: provides a sidebar that displays the ctags-generated tags of the current file, ordered by their scope.
  • scrooloose/syntastic: syntax checking that runs files through external syntax checkers and displays any resulting errors to the user.

Status Bar

Color Scheme

  • tomasr/molokai: by far, this is simply the best color scheme I've ever tested that works beautifully on both iTerms & Gvim right out of the box.

Key Mappings

  • jj as <ESC>
  • , as <Leader>