-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
125 lines (88 loc) · 2.25 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
"set nobackup"
"set nowb"
"Use backup dirs in home instead of just disabling backups/locks"
set backupdir=~/.vimtmp//,.
set directory=~/.vimtmp//,.
set undodir=~/.vimtmp//,.
set noswapfile
set noerrorbells
set mouse=r
if !has('nvim')
set ttymouse=xterm2
endif
set so=999
set clipboard=unnamedplus
set wildmenu
if has('mac')
set clipboard=unnamed
endif
" Appearance "
syntax enable
set number
set relativenumber
set linespace=12
set title
set titlestring=%F\ -\ vim
set guicursor=
set noshowmode
set laststatus=2
set background=dark
" File behaviour "
set expandtab
set smarttab
set linebreak
set breakindent
set nostartofline
set shiftwidth=4
set tabstop=4
" Search "
set smartcase
set hlsearch
set incsearch
" Panes "
set splitbelow
set splitright
" Filetype associations "
autocmd BufRead,BufNewFile *.fish set ft=fish
autocmd BufRead,BufNewFile *.md set filetype=markdown
autocmd FileType gitcommit setlocal spell
" Bindings "
set backspace=indent,eol,start
map q <Nop>
map ; :Files<CR>
map <F6> :setlocal spell!<CR>
map <F12> :Goyo<CR>
map <C-o> :NERDTreeToggle<CR>
map <Leader> <Plug>(easymotion-prefix)
" Plugins "
" Install and run vim-plug on first run
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
so ~/.vim/plugins.vim
let g:gruvbox_vert_split = 'bg1'
let g:gruvbox_sign_column = 'bg0'
colorscheme gruvbox
hi Normal ctermbg=NONE
hi CursorLineNr ctermfg=white
hi SignColumn ctermbg=NONE
hi clear SpellBad
hi SpellBad cterm=underline ctermfg=darkred
hi GitGutterAdd ctermfg=green ctermbg=NONE
hi GitGutterChange ctermfg=yellow ctermbg=NONE
hi GitGutterDelete ctermfg=darkred ctermbg=NONE
hi GitGutterChangeDelete ctermfg=yellow ctermbg=NONE
let g:lightline = {
\ 'active': {
\ 'left': [['mode', 'paste' ], ['readonly', 'filename', 'modified']],
\ 'right': [['lineinfo'], ['percent'], ['gitbranch', 'fileformat', 'fileencoding']]
\ },
\ 'component_function': {
\ 'gitbranch': 'gitbranch#name'
\ }
\ }
let g:deoplete#enable_at_startup = 1
let g:javascript_plugin_flow = 1
let NERDTreeShowHidden = 1