Wikia

Vim Tips Wiki

Changes: Script:2930

Edit

Back to page

(standard format)
(Comments)
 
Line 2: Line 2:
   
 
==Comments==
 
==Comments==
  +
  +
==Detect drafts==
  +
  +
Used this to detect draft files (without ext) too:
  +
  +
if expand('%:t') =~? 'rfc\d\+' || expand('%:t') =~? 'draft-.*-\d\{2,}'
  +
setfiletype rfc
  +
endif

Latest revision as of 10:31, April 7, 2014

Use this page to discuss script 2930 rfc syntax: simple syntax highlight for RFC file

  • 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.

CommentsEdit

Detect draftsEdit

Used this to detect draft files (without ext) too:

   if expand('%:t') =~? 'rfc\d\+' || expand('%:t') =~? 'draft-.*-\d\{2,}'
       setfiletype rfc
   endif

Around Wikia's network

Random Wiki