LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Html macros in Vi (https://www.linuxquestions.org/questions/linux-software-2/html-macros-in-vi-38901/)

fieldmethods 12-19-2002 04:25 PM

Html macros in Vi
 
Hi,

I use vi as my text editor. I've spent a lot of time on the web trying to find macros for writing HTML, and I haven't succeeded.

The most useful thing for me would be to be able to do this:

A small command, let's say :link

which would print out

<a href http="^">*</a>

Which would first put my cursor at ^, so I could enter the address, and then (maybe after tabbing?) move my cursor to *, where I could enter the anchor text.

This alone would save me much grief, but I suspect that there are more general vi tricks that would help with lists, div's, etc.

A link to docs would be fine -- the built-in help only seems to talk about syntax highlighting (unless I'm missing something?) .

Thanks ahead of time,
Pat

crabboy 12-20-2002 10:01 AM

The default vi editor in Linux is usually elvis and as far I as can tell it does not support macros. The vim editor, which should be installed, is another vi clone that does support macros. I took a quick look at it and looks like there are tons of html macros already created. Do a google search on "vim macros" and you will get all the info you need.


All times are GMT -5. The time now is 02:41 PM.