Skip to content

Instantly share code, notes, and snippets.

@elzekool
Last active November 27, 2016 13:14
Show Gist options
  • Save elzekool/c090d32abac159bbd3a4 to your computer and use it in GitHub Desktop.
Save elzekool/c090d32abac159bbd3a4 to your computer and use it in GitHub Desktop.
My VIM setup
#!/bin/bash
sudo rm -fR ~/.vim
sudo apt-get update
sudo apt-get -y install vim-nox vim-fugitive vim-pathogen git build-essential
git clone https://github.com/vim-airline/vim-airline ~/.vim/bundle/vim-airline
git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree
git clone https://github.com/Shougo/vimproc.vim.git ~/.vim/bundle/vimproc.vim
cd ~/.vim/bundle/vimproc.vim
make
git clone https://github.com/Shougo/vimshell.vim.git ~/.vim/bundle/vimshell.vim
git clone https://github.com/flazz/vim-colorschemes.git ~/.vim/bundle/colorschemes
git clone git://github.com/ntpeters/vim-better-whitespace.git ~/.vim/bundle/vim-better-whitespace
cat <<EOT > ~/.vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
" Always show line numbers
set number
" Set formatting options
set expandtab
set shiftwidth=4
set softtabstop=2
set autoindent
set smartindent
set nowrap
" Always show vim-airline
set laststatus=2
" Make split location more logical
set splitbelow
set splitright
" Navigate split windows
map <C-Down> <C-W>j
map <C-Up> <C-W>k
map <C-Left> <C-W>h
map <C-Right> <C-W>l
" Open NERDTree with <ctrl>-n and to the right
let g:NERDTreeWinPos = "right"
map <C-n> :NERDTreeToggle<CR>
" Open VIMShell with \sh
map <leader>sh :sp<CR>:VimShell<CR>
" Set colorsheme
colorscheme Monokai
EOT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment