{{ScriptComments|closetag:functionsandmappings to close open HTML/XML tags}}
−
'''1)Leavethecursor just before the close tag.'''
+
==Possibletweaksforclosetag.vim==
+
*Leave the cursor just before the close tag. This way you can invoke the close tag just after typing the opening tag, leaving the cursor automatically in the middle for filling the tag with the content.
−
This way you can invoke the close tag just after typing the opening tag, leaving the cursor automatically in the middle for filling the tag with the content.
+
Change the line:
+
<pre>
+
return "</".tag.">"
+
</pre>
+
to:
+
<pre>
+
return "</".tag.">\<esc>bbli"
+
</pre>
−
Change the line:
+
*UseCtrl+>insteadof Ctrl+_ for invoking the script. It's faster, as > is the last character you type in the opening tag and you already have the finger there!
−
return "</".tag.">"
−
with:
+
Inthescript replace <C-_> with <C-\>. --March 31, 2012
−
return "</".tag.">\<esc>bbli"
−
+
==Comments==
−
−
'''2) Use Ctrl+> instead of Ctrl+_ for invoking the script'''
−
−
Is faster, as > is the last character you type in the opening tag and you already have the finger there! :-)
Leave the cursor just before the close tag. This way you can invoke the close tag just after typing the opening tag, leaving the cursor automatically in the middle for filling the tag with the content.
Change the line:
return "</".tag.">"
to:
return "</".tag.">\<esc>bbli"
Use Ctrl+> instead of Ctrl+_ for invoking the script. It's faster, as > is the last character you type in the opening tag and you already have the finger there!
In the script replace <C-_> with <C-\>. --March 31, 2012