Repository navigation
Expand file tree
/
Copy pathvimrc.basic
More file actions
58 lines (53 loc) · 2.02 KB
/
Copy pathvimrc.basic
File metadata and controls
58 lines (53 loc) · 2.02 KB
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
function! GitBranch()
return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
endfunction
function! StatuslineGit()
let l:branchname = GitBranch()
return strlen(l:branchname) > 0?' '.l:branchname.' ':''
endfunction
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
set statusline=
set statusline +=%1*\ %n\ %* "buffer number
set statusline +=%5*%{&ff}%* "file format
set statusline +=%3*%y%* "file type
set statusline +=%4*\ %<%F%* "full path
set statusline +=%2*%m%* "modified flag
set statusline +=%1*%=%5l%* "current line
set statusline +=%2*/%L%* "total lines
set statusline +=%1*%4v\ %* "virtual column number
set statusline +=%2*0x%04B\ %* "character under cursor
hi User1 guifg=#eea040 guibg=#222222
hi User2 guifg=#dd3333 guibg=#222222
hi User3 guifg=#ff66ff guibg=#222222
hi User4 guifg=#a0ee40 guibg=#222222
hi User5 guifg=#eeee40 guibg=#222222
set backspace=indent,eol,start
set tags=./tags,./TAGS,tags;~,TAGS;~
" save
noremap <silent> <C-S> :update<CR>
vnoremap <silent> <C-S> <C-C>:update<CR>
inoremap <silent> <C-S> <C-O>:update<CR>
set wildmenu wildmode=full
set wildchar=<Tab> wildcharm=<C-Z>
" Switch Buffer
nnoremap <C-j> :bprevious<CR>
nnoremap <C-k> :bnext<CR>
nmap <leader>w :w<cr>
nmap <leader>q :bd<cr>
nmap <leader><Esc> :bd!<cr>
nmap <leader><BS><BS> :bufdo bd<cr>
nmap <leader><BS><BS><BS> :bufdo bd!<cr>
nmap <leader>1 <Plug>BufTabLine.Go(1)
nmap <leader>2 <Plug>BufTabLine.Go(2)
nmap <leader>3 <Plug>BufTabLine.Go(3)
nmap <leader>4 <Plug>BufTabLine.Go(4)
nmap <leader>5 <Plug>BufTabLine.Go(5)
nmap <leader>6 <Plug>BufTabLine.Go(6)
nmap <leader>7 <Plug>BufTabLine.Go(7)
nmap <leader>8 <Plug>BufTabLine.Go(8)
nmap <leader>9 <Plug>BufTabLine.Go(9)
nmap <leader>0 <Plug>BufTabLine.Go(0)>w :w<cr>
nmap <leader>q :bd<cr>
nmap <leader><Esc> :bd!<cr>
nmap <leader><BS><BS> :bufdo bd<cr>
nmap <leader><BS><BS><BS> :bufdo bd!<cr> LaTeX-item-indent 0)