1
2 Author:peter@peterodding.com
3 Last Change:
4 URL:http://peterodding.com/code/vim/shell/
5 License:
6 Version:
7
8
9 GetLatestVimScripts::AutoInstall
10
11
12
13 if !exists('g:shell_mappings_enabled')
14
15 let g:shell_mappings_enabled = 1
16 endif
17
18 if !exists('g:shell_fullscreen_items')
19 :Fullscreen
20 let g:shell_fullscreen_items = 'mTe'
21 endif
22
23 if !exists('g:shell_open_cmds')
24
25 let g:shell_open_cmds = ['gnome-open', 'kde-open', 'exo-open', 'xdg-open']
26 endif
27
28 if !exists('g:shell_hl_exclude')
29
30 let g:shell_hl_exclude = '^\(x|ht\)ml$'
31 endif
32
33 if !exists('g:shell_patt_url')
34 let g:shell_patt_url = '\<\w\{3,}://\(\S*\w\)\+[/?#]\?'
35 endif
36
37 if !exists('g:shell_patt_mail')
38 let g:shell_patt_mail = '\<\w[^@ \t\r]*\w@\w[^@ \t\r]\+\w\>'
39 endif
40
41
42
43 augroup PluginShell
44
45 autocmd! BufNew,BufRead,Syntax * call xolox#shell#highlight_urls()
46 augroup END
47
48
49
50 command! -bar -nargs=? -complete=file Open call xolox#shell#open_cmd(<q-args>)
51 command! -bar Fullscreen call xolox#shell#fullscreen()
52
53
54
55 if g:shell_mappings_enabled
56 inoremap <F11> <C-o>:Fullscreen<CR>
57 nnoremap <F11> :Fullscreen<CR>
58 inoremap <F6> <C-o>:Open<CR>
59 nnoremap <F6> :Open<CR>
60 endif
61
62