Skip to content

Instantly share code, notes, and snippets.

@pce
Last active October 27, 2015 08:12
Show Gist options
  • Select an option

  • Save pce/33c42793363f974ef22d to your computer and use it in GitHub Desktop.

Select an option

Save pce/33c42793363f974ef22d to your computer and use it in GitHub Desktop.
Vim

Vim

action command link
fix identation :gg=G http://vim.wikia.com/wiki/Fix_indentation
remove trailing space :%s/\s\+$// http://vim.wikia.com/wiki/Remove_unwanted_spaces
string replace :%s/foo/bar/gc http://vim.wikia.com/wiki/Search_and_replace

cat ~/.vimrc

set nocompatible              " be iMproved, required
filetype off                  " required

" optional Vundle
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'

" ----- Making Vim look good ------------------------------------------
Plugin 'altercation/vim-colors-solarized'
Plugin 'tomasr/molokai'
Plugin 'bling/vim-airline'

" ----- Vim as a programmer's text editor -----------------------------
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'scrooloose/syntastic'
Plugin 'xolox/vim-misc'
Plugin 'xolox/vim-easytags'
Plugin 'majutsushi/tagbar'
Plugin 'kien/ctrlp.vim'
Plugin 'vim-scripts/a.vim'

" ----- Working with Git ----------------------------------------------
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'

" ----- Syntax plugins ------------------------------------------------
" Plugin 'jez/vim-c0'
" Plugin 'jez/vim-ispc'
" Plugin 'kchmck/vim-coffee-script'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required


"syntax on
filetype plugin indent on

set tabstop=4
set shiftwidth=4
set expandtab
" exception: Makefile use tabs
autocmd FileType make set noexpandtab shiftwidth=8 softtabstop=0

set paste
set ruler



" ----- Plugin-Specific Settings --------------------------------------
" ----- altercation/vim-colors-solarized settings -----
" Toggle this to "light" for light colorscheme
set background=dark
" Uncomment the next line if your terminal is not configured for solarized
" let g:solarized_termcolors=256
" Set the colorscheme
colorscheme solarized
" let g:molokai_original = 1


" -- NERDTree
" :NERDtree
" :bookmark $NAME
" ctrl-ww  = focus next window

" ----- bling/vim-airline settings -----
" Always show statusbar
set laststatus=2
" Fancy arrow symbols, requires a patched font
" To install a patched font, run over to
" https://github.com/abertsch/Menlo-for-Powerline
" download all the .ttf files, double-click on them and click "Install"
" Finally, uncomment the next line
"let g:airline_powerline_fonts = 1
" Show PASTE if in paste mode
let g:airline_detect_paste=1
" Show airline for tabs too
let g:airline#extensions#tabline#enabled = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment