-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_vimrc
91 lines (70 loc) · 1.96 KB
/
dot_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
"
" Basic config
"
" fish specfic
if &shell =~# 'fish$'
set shell=bash
endif
if !exists("g:syntax_on")
syntax enable
endif
set expandtab
set shiftwidth=4
set hlsearch
set incsearch
set tabstop=4
set hidden
set relativenumber
set number
set termguicolors
set title
set list
set listchars=tab:▸\ ,trail:·
set scrolloff=8
set sidescrolloff=8
set nowrap
set formatoptions-=t
" turns off visual bell and bell sounds
set belloff=all
set noswapfile
set undodir=~/.vim/undodir
set undofile
"
" Plugin like things:
"
" run chezmoi apply on dotfile save
autocmd BufWritePost ~/.local/share/chezmoi/* ! chezmoi apply --source-path "%"
autocmd Filetype gitcommit setlocal spell textwidth=72
autocmd Filetype markdown setlocal spell textwidth=80
" Allow gf to open non-existent files
map gf :edit <cfile><cr>
set wildmenu
set wildmode=longest:full,full
"
" Actual plugins
"
" Automatically install vim-plug
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin(data_dir . '/plugins')
" source ~/.config/nvim/plugins/abolish.vim
source ~/.config/vim/plugins/airblade/vim-gitgutter.vim
source ~/.config/vim/plugins/chr4/nginx.vim
source ~/.config/vim/plugins/dag/vim-fish.vim
source ~/.config/vim/plugins/hashivim/vim-terraform.vim
source ~/.config/vim/plugins/neoclide/coc.vim
source ~/.config/vim/plugins/rust-lang/rust.vim
source ~/.config/vim/plugins/tpope/vim-fugitive.vim
" color schemes
source ~/.config/vim/color_schemes/vim-nightfly-guicolors.vim
source ~/.config/vim/color_schemes/vim-moonfly-statusline.vim
call plug#end()
colorscheme nightfly
"
" Some good vimrc links
"
" https://github.com/jessarcher/dotfiles/blob/master/nvim/init.vim
" https://github.com/tpope/tpope/blob/master/.vimrc