" File : EasyHtml.vim " Last Change: 2001 Dec 02 " Maintainer: Gontran BAERTS " Version: 0.4 " " Please don't hesitate to correct my english :) " Send corrections to " "----------------------------------------------------------------------------- " Description: With EasyHtml, you no longer need to look for tags attributes, " attributes values or CSS properties values while editing HTML files. " EasyHtml let you select the right attribute or value by showing you an " attributes/values list for the tag/attribute/CSS property 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, or CSS property word and hit key. " Use : " " - h,j,k,l or ,,, keys to change selected " item. " - / or , keys scroll list one page " downward/forward. " - or select the first item. " - or select the last item. " - add selected item and exit from items list. " - q or to exit without adding selected item. " " 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 items list at left " or right of current buffer. By default, use splitright setting. " " Set g:eh_singlequote variable to 0 or 1 to use double or single quote when " adding attributes (For example id="" or id='') " " Set g:eh_incsearch variable to 0 or 1 to dis- or en-able incremental list " search. This feature allows to select an item by typing its beginning. When " this is enable, 'q', 'h', 'j', 'k' and 'l' keys aren't used to exit from list " and to move highlighting. Use 'Q', '', '', '' and '' " instead. " "----------------------------------------------------------------------------- " Updates: " in version 0.4 " - Added values for the "style" attribute (CSS2 properties) " - Added values for CSS2 properties " - and are now usable to move highlight through the list " - When adding a value for an attribute, current attribute value (if exists) " is replaced by the selected one, except for "style" attribute for which " values are append " - Set g:eh_singlequote variable to 0 or 1 to use double or single quote when " adding attributes (For example id="" or id='') " " 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 if !exists("g:eh_singlequote") let g:eh_singlequote = 0 endif :nmap :call LaunchEasyHtml() :imap :call LaunchEasyHtml() "** " Script Variables: "** let s:srch = "" let s:maxAttrLength = 0 let s:currentPos = 2 " HTML tags and their attributs 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 = "