-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvimrc.7
95 lines (88 loc) · 2 KB
/
vimrc.7
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
" vimrc for old linux vim7
" keep a single and simple vimrc
set ruler
set showcmd
set incsearch
set hlsearch
set ignorecase
set smartcase
set wildmenu
set scrolloff=3
set backspace=indent,eol,start
set whichwrap+=<,>,[,]
set autoindent
set smartindent
set display=lastline
set textwidth=78
set formatoptions+=mB
set fileencodings=ucs-bom,utf-8,gb18030,cp936,latin1
set fileformats=unix,dos
set autowriteall
set autochdir
set cmdheight=2
set laststatus=2
set statusline=%t%m%r%h%w:%l\|%v\ %{&ff}\-%Y\ %p%%%LL%=%{&fenc}\ 0x\%B\|\%b\
set cursorline
set mouse=nv
set selection=inclusive
set history=50
set noswapfile
set nobackup
set sessionoptions=tabpages,curdir,slash
set switchbuf=usetab
set wildignore=*.o,*.obj,*out,*.exe,*.gcda,*.gcno
cnoremap <C-Ins> <C-R>*
cnoremap <C-y> <C-R>"
cnoremap <S-Ins> <C-R>+
cnoremap <C-a> <Home>
cnoremap <C-b> <Left>
cnoremap <C-d> <Del>
cnoremap <C-f> <Right>
cnoremap <C-p> <Up>
cnoremap <C-n> <Down>
inoremap <C-/> <C-o>u
inoremap <C-Ins> <C-R>+
inoremap <C-y> <C-R>"
inoremap <S-Ins> <C-R>*
inoremap <C-BS> <C-w>
inoremap <C-^> <C-y>
inoremap <C-_> <C-o>u
inoremap <C-a> <C-o>I
inoremap <C-b> <Left>
inoremap <C-d> <Del>
inoremap <C-e> <C-o>A
inoremap <C-f> <Right>
inoremap <C-k> <C-o>d$
inoremap <C-n> <Down>
inoremap <C-p> <Up>
inoremap <C-l> <C-X><C-L>
inoremap <C-;> <C-X><C-P>
inoremap <C-'> <C-X><C-N>
inoremap <C-t> <C-X><C-]>
inoremap <C-,> <C-X><C-K>
inoremap <C-.> <C-X><C-O>
nnoremap <C-h> <C-w>h
nnoremap <C-l> <C-w>l
noremap H ^
noremap L $
nnoremap Y y$
nnoremap P P=`]`]
nnoremap p p=`]`]
nnoremap <C-j> 5<C-e>
nnoremap <C-k> 5<C-y>
nnoremap K <F1><F1>
nnoremap ;w :w<CR>
nnoremap - :move +1<CR>
nnoremap _ :move -2<CR>
nnoremap ,O :call append(line(".")-1, "")<CR>
nnoremap ,o :call append(line("."), "")<CR>
" jkhl movement with tabpage
nnoremap gT :tabnew<CR>
nnoremap gh :tabfirst<CR>
nnoremap gj :tabnext<CR>
nnoremap gk :tabprevious<CR>
nnoremap gl :tablast<CR>
vnoremap < <gv
vnoremap > >gv
" show path of current file, like pwd for dirctory
command PWF echo expand('%:p')