-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathescalt.vim
43 lines (42 loc) · 1.23 KB
/
escalt.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
" 目前没有在用
" escalt.vim 控制台下让用 <M-x> 也可用
" Author: lilydjwg <[email protected]>
" Last Change: 2010年12月15日
" ---------------------------------------------------------------------
" Load Once:
if &cp || exists("g:loaded_escalt") || has("gui_running") || has("win32") || has("win64")
finish
endif
let s:keepcpo = &cpo
let g:loaded_escalt = 1
set cpo&vim
" ---------------------------------------------------------------------
" Functions:
function Escalt_console()
for i in range(65, 90) + range(97, 122)
exe "set <M-".nr2char(i).">=\<Esc>".nr2char(i)
endfor
set ttimeoutlen=50
if &term =~ 'xterm'
set <F1>=OP
set <F2>=OQ
set <F3>=OR
set <F4>=OS
set <Home>=OH
set <End>=OF
endif
for i in ["", "c", "i", "x"]
exe i . "map Ï1;2P <S-F1>"
exe i . "map Ï1;2Q <S-F2>"
exe i . "map Ï1;2R <S-F3>"
exe i . "map Ï1;2S <S-F4>"
endfor
endfunction
" ---------------------------------------------------------------------
" Call Functions:
call Escalt_console()
" ---------------------------------------------------------------------
" Restoration And Modelines:
let &cpo= s:keepcpo
unlet s:keepcpo
" vim:fdm=expr:fde=getline(v\:lnum-1)=~'\\v"\\s*-{20,}'?'>1'\:1