-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.vimrc
More file actions
173 lines (119 loc) · 4.25 KB
/
Copy path.vimrc
File metadata and controls
173 lines (119 loc) · 4.25 KB
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
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Setup:
" behave like vim, not like vi
" (has side effect for other options, so must be first)
set nocompatible
set fileencoding=utf-8
set encoding=utf-8
" where to create backups, if turned on:
" 2023-04-11: Let's just create backups in the same directory for now.
" set backupdir=~/.cache/vim/backup
set backupdir=./
" where to store swap files:
" 2023-04-11: Let's just store swap files in the same directory for now.
" set directory=~/.cache/vim/
set directory=./
" gnome-terminal doesn't advertise its support for 256 colors, fix:
if $COLORTERM == 'gnome-terminal'
set t_Co=256
endif
" yes our tty is fast.
set ttyfast
" hot reloading with parceljs inside a docker container needs this to work:
set backupcopy=yes
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Behaviour:
" only a single space after ./?/! etc after using 'j' or 'gq'
set nojoinspaces
" no delay when hitting escape
" relevant from vim, not neovim: https://github.com/neovim/neovim/issues/7661
" set noesckeys
" completion from list on command line.
set wildmenu
" recursive search when using :find
set path+=**
" Remove trailing whitespaces automaticaly on save
" 2022-08-09: this messes up editing git patches...
" autocmd BufWritePre * :%s/\s\+$//e
set textwidth=80
" wrap at different width for javascript:
" autocmd BufRead,BufNewFile *.js,*.jsx,*.ts,*.tsx,*.txt,*.md setlocal textwidth=100
" use folding by default
" set foldmethod=indent
set foldmethod=syntax
" set mouse=a " enable mouse (gah, this prevents copy/paste with mouse)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
runtime vim.d/cursor.vim
runtime vim.d/indent-4.vim
runtime vim.d/search.vim
runtime vim.d/vanilla-behaviour.vim
runtime vim.d/vanilla-commands.vim
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Appearance:
set showcmd " show (long) commands being typed
syntax on
" try to fix slow syntax highlighting:
" set synmaxcol=90
set background=dark
" colorscheme torte
" in order to let the terminal handle the background:
highlight Normal ctermbg=none
" hide vertical split line:
highlight VertSplit ctermbg=black ctermfg=black
" remove annoying underlines when editing HTML code.
hi Underlined gui=NONE
" change syntax/indent depending on file extension:
filetype plugin indent on
" custom words:
set spellfile=~/.vim/spell/en.utf-8.add
" https://www.linux.com/learn/using-spell-checking-vim
" turn off with :set nospell
" okay this is too annoying to have on by default...
" set spell spelllang=en_gb
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Filetype Specifics:
" .md == markdown
au BufNewFile,BufRead *.md set filetype=markdown
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Pathogen Plugins:
" activate pathogen to enable ~/.vim/bundle plugins:
" https://github.com/tpope/vim-pathogen
execute pathogen#infect()
runtime vim.d/move.vim
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" vim-plug plugins https://github.com/junegunn/vim-plug
runtime vim.d/plug.vim
" call :PlugInstall after adding something here:
call plug#begin('~/.vim/plugged')
" https://github.com/neoclide/coc.nvim
" config goes in .config/coc/config
Plug 'neoclide/coc.nvim', {'branch': 'release'}
" vim color scheme gruvbox:
Plug 'morhetz/gruvbox'
" Multi-entry selection UI.
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'mhinz/vim-startify'
Plug 'dylanaraps/root.vim'
Plug 'SirVer/ultisnips'
" Plug 'honza/vim-snippets'
Plug 'michaeljsmith/vim-indent-object'
" Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
" Plug 'fatih/vim-go'
" Plug 'preservim/nerdcommenter'
" Plug 'dhruvasagar/vim-table-mode'
Plug 'liuchengxu/vista.vim'
call plug#end()
runtime config/gruvbox.vim
" let runtimepath = '~/.vim'
" runtime config/nerdtree.vim
runtime config/ale.vim
runtime config/coc-explorer.vim
runtime config/coc.vim
runtime config/fzf.vim
runtime config/gitgutter.vim
runtime config/nerdcommenter.vim
runtime config/startify.vim
runtime config/statusline.vim
runtime config/ultisnips.vim
" runtime config/vim-go.vim