Re: [vim ] 有自动完成html close tag的vim plugin吗

楼主: curist (SERIOUSLY!!!???)   2013-02-04 21:08:55
iabbr
:iabbrev </ </<C-X><C-O>
imap
:imap <C-Space> <C-X><C-O>
自动关tag plugin
xmledit: http://www.vim.org/scripts/script.php?script_id=301
AutoCloseTag: http://www.vim.org/scripts/script.php?script_id=2591
手动关tag plugin
closetag.vim: http://www.vim.org/scripts/script.php?script_id=13
ragtag.vim: http://www.vim.org/scripts/script.php?script_id=1896
个人这几个plugin都用过,但不太习惯...
现在是用从sublime text偷来的
autocmd FileType html inoremap
<expr> / (getline('.')[col('.')-2]=="<")?"/\<Lt>C-X>\<Lt>C-O>":"/"
效果同第一个iabbr </ </<C-X><C-O>,但不会在输入<时卡在那边
参考:http://vim.wikia.com/wiki/Auto_closing_an_HTML_tag
作者: Arim (象山下智久)   2013-02-05 10:24:00
感谢︿︿

Links booklink

Contact Us: admin [ a t ] ucptt.com