Skip to content

Instantly share code, notes, and snippets.

@mhahl
Last active August 29, 2015 14:26
Show Gist options
  • Save mhahl/062d9ad32ab64207c249 to your computer and use it in GitHub Desktop.
Save mhahl/062d9ad32ab64207c249 to your computer and use it in GitHub Desktop.
$MYVIMRC
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/vimfiles/bundle/vundle/
set runtimepath+=~/vimfiles/bundle/vundle/
call vundle#rc()
"" Vundle plugins
""
Plugin 'gmarik/vundle'
Plugin 'scrooloose/nerdtree'
Plugin 'nanotech/jellybeans.vim'
Plugin 'tpope/vim-sensible'
Plugin 'Soares/butane.vim'
Plugin 'easymotion/vim-easymotion'
Plugin 'scrooloose/syntastic'
Plugin 'myusuf3/numbers.vim'
Plugin 'kien/ctrlp.vim'
Plugin 'skammer/vim-css-color'
Plugin 'bling/vim-airline'
Plugin 'vim-scripts/a.vim'
Plugin 'tpope/vim-surround'
Plugin 'Raimondi/delimitMate'
Plugin 'tpope/vim-sleuth'
Plugin 'pangloss/vim-javascript'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'tpope/vim-repeat'
Plugin 'Shougo/neocomplcache'
Plugin 'bronson/vim-trailing-whitespace'
Plugin 'tpope/vim-endwise'
Plugin 'osyo-manga/vim-over'
Plugin 'tpope/vim-rails'
Plugin 'flazz/vim-colorschemes'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'tpope/vim-fugitive'
Plugin 'mhinz/vim-startify'
Plugin 'wesQ3/vim-windowswap'
syntax on
set nobackup
set noswapfile
filetype plugin on
filetype indent on
set encoding=utf-8
set number
"" Set tabs to expand and
"" set there space
""
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
"" Hilight column and line
"" Where the curser is.
""
set cursorcolumn
set cursorline
"" Ignore casew when searching
""
set ignorecase
set smartcase
set showmatch
set hlsearch
set gdefault
set virtualedit=block
set hidden
set lazyredraw
set noshowmode
set noswapfile
set ruler
set history=10000
set undofile
set undoreload=10000
set title
set autoindent
set autoread
set mouse=a
set foldmethod=marker
set foldlevel=20
let mapleader=","
nnoremap <Leader>w :wa!<CR>
nnoremap <Leader>a :A!<CR>
nnoremap <Leader>q :bd!<CR>
set list
set listchars=tab:>.,trail:.,extends:#,nbsp:.
" Hilight column over 80
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/
" F10 toggles cursor and line highlight
nnoremap <F10> :set cursorline! cursorcolumn!<CR>
nnoremap <F2> <ESC>:NERDTreeToggle<RETURN>
" F4 Brings up ctrlP
noremap <F4> :CtrlP .<CR>
" Pressing Tab or Shift-Tab will let you indent/unident selected lines
vnoremap <S-Tab> <gv
vnoremap <Tab> >gv
" No annoying sound on errors
"
set noerrorbells
set novisualbell
set t_vb=
set tm=500
" move buffer with ALT arrow
nnoremap <A-left> :bprevious<cr>
nnoremap <A-right> :bnext<cr>
" Move buffer with CTRL TAB
nnoremap <C-Tab> <ESC>:bnext<cr>
nnoremap <S-Tab> <ESC>:bprevious<cr>
" Move windows using CTRL+Arrows
nmap <silent> <C-Up> :wincmd k<CR>
nmap <silent> <C-Down> :wincmd j<CR>
nmap <silent> <C-Left> :wincmd h<CR>
nmap <silent> <C-Right> :wincmd l<CR>
" Neocomplete
let g:acp_enableAtStartup = 0
let g:neocomplete#enable_at_startup = 1
let g:neocomplete#enable_smart_case = 1
let g:acp_enableAtStartup = 0
let g:neocomplcache_enable_at_startup = 1
let g:neocomplcache_enable_smart_case = 1
let g:neocomplcache_min_syntax_length = 3
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete
autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" Let syntastic use clang
" for c++ checking
"
let g:syntastic_cpp_compiler = 'clang++'
let g:syntastic_cpp_compiler_options = ' -std=c++11 -stdlib=libc++'
" Use jshint on windows to
" the javascript, and then tidy for html.
"
let g:syntastic_javascript_checkers = ['jshint']
let g:syntastic_html_checkers = ['tidy']
let g:syntastic_html_tidy_exec = 'C:\Users\MHO934\AppData\Roaming\npm\node_modules\htmltidy\bin\win32\tidy.exe'
if has('gui_running')
map <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
set guifont=DejaVu_Sans_Mono_for_Powerline:h10
"Linux
" set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 10
set guicursor+=a:blinkon0 " Cursor doesn't blink - it's annoying
set guioptions-=m " No Menubar
set guioptions-=T " No Toolbar
set guioptions-=l " No Scrollbar left
set guioptions-=L " No Scrollbar left when split
set guioptions-=r " No Scrollbar right
set guioptions-=r " No Scrollbar right when split
set laststatus=2 " always show statusline
let g:airline_theme = 'jellybeans'
colorscheme jellybeans
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment