-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path_vimrc_win
88 lines (74 loc) · 2.45 KB
/
_vimrc_win
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
"===================================================================
" Core rules for vimrc under Ms-Windows systems
"
" File : _vimrc_win
" Maintainer : Luc Hermitte <EMAIL:hermitte {at} free {dot} fr>
" <URL:http://github.com/LucHermitte/lh-misc>
" Last update : 18th Apr 2015
" ======================================================================
" Font {{{
try
" set gfn=Andale_Mono:h10
" set gfn=Andale_Mono:h8
set gfn=Ubuntu_Mono_derivative_Powerlin:h9:cANSI
catch /E596/
set gfn=Lucida_Console:h8
" call confirm("Can't load the font Lucida_Console", '&Ok', 1)
endtry
" Font }}}
" I don't have TCL installed, and as has('tcl') freeze my win32-vim + cygwin, I
" deactivate it with:
let g:vimembedscript = 1
" Selection -> clipboard
set guioptions+=a
set clipboard+=autoselect
" Why do we need to bother with '\' ?
set shellslash
" ======================================================================
" Running IE {{{
" Note: These mappings require the tool cygstart that works under Cygwin.
" Related information:
" http://vim.sourceforge.net/tips/tip.php?tip_id=628
" http://vim.sourceforge.net/tips/tip.php?tip_id=394
let s:browser = executable('cygstart') ? 'cygstart' : ''
function! s:Browser()
return lh#option#get('browser', s:browser, '[bg]') . ' '
endfunction
function! s:RunBrowser(url)
let url = escape(a:url, '%')
call netrw#NetrwBrowseX(url, 0)
return
if SystemDetected() == 'unix'
silent exe ':! '.<sid>Browser().url
else
silent exe ':! start '.<sid>Browser().url
endif
endfunction
nnoremap <silent> <C-L>e
\ :call <sid>RunBrowser(
\ matchstr(escape(expand('<cWORD>'), '#'),
\ '\%(.\{-}\zs\%(news:\\|mailto:\\|ftp://\\|https\=://\)\)\=[^:;,<>]\+'
\ ))<CR>
" Problem with urls ending in .html
" nnoremap <silent> <C-L>m
" \ :exe ':!start rundll32 url.dll,FileProtocolHandler '.
" \ matchstr(expand('<cWORD>'),
" \ '\%(.\{-}\zs\%(news:\\|mailto:\\|ftp://\\|https\=://\)\)\=[^:;,<>]\+'
" \ )<CR>
vnoremap <silent> <C-L>e
\ :call <sid>RunBrowser(lh#visual#selection())<cr>
" Running IE }}}
" ======================================================================
if !has('gui_running')
" mappings for vim (not gvim)
map ÎÖ <M-Insert>
map! ÎÖ <M-Insert>
map ÎÙ <M-del>
map! ÎÙ <M-del>
map Îb <C-F5>
map! Îb <C-F5>
map În <M-F7>
map! În <M-F7>
endif
" ======================================================================
" vim600: set foldmethod=marker: