Vim Tips Wiki


1,624pages on
this wiki
Add New Page

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
  • This page may be out of date: check the script's page above, and its release notes.


Braces around URLsEdit

Often I got urls in the format ( or (see 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
      call Utl_trace("- found braces around url, removing.",1,-1)
      return substitute(url, '^[(]\?\(.*\)[)]\+$', '\1', 'g')

Windows 8 upper case drive letters not recognizedEdit

Utl throws an E303: Unable to open swap file for "\\D:\..." error on Windows 8 (and maybe 7) in Utl_displayFile. These OSes deliver Upper Case drive letters instead of Lower Case (as in XP), so a small change needs to be made to the utl_scm.vim file around line 146 in Utl_AddressScheme_file(), as per this unified context patch:

--- utl_scm.vim~	2014-07-09 22:51:08.878648600 -0600
+++ utl_scm.vim	2014-07-09 23:48:28.155056000 -0600
@@ -143,7 +143,7 @@
     " - server name - interpret URL as a network share
     let authority = UtlUri_authority(a:auri)
     let path = ''
-    if authority =~? '^[a-z]:$'
+    if authority =~? '^[A-Za-z]:$'
         if has("win32") || has("win16") || has("win64") || has("dos32") || has("dos16")
 	    call Utl_trace("- Am under Windows. Server part denotes a Windows drive: `".authority."'")
 	    let path = authority

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.