-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
88 lines (64 loc) · 1.73 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
" Vundle configuration
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Bundle 'vim-ruby/vim-ruby'
Plugin 'derekwyatt/vim-scala'
Plugin 'docker/docker' , {'rtp': '/contrib/syntax/vim/'}
" Plugin 'ensime/ensime-vim'
Plugin 'fatih/vim-go'
Plugin 'gmarik/Vundle.vim'
Plugin 'morhetz/gruvbox'
Plugin 'rust-lang/rust.vim'
Plugin 'vim-syntastic/syntastic'
call vundle#end()
filetype plugin indent on
" General
set backspace=2 " Make backspace work like most other apps
set showcmd " Show when leader is pressed
set expandtab " Insert spaces instead of tab
set hidden " Switch between buffers without saving
set number " Number on lines
set shiftwidth=2 " Indent by 2 spaces
set tabstop=2 " Tab by 2 spaces
syntax enable
set background=dark
set t_Co=256
let g:gruvbox_contrast_dark = 'hard'
colorscheme gruvbox
" Buffers
nmap <c-n> :bnext<cr>
nmap <c-p> :bprev<cr>
" Search
set incsearch
set ignorecase
set smartcase
set hlsearch
nmap <leader>q :nohlsearch<cr>
" Mappings
nmap <leader>l :setlocal number!<cr>
nmap <leader>o :set paste!<cr>
" Tab mappings
map <leader>tt :tabnew<cr>
map <leader>te :tabedit
map <leader>tc :tabclose<cr>
map <leader>to :tabonly<cr>
map <leader>tn :tabnext<cr>
map <leader>tp :tabprevious<cr>
map <leader>tf :tabfirst<cr>
map <leader>tl :tablast<cr>
map <leader>tm :tabmove
" Scalafmt
noremap <C-d> :sh<cr>
noremap <leader>f :Autoformat<cr>
let g:formatdef_scalafmt = "'scalafmt'"
let g:formatters_scala = ['scalafmt']
" Syntastic
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