사용자 도구

사이트 도구


vim:xmledit

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

마지막 판 양쪽 다음 판
vim:xmledit [2010/12/27 01:21]
kwon37xi 새로 만듦
vim:xmledit [2010/12/27 01:34]
kwon37xi
줄 14: 줄 14:
   * 나의 ftplugin/html.vim : 현재는 도움말에 있는 것과 거의 같음.   * 나의 ftplugin/html.vim : 현재는 도움말에 있는 것과 거의 같음.
   * <code vim>   * <code vim>
 +" Vim script file                                       vim600:fdm=marker:
 +" FileType:   HTML
 +" Maintainer: Devin Weaver <vim (at) tritarget.com>
 +" Location:   http://www.vim.org/scripts/script.php?script_id=301
  
 +" This is a wrapper script to add extra html support to xml documents.
 +" Original script can be seen in xml-plugin documentation.
 +
 +" Only do this when not done yet for this buffer
 +if exists("b:did_ftplugin")
 +  finish
 +endif
 +" Don't set 'b:did_ftplugin = 1' because that is xml.vim's responsability.
 +
 +let b:html_mode = 1
 +
 +if !exists("*HtmlAttribCallback")
 +  function HtmlAttribCallback( xml_tag )
 +    if a:xml_tag ==? "table"
 +      return "id=\"\" class=\"\""
 +    elseif a:xml_tag ==? "link"
 +      return "href=\"/site.css\" rel=\"StyleSheet\" type=\"text/css\""
 +    elseif a:xml_tag ==? "frame"
 +      return "name=\"NAME\" src=\"/\" scrolling=\"auto\" noresize"
 +    elseif a:xml_tag ==? "frameset"
 +      return "rows=\"0,*\" cols=\"*,0\" border=\"0\""
 +    elseif a:xml_tag ==? "img"
 +      return "src=\"\" width=\"\" height=\"\" alt=\"\""
 +    elseif a:xml_tag ==? "a"
 +      return "href=\"\""
 +    elseif a:xml_tag ==? "form"
 +      return "id=\"\" action=\"\" method=\"post\""
 +    else
 +      return 0
 +    endif
 +  endfunction
 +endif
 +
 +" On to loading xml.vim
 +runtime ftplugin/xml.vim
 </code> </code>
  
vim/xmledit.txt · 마지막으로 수정됨: 2010/12/27 01:35 저자 kwon37xi