-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
149 lines (135 loc) · 4.05 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
set nocompatible
filetype plugin indent on
syntax on
set autoindent
set backspace=indent,eol,start " Backspace as expected
set backupcopy=yes
set clipboard=unnamedplus
set complete=.,w,b,u,t " Insert-mode completion
set completeopt-=preview
set cursorline
set diffopt=vertical,filler
set encoding=utf-8
set expandtab
set exrc
set fileformat=unix
set fileformats=unix,dos
set foldcolumn=0
set foldlevelstart=99 " Do not automatically fold
set formatoptions+=j " Delete comment character when joining commented lines
set formatoptions=qrn1
set hidden " Avoid asking to save before hiding
set history=1000
set ignorecase
set incsearch " Search all instances
set lazyredraw
set linebreak " Word wrap if wrapping is enabled
set listchars=nbsp:·,tab:›\ ,eol:¬,trail:·,extends:…,precedes:…
set matchpairs=(:),{:},[:],<:>
set maxmempattern=5000
set modeline " Respect modeline of the file (the famous "vi:noai:sw=3 ts=6" on the beginning of the files)
set mouse=a " allow mouse in console
set nobackup
set nocursorcolumn
set noequalalways
set noerrorbells visualbell t_vb= " No beeps
set nohlsearch " Don't highlight matched regexp by default
set nojoinspaces
set nosplitbelow
set nostartofline " Keep the cursor in the current column when moving between lines (if possible)
set noswapfile
set nowinfixwidth
set nowrap
set nowritebackup
set number
set numberwidth=1
set path+=** " Search through sub-directories when looking up a file
set previewheight=25
set ruler
set scroll=5
set scrolljump=1
set scrolloff=0
set sessionoptions=blank,buffers,curdir,folds,help,options,tabpages,globals
set shiftround
set shiftwidth=4
set showbreak=╰
set showcmd " Show number of selected chars/lines
set showmatch
set showtabline=1 " Always show tabline
set sidescroll=1
set sidescrolloff=5
set smartcase " Don't ignore case if the search term contains uppercase
set smartindent
set smarttab
set softtabstop=4
set splitright " Open new splits to the right
set tabstop=4
set tags=./.tags,./tags;
set termguicolors
set textwidth=0
set timeout
set timeoutlen=500
set title
set titlestring=%f%(\ [%M]%) " Show file name at the title
set ttimeout
set ttimeoutlen=50
set ttyfast
set undodir=~/.undovim
set undofile " Persistent undo
set undolevels=2000
set undoreload=10000
set viminfo='10,:20,\"100,n~/.vim/viminfo
set virtualedit=block " Allow block mode after end of line
set wildignore=*.o,*.obj,*.pyc,*.swc,*.DS_STORE,*.bkp
set wildmenu
set wildmode=full
set winminheight=0
set wrapmargin=0
setlocal nospell
setlocal spelllang=en " Spell checking
colorscheme newernst-transparent
" Set cursor shape
"
" solid vertical bar in insert mode
let &t_SI .= "\<Esc>[6 q"
" solid block in normal mode
let &t_EI .= "\<Esc>[2 q"
" needed for termguicolors: see help xterm-true-color
let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
" Python syntax settings
let python_highlight_all = 1
" HTML syntax settings
let html_no_rendering = 1
let g:python3_host_prog = '/usr/bin/python3'
if executable('/usr/bin/python2')
let g:python_host_prog = '/usr/bin/python2'
endif
if has('autocmd') " Otherwise the settings don't work
autocmd GUIEnter * set visualbell t_vb=
endif
set t_Co=256
runtime macros/matchit.vim
" netRW settings
" let g:netrw_liststyle = 3
let g:netrw_list_hide = ".*\.pyc$"
" Use ripgrep as grep program
set shortmess=aoOtI
if executable("rg")
set grepprg=rg\ --smart-case\ --vimgrep\ --no-heading
set grepformat=%f:%l:%c:%m,%f:%l:%m
else
if executable('ag')
set grepprg=ag\ --nogroup\ --nocolor\ --vimgrep
set grepformat^=%f:%l:%c:%m " file:line:column:message
endif
endif
runtime autocmd.vim
runtime tabline.vim
runtime bundles.vim
runtime statusline.vim
runtime plugins.vim
runtime headertoggle.vim
runtime mappings.vim
runtime neovide.vim
set secure " don't allow usafe commands in project .vimrc files