-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
visual.vim
79 lines (75 loc) · 1.89 KB
/
visual.vim
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
" visual.vim
"
" Maintained by Claud D. Park <posquit0.bj@gmail.com>
" https://www.posquit0.com/
" Enable syntax highlighting
syntax on
" Line numbers on
set number
" Enable relative number for line
" (Constantly computing the relative nubmers is expensive)
set relativenumber
" Always show signcolumns
set signcolumn=yes
" Show ruler
set ruler
" Always show tab pannel
set showtabline=2
" Show the command typing
set showcmd
" Show matching brackets
set showmatch
" Bracket blinking
set matchtime=5
" Hide the current mode
set noshowmode
" Mark 80th column with a highlight color
if exists('+colorcolumn')
set colorcolumn=80
highlight ColorColumn ctermbg=gray
endif
" Highlight current line
set cursorline
" Show cursorline for active window only
augroup highlight_active_window
autocmd!
autocmd BufEnter * setlocal cursorline
autocmd BufLeave * setlocal nocursorline
augroup END
" No blinking
set novisualbell
" No noise
set noerrorbells
" Minimal number of screen lines to keep above and below the cursor
set scrolloff=3
" Native customized statusline, if airline is not available
set statusline=%1*%{winnr()}\ %*%<\ %f\ %h%m%r%=%l,%c%V\ (%P)
" Always show status line.
set laststatus=2
" No conceal
set conceallevel=0
" Use a block cursor in normal mode, i-beam cursor in insertmode
if empty($TMUX)
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
else
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
endif
" Enable if the terminal support true colors
if has('termguicolors')
set termguicolors
endif
if has('nvim')
set inccommand=split
endif
""" Match and search {{{
" Highlight searches
set hlsearch
" Ignore case of searches
set ignorecase
" be sensitive when there's a capital letter
set smartcase
" Highlight dynamically as pattern is typed
set incsearch
""" }}}