Commit 34fd0860 authored by Murukesh Mohanan's avatar Murukesh Mohanan

help-to-url code

parent 606b95a3
......@@ -55,6 +55,20 @@ set isfname-==
let g:tex_flavor = "latex"
function! Help2Url (...)
exec 'silent! help ' . ( a:0 ? a:1 : '' )
if ! a:0
exec "normal \<c-T>"
endif
let l:tagfile = expand ('%:t')
let @* = expand ('<cword>')
python import urllib
let @* = pyeval ('urllib.quote_plus ("' . @* . '")')
let @* = printf ('http://vimhelp.appspot.com/%s.html#%s', l:tagfile, @*)
endfunction
command! -nargs=? -complete=help H call Help2Url(<f-args>)
noremap ; :
noremap , ;
noremap < :tabp<CR>
......@@ -128,28 +142,6 @@ if empty($MAN_PN) && @% == "" && getcwd() == "/tmp"
silent find test.*
endif
" function LookupFiles ()
" python <<EOF
" from os.path import *
" from vim import *
" current_file = eval ('expand("%")')
" current_index = str (current.buffer.number)
" PATHS = ['~', '~/.vim', '/etc']
"
" if current_file != '' and not isfile (current_file):
" for p in map (expanduser, PATHS):
" f = join (p, current_file)
" if isfile (f):
" command ('bad ' + f)
" command ('bd ' + current_index)
" command ('bl')
" # command ('silent keepalt file ' + f)
" break
" EOF
" endfunction
"
" autocmd BufWinEnter * nested call LookupFiles()
" From http://vi.stackexchange.com/questions/2009/
function! FindInPath(name)
" Force creation of new file for paths beginning with ./
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment