Created
June 22, 2011 07:40
-
-
Save makestory/1039648 to your computer and use it in GitHub Desktop.
vim function for create xml/html tag.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# useage: | |
#copy code to your .vimrc | |
#when you edit text in line > I`m a title | |
#command :H h1 | |
#<h1>I`m a title</h1> | |
function! HtmlTag(tag) | |
normal $ | |
execute "normal! a</".a:tag.'>' | |
normal ^ | |
execute "normal! i<".a:tag.'>' | |
normal l | |
endfunction | |
com! -nargs=1 H :call HtmlTag(<f-args>) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment