include $PKGDATADIR/binding/default
include $PKGDATADIR/color/light
include $PKGDATADIR/compiler/gcc
include $PKGDATADIR/compiler/go
include $PKGDATADIR/filetype

alias cl close
alias o open
alias q quit
alias r replace
alias s save
alias t tag
alias man "run man"
alias make "compile gcc make"
alias read "pass-through cat"

# format quoted text in email messages
alias fmt-email "filter fmt -w 74 -p '> '"

option gitcommit,gitrebase file-history false
option -r '/\.git/.*\.diff$' file-history false
option diff,mail ws-error 0
option make indent-width 8 expand-tab false emulate-tab false

option c,css,go,java,javascript,php,sh brace-indent true

option c      indent-regex '^\s*(case|default|do|else|for|if|while)\b'
option java   indent-regex '^\s*(case|default|do|else|for|if|while)\b'
option php    indent-regex '^\s*(case|default|do|else|for|foreach|if|while)\b'
option python indent-regex ':\s*(#.*)?$'
option sh     indent-regex '(^\s*|;\s*)(do|else|then)\b'

# gray background for current line
#hi currentline keep gray keep

errorfmt grep "^([^:]+):([0-9]+):(.*)" file line message

# Remove possible "F" from $LESS so that less will always wait for
# keypress and "run" can be used without -p.
#
#   R: allow ANSI colors
#   S: chop long lines
setenv LESS RS
