-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
124 lines (114 loc) · 3.18 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
" Author: Robert A. Enzmann
" License: Do anything you like.
"
" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
" ! This vim configuration is portable !
" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
"
" Thanks to: https://stackoverflow.com/a/3384476/13215205
"
" $ git clone [email protected]:renzmann/renzmann
" $ vim -u renzmann/.vim/vimrc
"
" Use `za` to fold/unfold any of the sections below
"
" Runtime path setup {{{
let &runtimepath = printf('%s/vimfiles,%s,%s/vimfiles/after', $VIM, $VIMRUNTIME, $VIM)
let $MYVIMHOME = expand('<sfile>:p:h')
let &runtimepath = printf('%s,%s,%s/after', $MYVIMHOME, &runtimepath, $MYVIMHOME)
if has('nvim')
let &runtimepath = printf('%s,%s,%s/after,%s/site', stdpath('config'), &runtimepath, stdpath('config'), stdpath('data'))
endif
if exists('packpath')
let &packpath = &runtimepath
else
execute pathogen#infect()
endif
" If the current project defines a project-level .vimrc, source it here
if filereadable("project.vim") && !exists("g:loaded_renzmann_project")
source project.vim
let g:loaded_renzmann_project = 1
endif
" }}}
" Editor Settings: {{{
" Make sure that `stty start undef` and `stty -ixon` are in ~/.bashrc
" https://stackoverflow.com/a/21808952
set nocompatible
set background=dark
set encoding=utf-8
set cursorline
set noerrorbells visualbell t_vb=
set hidden
set linebreak
set shiftround
set number
set relativenumber
set nowrap
set hlsearch
set wildignore=*.o,*.obj,*.db-whl,*.db-shm,*node_modules*,*.venv*,tags,.*.un~,*.pyc
set list listchars=tab:>\ ,trail:·
set mouse=a
set showcmd
set foldmethod=marker
set foldmarker={{{,}}}
set completeopt=menu,menuone,preview
" At one point I had set this to the below. See the following for why that might
" not be a great idea:
" https://gist.github.com/romainl/7e2b425a1706cd85f04a0bd8b3898805
" set path=.,,./**,**,
" Sometimes prevents crazy bad highlighted lines when they shouldn't be
set t_ut=
if has('win32')
set termguicolors
endif
augroup default
autocmd!
" Automatically open the quickfix menu if there are results sent to it
autocmd QuickFixCmdPost [^l]* cwindow
" Common save hooks
autocmd BufWritePre *
\ " Automatically create folders
\ if '<afile>' !~ '^scp:' && !isdirectory(expand('<afile>:h')) |
\ call mkdir(expand('<afile>:h'), 'p') |
\ endif
autocmd Filetype *
\ if &omnifunc == "" |
\ setlocal omnifunc=syntaxcomplete#Complete |
\ endif
augroup END
if has('win32')
set nocursorline
if has('gui')
set guifont=DejaVu_Sans_Mono_for_Powerline:h11
set guioptions-=T
end
end
" }}}
" Color theme {{{
" Default colos that are okay:
" colo torte
" colo murphy
" colo koehler
" colo desert
" colo evening
" let g:gruvbox_italic=1
" colo gruvbox " github.com/morhetz/gruvbox
let g:nord_italic=1
let g:nord_bold=1
let g:nord_italic_comments=1
" looks good everywhere!
colorscheme apprentice
" }}}
" Common abbreviations {{{
cabbrev fidn find
cabbrev greo grep
cabbrev vsf vert sfind
cabbrev %% %:p:h
" `cd current file`
cabbrev ccf cd %:p:h
" }}}
" slime customization: {{{
let g:slime_target = "tmux"
" I always have the REPL on the right, vertical split.
let g:slime_default_config = {"socket_name": "default", "target_pane": "1"}
" }}}