Skip to content

Instantly share code, notes, and snippets.

@geek
Created July 7, 2011 05:05
Show Gist options
  • Save geek/1068913 to your computer and use it in GitHub Desktop.
Save geek/1068913 to your computer and use it in GitHub Desktop.
.vimrc on Ubuntu for node
set nocompatible
filetype off " required!
set rtp+=~/.vim/vundle.git/
call vundle#rc()
" My Bundles here:
"
" original repos on github
Bundle 'tpope/vim-fugitive'
Bundle 'lokaltog/vim-easymotion'
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
Bundle 'serverhorror/javascript.vim'
Bundle 'scrooloose/nerdtree'
" vim-scripts repos
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'molokai'
Bundle 'vim-coffee-script'
Bundle 'jslint'
filetype plugin indent on " required!
set showcmd
set autochdir
set showmode
set noswapfile
set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar
"Auto open NERD_tree
au VimEnter * NERDTree
let NERDTreeWinSize = 20
let g:NERDTreeWinPos = "right"
" Ctrl-v support in visual or insert mode
vmap <C-c> "+yi
vmap <C-x> "+c
vmap <C-v> c<ESC>"+p
imap <C-v> <ESC>"+pa
set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
set nolist
" Colors
set t_Co=256 " 256 Colors
set background=dark
syntax on
colorscheme molokai
" Searching -------------------------------------------------------------------
set hlsearch " highlight search
set incsearch " incremental search, search as you type
set ignorecase " Ignore case when searching
set smartcase " Ignore case when searching lowercase
" Mappings --------------------------------------------------------------------
" Professor VIM says '87% of users prefer jj over esc', jj abrams disagrees
imap jj <Esc>
imap uu _
imap hh =>
imap aa @
" Make it way easier to switch windows (,w)
nmap ,w <C-w><C-w>_
" save
map ,s :w<CR>
" exit vim without saving any changes
map ,q :q<CR>
" Fast split movement
set wmh=0
map <c-j> <c-w>j
map <c-k> <c-w>k
nmap <c-h> <c-w>h
nmap <c-l> <c-w>l
" Misc ------------------------------------------------------------------------
set backspace=indent,eol,start
" set number " Show line numbers
set matchpairs+=<:>
set vb t_vb= " Turn off bell, this could be more annoying, but I'm not sure how
" indent settings --------------------------------------------------------------
set shiftwidth=4
set softtabstop=4
set expandtab
set autoindent
set smartindent
"Line Number
set number
set wildmode=list:longest "make cmdline tab completion similar to bash
set wildmenu "enable ctrl-n and ctrl-p to scroll thru matches
set wildignore=*.o,*.obj,*~ "stuff to ignore when tab completing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment