Skip to content

Instantly share code, notes, and snippets.

@pawelz
Created March 29, 2010 09:21
Show Gist options
  • Save pawelz/347641 to your computer and use it in GitHub Desktop.
Save pawelz/347641 to your computer and use it in GitHub Desktop.
" Filename: formfiller.vim
" Purpose: Vim syntax file
" Language: UZBL form
" Maintainer: Paweł Zuzelski <pawelz@pld-linux.org>
" URL: http://gist.github.com/347641
" Last Change: 2010/03/29
" Version: 1
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
" if version < 600
" syntax clear
" elseif exists("b:current_syntax")
" finish
" endif
syn keyword formfillerTodo contained TODO FIXME XXX
syn keyword formfillerType contained search radio checkbox text textarea password
syn match formfillerValue contained ':.*'
syn match formfillerState contained '{[^{}]*}'
syn match formfillerComment "^>.*" contains=formfillerTodo
syn match formfillerFormElement "^[^>].*:.*$" contains=formfillerType,formfillerState,formfillerValue
" Define the default highlighting.
" Only used when an item doesn't have highlighting yet
hi def link formfillerComment Comment
hi def link formfillerTodo Todo
hi def link formfillerFormElement NONE
hi def link formfillerType Comment
hi def link formfillerState Statement
hi def link formfillerValue Number
let b:current_syntax = "formfiller"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment