Wikia

Vim Tips Wiki

Changes: Script:293

Edit

Back to page

m (standard format)
 
Line 1: Line 1:
[[File:Placeholder|video|right|300px]] [[File:Placeholder|right|300px]]
+
{{ScriptComments|vutl.vim: Univeral Text Linking - Execute URLs, footnotes, open emails, organize ideas }}
   
 
==Improvements==
 
==Improvements==
Line 6: Line 6:
   
 
Therefore I added following lines to utl.vim around line 407:
 
Therefore I added following lines to utl.vim around line 407:
 
 
<code>
 
<code>
 
call Utl_trace("- end getting URL under cursor.",1,-1)
 
call Utl_trace("- end getting URL under cursor.",1,-1)

Latest revision as of 12:42, February 18, 2013

Use this page to discuss script 293 vutl.vim: Univeral Text Linking - Execute URLs, footnotes, open emails, organize ideas

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

ImprovementsEdit

Often I got urls in the format (http://www.vim.org) or (see http://www.vim.org). Urls with braces around or a brace at the end are not correctly recognized.

Therefore I added following lines to utl.vim around line 407:

   call Utl_trace("- end getting URL under cursor.",1,-1) 
   let tmpurl = matchstr(url, '^[(]\?.*[)]\+$')
   if empty(tmpurl)
     return url
   else
     call Utl_trace("- found braces around url, removing.",1,-1) 
     return substitute(url, '^[(]\?\(.*\)[)]\+$', '\1', 'g')
   endif

Around Wikia's network

Random Wiki