Last active
August 29, 2015 13:57
-
-
Save letmein/9660959 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Switch syntax highlighting on, when the terminal has colors | |
" Also switch on highlighting the last used search pattern. | |
if &t_Co > 2 || has("gui_running") | |
syntax on | |
set hlsearch | |
endif | |
if has("gui_running") | |
" GUI is running or is about to start. | |
" Maximize gvim window. | |
set lines=61 columns=999 | |
"else | |
" This is console Vim. | |
" if exists("+lines") | |
" set lines=50 | |
" endif | |
" if exists("+columns") | |
" set columns=100 | |
" endif | |
endif | |
if has("autocmd") | |
filetype indent on | |
endif | |
"set smartindent | |
"set autoindent | |
set tabstop=2 | |
set expandtab | |
set list | |
set listchars=tab:>. | |
set sw=2 | |
" set cinkeys=0{,0},:,0#,!,!^F | |
set guioptions-=m "remove menu bar | |
set guioptions-=T "remove toolbar | |
set guioptions-=r "remove right-hand scroll bar | |
set guioptions-=L "remove right-hand scroll bar | |
set nu | |
set nowrap | |
" set noai | |
set hls! | |
" ------------------------------------------------------------------------- | |
" <Vundle> | |
set nocompatible " be iMproved | |
filetype off " required! | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" let Vundle manage Vundle | |
" required! | |
Bundle 'gmarik/vundle' | |
Bundle 'tpope/vim-fugitive' | |
Bundle 'Lokaltog/vim-easymotion' | |
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'} | |
Bundle 'tpope/vim-rails.git' | |
Bundle 'scrooloose/nerdtree.git' | |
Bundle 'L9' | |
Bundle 'FuzzyFinder' | |
Bundle 'git://git.wincent.com/command-t.git' | |
Bundle 'junegunn/vim-easy-align' | |
Bundle 'nathanaelkane/vim-indent-guides' | |
" Match it | |
Bundle 'tsaleh/vim-matchit' | |
Bundle 'git://github.com/kana/vim-textobj-user.git' | |
Bundle 'git://github.com/nelstrom/vim-textobj-rubyblock.git' | |
Bundle 'kchmck/vim-coffee-script' | |
Bundle 'heartsentwined/vim-ember-script' | |
Bundle 'git://github.com/jnwhiteh/vim-golang' | |
Bundle 'heartsentwined/vim-emblem' | |
filetype plugin indent on " required! | |
" | |
" Brief help | |
" :BundleList - list configured bundles | |
" :BundleInstall(!) - install(update) bundles | |
" :BundleSearch(!) foo - search(or refresh cache first) for foo | |
" :BundleClean(!) - confirm(or auto-approve) removal of unused bundles | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" NOTE: comments after Bundle command are not allowed.. | |
" </Vundle> | |
" ------------------------------------------------------------------------- | |
" <VimCoffeeScript> | |
syntax on | |
filetype plugin indent on | |
" </VimCoffeeScript> | |
" ------------------------------------------------------------------------- | |
" <CommandT> | |
let g:CommandTMaxFiles=10000 | |
let g:CommandTHighlightColor='CursorLine' | |
" </CommandT> | |
" ------------------------------------------------------------------------- | |
" <NerdTree> | |
nnoremap <silent> <C-Tab> :NERDTreeToggle<CR> | |
" </NerdTree> | |
" ------------------------------------------------------------------------- | |
" <Matchit> | |
runtime macros/matchit.vim | |
" </Matchit> | |
" ------------------------------------------------------------------------- | |
" Abbreviations | |
nmap lc <S-V>yp | |
" nnoremap <F12> :if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR> | |
" | |
" , #perl # comments | |
map ,# :s/^/#/<CR> | |
nmap <F3> \be | |
" Start interactive EasyAlign in visual mode (e.g. vip<Enter>) | |
vmap <Enter> <Plug>(EasyAlign) | |
" " Start interactive EasyAlign for a motion/text object (e.g. gaip) | |
nmap ga <Plug>(EasyAlign) | |
let Tlist_Show_One_File = 1 | |
let Tlist_Use_Right_Window0= 1 | |
" let Tlist_Auto_Open = 1 | |
" let Tlist_Exit_OnlyWindow = 1 | |
let Tlist_Sort_Type = "name" | |
set sessionoptions=blank,buffers,curdir,folds,help,resize,tabpages,winsize | |
map <F5> :mksession! ~/.vim/.session <cr> | |
map <F9> :source ~/.vim/.session <cr> | |
set encoding=utf-8 | |
set fileencoding=utf-8 | |
" au BufWritePost *.coffee silent CoffeeMake! -b | cwindow | |
au BufNewFile,BufReadPost *.coffee setlocal sw=2 tabstop=2 expandtab | |
au BufNewFile,BufReadPost *.slim setlocal sw=2 tabstop=2 expandtab | |
" add jbuilder syntax highlighting | |
au BufNewFile,BufRead *.json.jbuilder set ft=ruby | |
set t_Co=256 | |
colorscheme my | |
highlight ExtraWhitespace guibg=#660000 | |
match ExtraWhitespace /\s\+$/ | |
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ | |
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/ | |
autocmd InsertLeave * match ExtraWhitespace /\s\+$/ | |
autocmd BufWinLeave * call clearmatches() | |
set cursorline | |
" set cursorcolumn | |
set backupdir=~/.vim/backup// | |
set directory=~/.vim/swap// | |
set undodir=~/.vim/undo// | |
set noswapfile | |
" au BufWinEnter *.rb,*.coffee let w:m1=matchadd('Search', '\%<81v.\%>77v', -1) | |
au BufWinEnter *.rb,*.coffee,*.slim let w:m2=matchadd('ErrorMsg', '\%>100v.\+', -1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment