Skip to content

Instantly share code, notes, and snippets.

@corymartin
Created January 8, 2014 03:42
Show Gist options
  • Save corymartin/8311423 to your computer and use it in GitHub Desktop.
Save corymartin/8311423 to your computer and use it in GitHub Desktop.
"------------------------"
"PATHOGEN PLUGIN SETTINGS
"------------------------"
call pathogen#runtime_append_all_bundles()
"execute pathogen#infect()
"------------------------"
" My Settings
"------------------------"
" Hide Toolbar
set guioptions-=T
"colorscheme bespin
set background=dark
"colorscheme solarized
"set background=light
colorscheme molokai
"let g:molokai_original=1
" Encoding
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=utf-8
"if has("multi_byte")
"set encoding=utf-8
"setglobal fileencoding=utf-8
"set bomb
"set termencoding=utf-8
"set fileencoding=utf-8
"set fileencodings=utf-8
"endif
" Fileformat
set ff=unix
"set fileformats=unix,dos
set nowrap
set nu
set co=170
set lines=55
set cul
set selectmode=mouse
" Command Height
"set cmdheight=2
" Tabs
set tabstop=2
set shiftwidth=2
set sts=2
" converts tabs to spaces
set expandtab
" sets all tabs to current settings
retab
" Indent
set smartindent
set autoindent
" Syntax Highlighting
" Make syntax of one filetype use that of another
autocmd BufNewFile,BufRead *.json set ft=javascript
autocmd BufNewFile,BufRead *.ejs set ft=php
autocmd BufNewFile,BufRead *.hjs set filetype=mustache
autocmd BufNewFile,BufRead *.hogan set filetype=mustache
autocmd BufNewFile,BufRead *.handlebars set filetype=mustache
" Show cursor position in bottom right
set ruler
" Map code completion to ,+tab
imap <leader><tab> <C-x><C-o>
" More useful command line completion
set wildmenu
" http://vim.wikia.com/wiki/Make_Vim_completion_popup_menu_work_just_like_in_an_IDE
"set completeopt=longest,menu,preview
set completeopt=longest,menuone
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
inoremap <expr> <C-n> pumvisible() ? '<C-n>' :
\ '<C-n><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
inoremap <expr> <M-,> pumvisible() ? '<C-n>' :
\ '<C-x><C-o><C-n><C-p><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
" Zen Coding
let g:user_zen_expandabbr_key = '<D-e>'
" Powerline
let g:Powerline_symbols = 'fancy'
" Show command in bottom right portion of the screen
set showcmd
" Always show the status line
set laststatus=2
" Set incremental searching"
set incsearch
"Highlight searching
set hlsearch
" case insensitive search
set ignorecase
set smartcase
" Show matching brackets
set showmatch
" Clear trailing white-space
autocmd BufWritePre * :%s/\s\+$//e
"---------------------------"
" Language Specific Settings
"---------------------------"
autocmd FileType go set tabstop=8|set shiftwidth=8|set sts=8|set noexpandtab
autocmd FileType cs set tabstop=4|set shiftwidth=4|set sts=4|set noexpandtab
"------------------------"
"SNIPMATE PLUGIN SETTINGS
"------------------------"
:filetype plugin on
"------------------------"
"NERDTREE PLUGIN SETTINGS
"------------------------"
" Shortcut for NERDTreeToggle
"nmap <leader>nt :NERDTreeToggle <CR>
" Show hidden files in NerdTree
let NERDTreeShowHidden=1
" Ignore swap files
let NERDTreeIgnore = ['\.swp$']
" autopen NERDTree and focus cursor in new document
"autocmd VimEnter * NERDTree
"autocmd VimEnter * wincmd p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment