-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.vim
110 lines (98 loc) · 3.27 KB
/
init.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
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
syntax on
filetype plugin indent on
set noswapfile
set noshowmode
set ignorecase
set smartcase
set smartindent
set fileformat=unix
set fileencodings=ucs-bom,utf-8,cp936,gb18030
set linebreak
"set colorcolumn=80
set laststatus=2
set termguicolors
set number
set foldmethod=indent
set foldlevelstart=99
set completeopt=longest,menuone
set mmp=5000 "pattern uses more memory than 'maxmempattern'
let &t_8f="\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b="\<Esc>[48;2;%lu;%lu;%lum"
set fillchars=vert:\|
" set background=light
set background=dark
"set nu
"set rnu
set re=1
set ttyfast
set lazyredraw
colorscheme PaperColor
"colorscheme one
"color tender
"hi Normal guibg=NONE ctermbg=NONE
"highlight Visual guibg=#323232
"highlight Normal guibg=#000001
"highlight StatusLine guibg=#444444 guifg=#b3deef
"highlight StatusLineTerm guibg=#444444 guifg=#b3deef
"highlight StatusLineTermNC guibg=#444444 guifg=#999999
nnoremap <silent> <c-u> :Mru<cr>
"nnoremap <silent> <c-p> :call fzflv#Open()<cr>
nnoremap <silent> <c-p> :GFiles<cr>
" nnoremap <silent> <leader>t :TagbarToggle<cr>
nnoremap <silent> <leader>t :GoDecls<cr>
nnoremap <silent> <leader>e :NERDTreeToggle<cr>
nnoremap <silent> <leader>f :NERDTreeFind<cr>
autocmd BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") |
\ execute "normal! g`\"" |
\ endif
autocmd BufReadPost *.js,*.jsx,*.css,*.less,*.scss,*.json call lv#ExpandTab(2)
autocmd InsertLeave,CompleteDone *.go if pumvisible() == 0 | pclose | endif
autocmd FileType json syntax match Comment +\/\/.\+$+
" autocmd VimEnter,VimLeave * silent !tmux set status
" let g:NERDTreeIndicatorMapCustom = {
let g:NERDTreeGitStatusIndicatorMapCustom = {
\ "Modified" : "✹",
\ "Staged" : "✚",
\ "Untracked" : "✭",
\ "Renamed" : "➜",
\ "Unmerged" : "═",
\ "Deleted" : "✖",
\ "Dirty" : "✗",
\ "Clean" : "✔︎",
\ 'Ignored' : '☒',
\ "Unknown" : "?"
\ }
" 彩虹括号
let g:rainbow_active = 1
let g:NERDTreeMinimalUI = 1
let g:NERDTreeChDirMode = 2
let g:ackprg = 'ag --vimgrep'
let g:tagbar_compact = 1
let g:tagbar_sort = 0
let g:tagbar_iconchars = ['▸', '▾']
let g:vim_markdown_folding_disabled = 1
let g:vim_markdown_frontmatter = 1
let g:prettier#autoformat = 0
"function! s:find_git_root()
" return system('git rev-parse --show-toplevel 2> /dev/null')[:-2]
"endfunction
" proto buf 锁进调整
autocmd Filetype proto setlocal ts=4 sw=4 sts=0 expandtab
" 加载拆分的配置
for f in glob('~/.vim/config/*.vim', 0, 1)
execute 'source' f
endfor
autocmd BufReadPost quickfix nnoremap <buffer> <c-n> j<CR><c-w><c-p>
autocmd BufReadPost quickfix nnoremap <buffer> <c-p> k<CR><c-w><c-p>
map <Leader>g <Plug>(easymotion-prefix)
map <Leader>w <Plug>(easymotion-bd-w)
nmap <Leader>w <Plug>(easymotion-overwin-w)
" map <Leader>l <Plug>(easymotion-lineforward)
" map <Leader>j <Plug>(easymotion-j)
" map <Leader>k <Plug>(easymotion-k)
" map <Leader>h <Plug>(easymotion-linebackward)
" map <Leader>s <Plug>(Startify)
" nmap <silent><leader>s <Plug>(Startify)
nnoremap <silent> <leader>s :Startify<CR>
let g:startify_change_to_vcs_root = 1
xnoremap <silent> <cr> "*y:silent! let searchTerm = '\V'.substitute(escape(@*, '\/'), "\n", '\\n', "g") <bar> let @/ = searchTerm <bar> echo '/'.@/ <bar> call histadd("search", searchTerm) <bar> set hls<cr>