J.Doe J.Doe - 3 years ago 128
HTML Question

Automatically load heading page

Is there a simple way to ask

to automatically load the normal heading each time I create a

<!DOCTYPE html>
<title>Title of the document</title>

The content of the document......


Answer Source

The keyword you're after is "template".

See :h template.

You'll find explanations regarding how to initiate this in your .vimrc. However, it'll be a simple (and efficient) solution that won't automatically compute stuff on the fly. Search for a template expander plugin that suits you if this is what you want.

Some people prefer to load these templates on demand (and not automatically), and thus they are perfectly happy with snippet plugins. Some plugins do both (snippets on demand and templates on new files).

Any way, I'm quite sure this question already has answers here or on vi.SE. It may not be about HTML, but about LaTeX, C, php..., but in any case, the generic solutions apply identically.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download