-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
44 lines (35 loc) · 1.04 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
" Plugin options
call plug#begin('~/.vim/plugged')
Plug 'morhetz/gruvbox'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
call plug#end()
" Visual options
set ruler
set background=dark
colorscheme gruvbox
" Formatting options
set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab
set formatoptions+=j
autocmd FileType markdown set tw=80
autocmd FileType yaml set tabstop=2 shiftwidth=2
autocmd FileType nix set tabstop=2 shiftwidth=2
" Interaction options
set mouse=a
" Variables
let g:mouse_enable = 1
" Functions
function! ToggleMouseOptions()
if g:mouse_enable
set mouse&
let g:mouse_enable = 0
echom "Mouse disabled"
else
set mouse=a
let g:mouse_enable = 1
echom "Mouse enabled"
endif
endfunction
" Commands
nnoremap <silent> <C-m> :call ToggleMouseOptions()<cr>
command! -bang -nargs=* Rg call fzf#vim#grep("rg --column --line-number --no-heading --color=always --smart-case ".shellescape(<q-args>), 1, {'options': '--delimiter : --nth 4..'}, <bang>0)