Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
146 lines (120 sloc) 3.45 KB
set directory=~/.vim/backup
set backupdir=~/.vim/backup " keep swap files here
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" Keep Plugin commands between vundle#begin/end.
Plugin 'tpope/vim-fugitive'
Plugin 'bling/vim-airline'
Plugin 'mileszs/ack.vim'
Plugin 'kien/ctrlp.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'easymotion/vim-easymotion'
Plugin 'benmills/vimux'
Plugin 'dracula/vim'
Plugin 'rodjek/vim-puppet'
Plugin 'kchmck/vim-coffee-script'
Plugin 'airblade/vim-gitgutter'
Plugin 'neovimhaskell/haskell-vim'
Plugin 'derekwyatt/vim-scala'
Plugin 'kien/rainbow_parentheses.vim'
Plugin 'guns/vim-clojure-static'
Plugin 'tpope/vim-repeat.git'
Plugin 'tpope/vim-surround.git'
Plugin 'junegunn/vim-easy-align'
Plugin 'scrooloose/syntastic'
Plugin 'altercation/vim-colors-solarized'
" old Vundle stuff
Bundle 'wikitopian/hardmode'
Bundle 'w0ng/vim-hybrid'
Bundle 'gosukiwi/vim-atom-dark'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" Non-Plugin stuff after this line
" ================================
" Enable syntastic only on certain types
let g:syntastic_mode_map = {
\ "mode": "passive",
\ "active_filetypes": ["ruby", "python", "haskell", "scala"],
\ "passive_filetypes": [] }
let g:syntastic_ignore_files = ['\m\c\.h$', '\m\.sbt$']
" Gitgutter show more signs
let g:gitgutter_max_signs = 1500
" Scala has fsc and scalac checkers--running both is pretty redundant and
" " slow. An explicit `:SyntasticCheck scalac` can always run the other.
let g:syntastic_scala_checkers = ['fsc']
" Function for number toggle
function! NumberToggle()
if(&relativenumber == 1)
set norelativenumber
else
set relativenumber
endif
endfunc
nnoremap <C-N> :call NumberToggle()<cr>
" Function for whitespace toggle
function! WhitespaceToggle()
set listchars=eol:¬,tab:--,trail:~,extends:>,precedes:<
if(&list ==1)
set nolist
else
set list
endif
endfunc
nnoremap <C-T> :call WhitespaceToggle()<cr>
function! TrimWhitespace()
let l:save_cursor = getpos('.')
%s/\s\+$//e
call setpos('.', l:save_cursor)
endfun
command! TrimWhitespace call TrimWhitespace() " Trim whitespace with command
autocmd BufWritePre * :call TrimWhitespace() " Trim whitespace on every save
" Non-mapped function for tab toggles
function! TabToggle()
if &expandtab
set noexpandtab
else
set expandtab
endif
endfunc
" Remappings
" Start interactive EasyAlign in visual mode (e.g. vipga)
xmap ga <Plug>(EasyAlign)
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
nmap ga <Plug>(EasyAlign)
" Disable arrows
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
" Nerdtree
map <C-F> :NERDTreeToggle<CR>
" Other (default) options
set t_Co=256
set relativenumber
set number
let mapleader=','
set backspace=2
colorscheme dracula
syntax on
set laststatus=2
set noshowmode
let s:uname = system("uname -a")
if s:uname =~ "NixOS"
set shell=/run/current-system/sw/bin/bash
else
set shell=/bin/bash
endif
" Draw a line at 80 columns
set colorcolumn=80
highlight ColorColumn ctermbg=235 guibg=#2c2d27
" Check the function above, these
" are my default values
set tabstop=4
set shiftwidth=4
set expandtab