-
Notifications
You must be signed in to change notification settings - Fork 2
/
wwcd.vim
executable file
·75 lines (60 loc) · 1.31 KB
/
wwcd.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
" language
lang en_US
" define bash style editing keys
cnoremap <C-A> <Home>
cnoremap <C-F> <Right>
cnoremap <C-B> <Left>
cnoremap <Esc>b <S-Left>
cnoremap <Esc>f <S-Right>
" maintain Visual Mode after shifting > and <
vmap > >gv
vmap < <gv
" yank from the cursor to the end of line, it like 'C' change from the cursor
map Y y$
" line number and cursorline
set nu
set rnu
set nocursorline
" complete options
set completeopt=longest,menuone
" select last seleted
" gv
" select last paste
nnoremap <expr> gp '`['.strpart(getregtype(), 0, 1).'`]'
" remember info about open buffers on close
if has("nvim")
set shada^=%
else
set viminfo^=%
endif
" browser current file dir
map <silent><leader>e :edit %:p:h<CR>
if has("patch-7.4.1500")
set foldmethod=marker
endif
"set keywordprg=
if !has('gui_running')
set t_Co=256
endif
if has('nvim')
" terminal switch
tnoremap <Esc> <C-\><C-n>
tnoremap <A-h> <C-\><C-n><C-w>h
tnoremap <A-j> <C-\><C-n><C-w>j
tnoremap <A-k> <C-\><C-n><C-w>k
tnoremap <A-l> <C-\><C-n><C-w>l
" Misc
set listchars=tab:»\ ,eol:$,trail:~,extends:>,precedes:<,space:·
set inccommand=split
endif
if has('win32')
try
color molokai
catch
endtry
endif
if v:version >= 704
set undofile
set undolevels=500 "maximum number of changes that can be undone
endif
" vim: ts=2 sw=2 et