-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
71 lines (49 loc) · 1.33 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
set nocompatible
set nobackup
set noswapfile
set expandtab
set softtabstop=4
set shiftwidth=4
set nohlsearch
set incsearch
set magic
set hidden
set ignorecase
set smartcase
set updatetime=100
set path+=**
set suffixes+=,,
set dictionary+=/usr/share/dict/words
set viewoptions=cursor,folds,slash,unix
set splitbelow
set splitright
set number
set relativenumber
set lcs=tab:»·,trail:␣,nbsp:˷
highlight InvisibleSpaces ctermfg=Black ctermbg=Black
call matchadd('InvisibleSpaces', '\S\@<=\s\+\%#\ze\s*$', -10)
if has('termguicolors')
set termguicolors
endif
set background=dark
nnoremap <space> <nop>
let mapleader = "\<Space>"
" Mappings {{{1
" paste things continuously
xnoremap p "_dP
" replace inside visual selection boundaries
xnoremap <leader>s :s/\%V
" don't leave visual mode when indenting
vnoremap < <gv
vnoremap > >gv
" don't short jumps in jumplist
nnoremap <silent> } :<C-u>execute "keepjumps norm! " . v:count1 . "}zz"<CR>
nnoremap <silent> { :<C-u>execute "keepjumps norm! " . v:count1 . "{zz"<CR>
" make 'n' and 'N' behave the same way
nnoremap <expr> n 'Nn'[v:searchforward]
nnoremap <expr> N 'nN'[v:searchforward]
" substitute word under cursor on line/globally
nnoremap <leader>s :s/\C\<<C-r><C-w>\>//g<left><left>
nnoremap <leader>S :%s/\C\<<C-r><C-w>\>//g<left><left>
" }}}
" vim: sw=2 sts=2 foldmethod=marker