" File : EasyHtml.vim " Last Change: 2001 Nov 21 " Maintainer: Gontran BAERTS " Version: 0.3 " " Please don't hesitate to correct my english :) " Send corrections to " "----------------------------------------------------------------------------- " Description: With EasyHtml, you no longer need to look for tags attributes " while editing HTML files. EasyHtml let you select the right attribute by " showing you an attributes list for the tag under the cursor. " "----------------------------------------------------------------------------- " To Enable: Normally, this file will reside in your plugins directory and be " automatically sourced. If not, you must manually source this file " using :source EasyHtml.vim " "----------------------------------------------------------------------------- " Usage: To display the attributes/values list, move the cursor on the " tag/attribute word and hit key. " " - h,j,k,l or ,,, keys to change selected attribute. " - or select the first attribute. " - or select the last attribute. " - add selected attribute to tag and exit from attributes list. " - q or to exit without adding selected attribute. " " Deprecated attributes as declared by W3C are red highlighted, while right " attributes are blue highlighted. " " Set g:easyHtmlSplitRight variable to 0 or 1 to open attributes list at left " or right of current buffer. By defaut, use splitright setting. " "----------------------------------------------------------------------------- " Updates: " in version 0.3 " - Attributes list updated " - Don't display attributes list for closing tags " - Now, display values list when hitting with cursor on attribute word " (for some attributes only). " " in version 0.2.1 " - Fix global modifiable setting instead of local " " in version 0.2 " - Attributes list is now alphabetically sorted " - Hitting allows to display attributes list in Insert mode too " - Allows to select an attribute by incremental search :-) " For example, with tag, typing "onk" (normal mode) in the attributes " list buffer automatically select "onkeydown" attribute. Use backspace " () to remove characters. This behavior is enable by setting " g:eh_incsearch variable to 1. Warning : when incremental attribute search " is on, 'q', 'h', 'j', 'k' and 'l' keys aren't used to exit from list and " to move highlighting. Use 'Q', '', '', '' and '' " instead. " - Check for attributes list already opened, and reuse it " " in version 0.1 " - First version " Has this already been loaded ? if exists("loaded_easyhtml") finish endif let loaded_easyhtml=1 if !exists("g:easyHtmlSplitRight") let g:easyHtmlSplitRight = &splitright endif if !exists("g:eh_incsearch") let g:eh_incsearch = 0 endif :nmap :call LaunchEasyHtml() :imap :call LaunchEasyHtml() "** " Script Variables: "** let s:maxAttrLength = 0 let s:currentPos = 2 let s:coreattrs = "id=\"\" class=\"\" style=\"\" title=\"\"" let s:i18n = "lang=\"\" dir=\"\"" let s:events = "onclick=\"\" ondblclick=\"\" onmousedown=\"\" onmouseup=\"\" onmouseover=\"\" onmousemove=\"\" onmouseout=\"\" onkeypress=\"\" onkeydown=\"\" onkeyup=\"\"" let s:cellhalign = "align=\"\" char=\"\" charoff=\"\"" let s:cellvalign = "valign=\"\"" let s:attrs = "%coreattrs %i18n %events" let s:HTMLTags = "