-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vimrc
92 lines (68 loc) · 1.52 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
source ~/.vim/startup/plugins.vim
source ~/.vim/startup/colors.vim
source ~/.vim/startup/statusline.vim
source ~/.vim/startup/autocommands.vim
inoremap jk <esc>
nnoremap <leader>ev <C-w><C-v><C-l>:e $MYVIMRC<cr>
nnoremap <leader>sv :source $MYVIMRC<cr>
set breakindent
set linebreak
" Show line numbers
set number
" Show column info in Ctrl+G
set noruler
" Prevent delay for lightline when switching modes
set ttimeoutlen=50
filetype plugin on
" Upper case word
inoremap <leader>u <esc>viwUea
nnoremap <leader>u viwU<esc>e
" Show color column
set colorcolumn=+1
let &colorcolumn = join(range(81,999), ',')
" Save files as sudo
nnoremap <leader>w :w !sudo tee % > /dev/null
set scrolljump=5
set scrolloff=3
" vim command prompt
nnoremap <Space> :
vnoremap <Space> :
" Quickly show buffer list
nnoremap <F5> :buffers<CR>:
" Disable netrw banner
let g:netrw_banner=0
" Open splits by default to the right and below
set splitright
set splitbelow
set pumheight=20
" Wildmenu
set wildmenu
set winminheight=0
set wildmode=longest:full,full
" Search
set incsearch
set hlsearch
" Change cursor in different modes
let &t_SI = "\<Esc>[6 q"
let &t_SR = "\<Esc>[4 q"
let &t_EI = "\<Esc>[2 q"
" Split characters
set fillchars+=vert:│
" Highlight cursorline
set cursorline
" Tabs
set shiftwidth=4
set softtabstop=4
set tabstop=8
set smarttab
set expandtab
" System Clipboard
inoremap <C-v> <ESC>"+pa
vnoremap <C-c> "+y
vnoremap <C-d> "+d
" Code Folding
set foldenable
set foldmethod=marker
set foldlevel=0
set modelines=1
nnoremap <Tab> za