-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
62 lines (52 loc) · 1.37 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
" Vim configuration file
"
" Set hybrid line numbers and syntax highlighting on by default
set number relativenumber
syntax on
filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with <> use 4 spaces width
set shiftwidth=4
" On pressing tab, insert 4 spaces
set expandtab
" Map jk to escape in insert mode
imap jk <Esc>
imap JK <Esc>
" Tell which characters to show for expanded \t
" trailing whitespace and end-of-lines
if &listchars ==# 'eol:$'
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
endif
set list
" Also highlight all tabs and trailing whitespace characters.
highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
match ExtraWhitespace /\s\+$\|\t/
" Use global clipboard
set clipboard=unnamedplus
" Set swapfile directory to /tmp
set swapfile
set dir=/tmp
" Always have status bar
set laststatus=2
" Quick access to vim undo tree
nnoremap <F5> :UndotreeToggle<cr>
" Persistent undo
if has("persistent_undo")
set undodir=/tmp/undodir/
set undofile
endif
" Vim Plug
call plug#begin('~/.local/share/nvim/plugged')
" Minimalist mode
Plug 'junegunn/goyo.vim'
" Better quoting and xml tags
Plug 'tpope/vim-surround'
" Visualize undo tree
Plug 'mbbill/undotree'
" Fuzzy search
Plug 'junegunn/fzf'
" Lisp inferred parens
" Requires rust
Plug 'eraserhd/parinfer-rust', {'do': 'cargo build --release'}
call plug#end()