내용으로 건너뛰기
권남
사용자 도구
로그인
사이트 도구
검색
도구
문서 보기
이전 판
역링크
최근 바뀜
미디어 관리자
사이트맵
로그인
>
최근 바뀜
미디어 관리자
사이트맵
추적:
vim:xmledit
이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요.
====== XMLEdit ====== XML,HTML,SGML 편집 도우미 플러그인이다. * http://www.vim.org/scripts/script.php?script_id=301 ===== 단축키 ===== * ''%'' : 태그의 짝을 찾아 이동한다. * 태그를 쓰고 ''>'' 를 누르면 자동으로 닫힘 태그가 만들어진다. * 태그를 쓰고 ''>>'' 를 누르면 자동으로 닫힘 태그가 만들어지고, 태그의 중간에 한칸이 띄워지면서 커서가 글을 쓸 수 있는 위치로 이동한다. ===== HTML ===== * 이 기능을 HTML에서도 사용하려면, ftplug/html.vim 을 스스로 생성해서 넣어야 한다. * :help xml-plugin-html 로 html.vim 을 생성하는 방법을 알 수 있다. * ''HtmlAttribCallback'' 함수를 정의하면, 태그의 기본 attribute 들을 자동으로 완성해주게 할 수 있는데, [[vim:html|vim:html에서 소개한 Zen Coding]]을 사용할 경우 이 기능은 거의 불필요하다. * 나의 ftplugin/html.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>
vim/xmledit.txt
· 마지막으로 수정됨: 2010/12/27 01:35 저자
kwon37xi
문서 도구
문서 보기
이전 판
역링크
맨 위로