forked from katcipis/my.vim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
182 lines (138 loc) · 3.64 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
" This must be first, because it changes other options as side effect
set nocompatible
set autoindent
set copyindent
set smarttab
set undolevels=1000
set nobackup
set noswapfile
set wildignore=*.swp,*.bak,*.pyc,*.class,*.o,*.so
set is scs magic
set history=10000
set nu
set sm
set showcmd
set showmode
set wildmenu
set wildmode=list:longest,full
"Don't have to save changes on current buffer when opening new buffer
set hidden
"
"Prints searched words
set hlsearch
" Automatically re-read the file if it has changed
set autoread
" Had this problem on one of the dev envs: http://vim.wikia.com/wiki/Backspace_and_delete_problems
set backspace=2 " make backspace work like most other apps
"default indent settings
set shiftwidth=4
set softtabstop=4
set expandtab
set autoindent
call plug#begin('~/.config/nvim/plugged')
"Clorscheme
Plug 'katcipis/gruvbox'
"Align stuff
Plug 'godlygeek/tabular'
"Comment code
Plug 'scrooloose/nerdcommenter'
"Syntax correction
"Plug 'w0rp/ale'
Plug 'scrooloose/syntastic'
"markdown magic
Plug 'tpope/vim-markdown'
"Extended object selection
Plug 'gcmt/wildfire.vim'
"tagbar without airline
Plug 'majutsushi/tagbar'
"Working with invisible stuff :-)
Plug 'ntpeters/vim-better-whitespace'
"Add cool tabs for buffers
Plug 'ap/vim-buftabline'
" Like airline, but smaller
Plug 'itchyny/lightline.vim'
" Autocomplete
" Plug 'Shougo/deoplete.nvim'
" Plug 'zchee/deoplete-go', { 'do': 'make'}
" JSON
Plug 'elzr/vim-json'
" GoLang
Plug 'katcipis/vim-go'
" Hell yeah latex !!!
Plug 'LaTeX-Box-Team/LaTeX-Box'
" Javascript plugins
Plug 'moll/vim-node'
Plug 'jelera/vim-javascript-syntax'
Plug 'vim-scripts/JavaScript-Indent'
" Scala stuff, for Gatling
Plug 'derekwyatt/vim-scala'
" Lisp
Plug 'kovisoft/slimv'
" Fuzzy file searching
Plug 'ctrlpvim/ctrlp.vim'
call plug#end()
"display tabs and trailing spaces
set list
set listchars=tab:▷⋅,trail:⋅,nbsp:⋅
" Highlight only the lines that go past 80 characters
highlight ColorColumn ctermbg=green guibg=green
call matchadd('ColorColumn', '\%80v', 80)
" Get that filetype stuff happening
filetype on
filetype plugin on
filetype indent on
"matchit % magic
syntax on
runtime macros/matchit.vim
"Lets not work with arrows anymore :-)
"Lets use the arrows to work with windows :D
nnoremap <RIGHT> <C-w>l
nnoremap <LEFT> <C-w>h
nnoremap <UP> <C-w>k
nnoremap <DOWN> <C-w>j
"Easy paste from system clipboard
nnoremap <Leader>p "+p
nnoremap <Leader>P "+P
"Easy copy to system clipboard
vnoremap <Leader>y "+y
nnoremap <Leader>y "+y
"Fast buffer navigation
nnoremap <Leader>j :bprevious<CR>
nnoremap <Leader>k :bnext<CR>
nnoremap <Leader>c :bd<CR>
"Opening stuff :D
"nnoremap <Leader>t :edit
let g:ctrlp_map = '<Leader>t'
"Fast quickfix navigation
map <C-LEFT> :cprev<CR>
map <C-RIGHT> :cnext<CR>
"Disable highlighting for current search only
nnoremap <silent> <C-l> :<C-u>nohlsearch<CR><C-l>
"Indent entire file
nnoremap <Leader>= mmgg=G'mzz
"Substitute word under cursor
nnoremap <Leader>s yiw:%s,<C-r>",
"vimgrep word under cursor
nnoremap <Leader>g yiw:vimgrep /<C-r>"/g **/*.suffix
"Tabularize fun :-)
nmap <Leader>a= :Tabularize /=<CR>
vmap <Leader>a= :Tabularize /=<CR>
nmap <Leader>a: :Tabularize /:<CR>
vmap <Leader>a: :Tabularize /:<CR>
"Lambda moderfocker
imap <Leader>l <C-k>l*
nmap <Leader>l :startinsert<CR><C-k>l*<Esc>
" Syntastic Settings
let g:syntastic_always_populate_loc_list=1
let g:syntastic_auto_loc_list = 2
let g:syntastic_enable_signs = 1
" Use deoplete.
" let g:deoplete#enable_at_startup = 1
"Better spell checking
hi clear SpellBad
hi SpellBad cterm=underline
set spell
"Colorscheme config
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
colorscheme gruvbox
set background=dark " Setting dark mode