File plugin/emacscommandline.vim changed (mode: 100644) (index 2726070..b3be0c4) |
... |
... |
cnoremap <C-B> <Left> |
4 |
4 |
cnoremap <C-F> <Right> |
cnoremap <C-F> <Right> |
5 |
5 |
cnoremap <C-P> <Up> |
cnoremap <C-P> <Up> |
6 |
6 |
cnoremap <C-N> <Down> |
cnoremap <C-N> <Down> |
7 |
|
cnoremap <Esc>r <C-F>? |
|
8 |
|
cmap <M-r> <Esc>r |
|
|
7 |
|
if has('gui_running') |
|
8 |
|
cnoremap <M-r> <C-F>? |
|
9 |
|
else |
|
10 |
|
cnoremap <Esc>r <C-F>? |
|
11 |
|
cmap <M-r> <Esc>r |
|
12 |
|
endif |
9 |
13 |
|
|
10 |
14 |
" Maps to old shortcuts using Ctrl-O as a prefix |
" Maps to old shortcuts using Ctrl-O as a prefix |
11 |
15 |
cnoremap <C-O><C-A> <C-A> |
cnoremap <C-O><C-A> <C-A> |
|
... |
... |
cnoremap <C-O><C-X><C-U> <C-X><C-U> |
24 |
28 |
cnoremap <C-O><Del> <Del> |
cnoremap <C-O><Del> <Del> |
25 |
29 |
cnoremap <C-O><BS> <BS> |
cnoremap <C-O><BS> <BS> |
26 |
30 |
|
|
27 |
|
cnoremap <Esc>f <C-\>e<SID>ForwardWord()<CR> |
|
28 |
|
cmap <M-f> <Esc>f |
|
|
31 |
|
if has('gui_running') |
|
32 |
|
cnoremap <M-f> <C-\>e<SID>ForwardWord()<CR> |
|
33 |
|
else |
|
34 |
|
cnoremap <Esc>f <C-\>e<SID>ForwardWord()<CR> |
|
35 |
|
cmap <M-f> <Esc>f |
|
36 |
|
endif |
29 |
37 |
function! <SID>ForwardWord() |
function! <SID>ForwardWord() |
30 |
38 |
let l:loc = strpart(getcmdline(), 0, getcmdpos() - 1) |
let l:loc = strpart(getcmdline(), 0, getcmdpos() - 1) |
31 |
39 |
let l:roc = strpart(getcmdline(), getcmdpos() - 1) |
let l:roc = strpart(getcmdline(), getcmdpos() - 1) |
|
... |
... |
function! <SID>ForwardWord() |
41 |
49 |
return getcmdline() |
return getcmdline() |
42 |
50 |
endfunction |
endfunction |
43 |
51 |
|
|
44 |
|
cnoremap <Esc>b <C-\>e<SID>BackwardWord()<CR> |
|
45 |
|
cmap <M-b> <Esc>b |
|
|
52 |
|
if has('gui_running') |
|
53 |
|
cnoremap <M-b> <C-\>e<SID>BackwardWord()<CR> |
|
54 |
|
else |
|
55 |
|
cnoremap <Esc>b <C-\>e<SID>BackwardWord()<CR> |
|
56 |
|
cmap <M-b> <Esc>b |
|
57 |
|
endif |
46 |
58 |
function! <SID>BackwardWord() |
function! <SID>BackwardWord() |
47 |
59 |
let l:loc = strpart(getcmdline(), 0, getcmdpos() - 1) |
let l:loc = strpart(getcmdline(), 0, getcmdpos() - 1) |
48 |
60 |
let l:roc = strpart(getcmdline(), getcmdpos() - 1) |
let l:roc = strpart(getcmdline(), getcmdpos() - 1) |
|
... |
... |
function! <SID>BackwardKillLine() |
120 |
132 |
return l:ret |
return l:ret |
121 |
133 |
endfunction |
endfunction |
122 |
134 |
|
|
123 |
|
cnoremap <Esc>d <C-\>e<SID>KillWord()<CR> |
|
124 |
|
cmap <M-d> <Esc>d |
|
|
135 |
|
if has('gui_running') |
|
136 |
|
cnoremap <M-d> <C-\>e<SID>KillWord()<CR> |
|
137 |
|
else |
|
138 |
|
cnoremap <Esc>d <C-\>e<SID>KillWord()<CR> |
|
139 |
|
cmap <M-d> <Esc>d |
|
140 |
|
endif |
125 |
141 |
function! <SID>KillWord() |
function! <SID>KillWord() |
126 |
142 |
call <SID>saveUndoHistory(getcmdline(), getcmdpos()) |
call <SID>saveUndoHistory(getcmdline(), getcmdpos()) |
127 |
143 |
let l:loc = strpart(getcmdline(), 0, getcmdpos() - 1) |
let l:loc = strpart(getcmdline(), 0, getcmdpos() - 1) |
|
... |
... |
function! <SID>KillWord() |
142 |
158 |
return l:ret |
return l:ret |
143 |
159 |
endfunction |
endfunction |
144 |
160 |
|
|
145 |
|
cnoremap <Esc><BS> <C-\>e<SID>BackwardKillWord()<CR> |
|
146 |
|
cmap <M-BS> <Esc><BS> |
|
|
161 |
|
if has('gui_running') |
|
162 |
|
cnoremap <M-BS> <C-\>e<SID>BackwardKillWord()<CR> |
|
163 |
|
else |
|
164 |
|
cnoremap <Esc><BS> <C-\>e<SID>BackwardKillWord()<CR> |
|
165 |
|
cmap <M-BS> <Esc><BS> |
|
166 |
|
endif |
147 |
167 |
function! <SID>BackwardKillWord() |
function! <SID>BackwardKillWord() |
148 |
168 |
" Do same as in-built Ctrl-W, except assign deleted text to @c |
" Do same as in-built Ctrl-W, except assign deleted text to @c |
149 |
169 |
call <SID>saveUndoHistory(getcmdline(), getcmdpos()) |
call <SID>saveUndoHistory(getcmdline(), getcmdpos()) |