<ul
and then press a key, e.g. TAB, it would automatically be
expanded to this:
<ul><li> </li></ul>
^
cursor here
I've gotten spoiled by this in Dreamweaver, but I'm really trying
to escape from Dreamweaver and would love to just use Vim.
Any tips for efficient HTML editing are welcome.
Thank you,
Nancy
PS - I know this is a general Vim question rather than a MacVim
question, but I'm starting here because I mainly use MacVim and
this is where I learned about Omni Completion.
Lowtech solution:
:iabb ul <ul><li></li></ul><C-o>13h
After that, `ul` gets replaced by what you wrote. You might also want
to check out the snippets plugin: http://www.vim.org/scripts/script.php?script_id=1318
I haven't used it, but I heard good things about it.
Nico
I know the Vim-LaTeX plugin comes with the ability to do exactly this. I
use it with LaTeX all the time.
From what I understand, it improves upon what's already in Vim. So, I
HIGHLY recommend you go to the main Vim list (or a FAQ).
--Ted
--
Ted Pavlic <t...@tedpavlic.com>
http://www.vim.org/scripts/script.php?script_id=1697
IMHO, this plugin should be included in the vim distribution (just as
matchit is).
Matt
>
> Thanks to travis's post, I learned about Omni Completion. I've
> been experimenting with it and it's not really what I want for
> HTML editing and I wonder if you all could point me to some
> features or scripts that would get Vim to do the following: When
> I type the beginning of a tag, e.g.:
>
> <ul
>
> and then press a key, e.g. TAB, it would automatically be
> expanded to this:
>
> <ul><li> </li></ul>
> ^
> cursor here
http://www.vim.org/scripts/script.php?script_id=1318
D.Morel
Thank you all for all your excellent suggestions. I now need to
find some time to experiment with all these!
Long live Vim!
Nancy