Skip to content

Instantly share code, notes, and snippets.

@toastal
Last active October 18, 2021 08:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toastal/dc98719f7f6b05824391 to your computer and use it in GitHub Desktop.
Save toastal/dc98719f7f6b05824391 to your computer and use it in GitHub Desktop.
if !1 | finish | endif
if has('vim_starting')
set nocompatible " Be iMproved
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
" Required:
call neobundle#begin(expand('~/.vim/bundle/'))
" Let NeoBundle manage NeoBundle
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'
" My Bundles here:
"ne 29:
"Refer to |:NeoBundle-examples|.
" Note: You don't set neobundle setting in .gvimrc!
NeoBundle 'Shougo/vimproc.vim', {
\ 'build' : {
\ 'windows' : 'tools\\update-dll-mingw',
\ 'cygwin' : 'make -f make_cygwin.mak',
\ 'mac' : 'make -f make_mac.mak',
\ 'linux' : 'make',
\ 'unix' : 'gmake',
\ },
\ }
NeoBundle 'itchyny/lightline.vim'
NeoBundle 'scrooloose/nerdtree'
NeoBundle 'scrooloose/nerdcommenter'
NeoBundle 'godlygeek/tabular'
NeoBundle 'tpope/vim-surround'
NeoBundle 'guns/vim-sexp'
NeoBundle 'tpope/vim-sexp-mappings-for-regular-people'
NeoBundle 'eapache/rainbow_parentheses.vim'
NeoBundle 'airblade/vim-gitgutter'
NeoBundle 'xolox/vim-misc'
NeoBundle 'terryma/vim-multiple-cursors'
NeoBundle 'marijnh/tern_for_vim'
" Linters
NeoBundle 'scrooloose/syntastic'
NeoBundle 'editorconfig/editorconfig-vim'
NeoBundle 'nvie/vim-flake8'
" Syntax Highlighting
NeoBundle 'othree/yajs.vim'
NeoBundle 'evanmiller/nginx-vim-syntax'
NeoBundle 'xolox/vim-lua-ftplugin'
NeoBundle 'leafo/moonscript-vim'
NeoBundle 'tpope/vim-haml'
let g:Haskell_no_mapping=1
NeoBundle 'lambdatoast/elm.vim'
NeoBundle 'kchmck/vim-coffee-script'
NeoBundle 'elixir-lang/vim-elixir'
NeoBundle 'JuliaLang/julia-vim'
" Color Themes
NeoBundle 'altercation/vim-colors-solarized'
"NeoBundle 'djjcast/mirodark'
NeoBundle 'andrwb/vim-lapis256'
"NeoBundle 'Lokaltog/vim-distinguished'
call neobundle#end()
syntax on
filetype plugin indent on
set laststatus=2
set backspace=indent,eol,start
set complete-=i
set showcmd
set wildmenu
set scrolloff=2
let mapleader=" "
let NERDTreeShowHidden=1
" colors
if $TERM == "xterm-256color" || $TERM == "screen-256color"
set t_Co=256
set background=dark
colorscheme lapis256
highlight Normal ctermfg=none ctermbg=none
" Rainbow Parans colors
let g:rbpt_colorpairs = [
\ [214, 214],
\ [045, 045],
\ [249, 249],
\ [210, 210],
\ [086, 086],
\ [146, 146],
\ [051, 051],
\ [075, 075],
\ [080, 080],
\ ]
endif
if v:version > 703 || v:version == 703 && has("patch541")
set formatoptions+=j " Delete comment character when joining commented lines
endif
" Tab widths per file type
autocmd Filetype moon setlocal sts=0 sw=2 ts=2
" Strip trailing whitespace on save
function! <SID>StripTrailingWhitespace()
" Remembers cursor
let _s=@/
let l = line('.')
let c = col('.')
%s/\s\+$//e
let @/=_s
call cursor(l, c)
endfunction
autocmd BufWritePre * :call<SID>StripTrailingWhitespace()
" NERDTreeToggle shortcut (ctrl+n)
nnoremap <C-n> :NERDTreeToggle<CR>
" iff gui_running things
if has("gui_running")
colorscheme mirodark
set lines=48 columns=125
" Open NERDTree if a dir was opened
if isdirectory(argv(0))
bd
autocmd vimenter * exe 'cd' argv(0)
autocmd VimEnter * NERDTree
endif
endif
" 80 char limit warning w/ 81 column highlighted
augroup columnlimitcolor
autocmd BufEnter,WinEnter * highlight OverLength
\ ctermbg=darkred ctermfg=white guibg=#5e468c guifg=#c0c0c0
autocmd BufEnter,WinEnter * match OverLength /\%81v/
augroup END
" Syntastic
let g:syntastic_javascript_checkers = ["eslint"]
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
nnoremap <silent> <leader>ss :SyntasticCheck<CR>
nnoremap <silent> <leader>sr :SyntasticReset<CR>
" Tabular
"AddTabularPattern first_comma /^[^,]*\zs,/r0c0l0
"AddTabularPattern first_colon /^[^:]*\zs,/r0c0l0
"AddTabularPattern first_equal /^[^=]*\zs,/r0c0l0
" Rainbow Parans
let g:bold_parentheses = 0
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment