Note

Dotfile settings

Vim vundle

Vundle is short for Vim bundle and is a Vim plugin manager.

Installation

git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim

Settings

# .vimrc
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'flazz/vim-colorschemes'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

" Colorscheme
set t_Co=256
color Monokai-chris

Install plugin

Launch vim and run :PluginInstall or

$: vim +PluginInstall +qall

Tmux 256 color support

# .tmux.conf
set -g default-terminal "screen-256color"
# .zshrc
alias tmux='TERM=xterm-256color tmux'

Vim copy paste to System clipboard

Install xclip first

Usage:

# .vimrc
function! ClipboardYank()
    call system('xclip -i -selection clipboard', @@)
endfunction
function! ClipboardPaste()
    let @@ = system('xclip -o -selection clipboard')
endfunction

vnoremap  y y:call ClipboardYank()
vnoremap  d d:call ClipboardYank()
onoremap  y y:call ClipboardYank()
onoremap  d d:call ClipboardYank()
nnoremap  p :call ClipboardPaste()p