nmap \b :call ExtractOpenURL('')<CR>
nmap \w :call ExtractOpenURL('-n')<CR>
nmap \t :call ExtractOpenURL('-t')<CR>
+nmap \p :call ExtractOpenURL('-p')<CR>
" Send visual block to a browser
vmap \b ""y:call OpenURL('<C-R>"', '')<CR>
vmap \w ""y:call OpenURL('<C-R>"', '-n')<CR>
vmap \t ""y:call OpenURL('<C-R>"', '-t')<CR>
+vmap \p ""y:call OpenURL('<C-R>"', '-p')<CR>
" Encode and send visual block to a browser
vmap \B ""y:call EncodeOpenURL('<C-R>"', '')<CR>
vmap \W ""y:call EncodeOpenURL('<C-R>"', '-n')<CR>
execute 'set fileencoding=' . e
w
break
- catch /E513: write error, conversion failed/
+ catch /E513: [Ww]rite error, conversion failed/
continue
endtry
endfor
if &modified
- throw '"' . expand('%') . '" E513: write error, conversion failed; tried ' . join(encodings, ',')
+ throw '"' . expand('%') . '" E513: Write error, conversion failed; tried ' . join(encodings, ',')
elseif has("spell")
call SetupSpell()
endif