Don't like ads? PRO users don't see any ads ;-)
Guest

vim syntax highlighting for story posts

By: SimonSunfire on Jul 4th, 2012  |  syntax: VIM  |  size: 0.70 KB  |  hits: 85  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. " Vim syntax file
  2. " Language:i    Text for image board story posts
  3. " Maintainer:   Simon Sunfire
  4. " Last Change:  July 4, 2012
  5. " Version:      1
  6.  
  7. " How to install - save as txt.vim to your vim install's syntax folder
  8. " Add the line below (minus opening quote mark) to your .vimrc:
  9. " autocmd BufRead,BufNewFile *.txt set filetype=txt
  10.  
  11. if exists("b:current_syntax")
  12.   finish
  13. endif
  14.  
  15. setlocal iskeyword+=:
  16. syn case ignore
  17.  
  18. syn region greenQuote   start=/"/  end=/"/
  19. syn region greenText    start=/^>/ end=/$/ contains=greenQuote
  20. syn region quote        start=/"/  end=/"/
  21. highlight link quote     String
  22. highlight link greenQuote Statement
  23. highlight link greenText Type
  24.  
  25. let b:current_syntax = "txt"