au FileType html,xhtml comp tidy
au FileType php comp php |
\ :abbrev function /**<CR> Description<CR><CR>@param<CR>@return<CR><BS>/<CR><ESC>A<CR>function() {<CR>}<ESC>kwi |
\ :abbrev elseif elseif () {<CR>}<ESC>kwa
au FileType php,c,cpp,java :abbrev if if () {<CR>}<ESC>kwa|
\ :abbrev else else {<CR>}<ESC>O|
\ :abbrev /** /**<CR><CR>*/<ESC>kA |
\ :abbrev switch switch ( ) {<CR><CR><TAB>case 'foo' :<CR>break;<CR><CR>default :<CR>break;<CR>}<ESC>7kwa|
\ :abbrev do do {<CR>} while ();<ESC>hi|
\ :abbrev while while () {<CR>}<ESC>kwa|
\ :abbrev for for () {<CR>}<ESC>kwa; ; <ESC>3hi
" now to the nasty bits -- noone wants to type THAT.
au FileType html,xhtml,php :abbrev DOXTRICT <?xml version="1.0" encoding="utf-8"?><CR><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<CR><TAB>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><CR><BS><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><CR></html><ESC>O|
\ :abbrev DOXTRANS <?xml version="1.0" encoding="iso-8859-1"?><CR><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<CR><TAB>"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd"><CR><BS><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><CR></html><ESC>O|
\ :abbrev DOHTRICT <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"<CR><TAB>"http://www.w3.org/TR/html4/strict.dtd"><CR><BS><html><CR></html><ESC>O|
\ :abbrev DOHTRANS <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"<CR><TAB>"http://www.w3.org/TR/html4/loose.dtd"><CR><BS><html><CR></html><ESC>O"http://www.w3.org/TR/html4/loose.dtd"><CR><BS><html><CR></html><ESC>O