-
Notifications
You must be signed in to change notification settings - Fork 0
/
inject-vim.txt
79 lines (79 loc) · 4.54 KB
/
inject-vim.txt
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
:set nobackup nocompatible incsearch hlsearch showmatch autoindent virtualedit=block encoding=utf8 wildmenu wildmode=list:longest laststatus=2 noruler modeline showcmd nocursorline viminfo= foldopen=hor,insert,undo mouse=a backspace=indent,eol,start complete-=i smarttab nrformats-=octal scrolloff=1 sidescrolloff=5 display+=lastline listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+ formatoptions+=j autoread history=1000 tabpagemax=50 sessionoptions-=options
:syntax enable
:silent! set cryptmethod=blowfish
:silent! set cryptmethod=blowfish2
:silent! set cryptmethod=xchacha20
:silent! set cryptmethod=xchacha20v2
:filetype plugin indent on
:let g:netrw_preview=1
:map <silent> _ :Texplore<cr>
:map <silent> - :execute exists("w:netrw_rexlocal")?":Rexplore":":Explore"<cr>
:map <c-j> j<c-e>
:map <c-k> k<c-y>
:map <leader>= viW"zyA = <esc>"=<c-r>z<cr>p
:map <leader>c :lchdir <c-r>=expand('%:p:h')<cr><cr>
:map <leader>C :chdir <c-r>=expand('%:p:h')<cr><cr>
:map <silent> <leader>l :setlocal list<cr>
:map <silent> <leader>L :setlocal nolist<cr>
:map <silent> <leader>p :setlocal paste<cr>
:map <silent> <leader>P :setlocal nopaste<cr>
:map <silent> <leader>v :setlocal virtualedit=all<cr>
:map <silent> <leader>V :setlocal virtualedit=block<cr>
:map <silent> <leader>e :setlocal expandtab<cr>
:map <silent> <leader>E :setlocal noexpandtab<cr>
:map <silent> <leader>w :setlocal nowrap<cr>
:map <silent> <leader>W :setlocal wrap<cr>
:map <silent> <leader>d :set filetype=markdown<cr>
:map <silent> <leader>D :doautocmd FileType<cr>
:map <silent> <leader>r :set relativenumber<cr>
:map <silent> <leader>R :set norelativenumber<cr>
:map <silent> <leader>s :set scrollbind<cr>
:map <silent> <leader>S :set noscrollbind<cr>
:map <leader>tf :TableModeRealign<cr>:TableEvalFormulaLine<cr>
:map <leader>tb :TagbarToggle<cr>
:map <leader>2 :setlocal sw=2 ts=2<cr>
:map <leader>4 :setlocal sw=4 ts=4<cr>
:map <leader>8 :setlocal sw=8 ts=8<cr>
:map <silent> <c-n> :tabnext<cr>
:map <silent> <c-p> :tabprevious<cr>
:map <silent> <leader>, :tabmove -1<cr>
:map <silent> <leader>. :tabmove +1<cr>
:map <leader>x :close<cr>
:if has('terminal') tmap <esc><esc> <c-\><c-N> | map <leader><leader> :vertical below terminal<cr> | map <leader>\| :tab terminal<cr> | endif
:map <silent> <leader>h1 :call matchadd("DiffText", expand("<cword>"))<cr>
:map <silent> <leader>h2 :call matchadd("DiffDelete", expand("<cword>"))<cr>
:map <silent> <leader>h3 :call matchadd("DiffAdd", expand("<cword>"))<cr>
:map <silent> <leader>h4 :call matchadd("DiffChange", expand("<cword>"))<cr>
:map <silent> <leader>h5 :call matchadd("Error", expand("<cword>"))<cr>
:map <silent> <leader>h6 :call matchadd("Todo", expand("<cword>"))<cr>
:map <silent> <leader>h7 :call matchadd("Folded", expand("<cword>"))<cr>
:map <silent> <leader>h8 :call matchadd("PMenu", expand("<cword>"))<cr>
:map <silent> <leader>h9 :call matchadd("PMenuSel", expand("<cword>"))<cr>
:map <silent> <leader>h0 :call clearmatches()<cr>
:nmap <silent> <leader>/ :nohlsearch<cr>
:nmap <space> za
:nmap + zA
:let base16colorspace=256
:syn on
:set statusline=%n%m%h%r\ %f\ [%{strlen(&fenc)?&fenc:'none'},%{&ff}]\ %{&list?'LIST\ ':''}%{&linebreak?'TEXTMODE\ ':''}%{&scrollbind?'SCROLLBIND\ ':''}%{&scrollbind?'SCROLLBIND\ ':''}%{&expandtab?'EXPANDTAB\ ':''}%{&wrap?'':'NOWRAP\ '}%{&paste?'PASTE\ ':''}%{&virtualedit=='all'?'VIRTUALEDIT\ ':''}%{strlen(&mouse)?'MOUSE\ ':''}%y%=C:%c%V\ L:%l/%L\ %p%%
:autocmd BufReadPost * exe "normal! g`\""
:autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
:autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
:let g:markdown_fenced_languages=['yaml', 'json', 'xml', 'python', 'bash', 'sh', 'javascript', 'js=javascript', 'c', 'go', 'golang=go', 'java', 'sql']
:let g:markdown_folding=1
:autocmd FileType markdown setlocal foldlevel=99
:autocmd FileType markdown syn match Todo "\<XXX\>"
:autocmd FileType markdown syn match markdownH1 "^# \zs"
:autocmd FileType markdown syn match markdownH2 "^## \zs"
:autocmd FileType markdown syn match markdownH3 "^### \zs"
:autocmd FileType markdown syn match markdownH4 "^#### \zs"
:autocmd FileType markdown syn match markdownH5 "^##### \zs"
:autocmd FileType markdown syn match markdownH6 "^###### \zs"
:autocmd FileType netrw nmap <buffer> <space> mf
:highlight markdownH1 ctermbg=243 guibg=#666666 ctermfg=15 guifg=#ffffff
:highlight markdownH2 ctermbg=238 guibg=#333333 ctermfg=7 guifg=#AAAAAA
:highlight markdownH3 ctermfg=71 guifg=#5faf5f
:highlight markdownH4 ctermfg=63 guifg=#605df6
:highlight markdownH5 ctermfg=24 guifg=#255e87
:highlight markdownH6 ctermfg=23 guifg=#295f5e
:echo "vim ok"