LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-19-2002, 04:25 PM   #1
fieldmethods
Member
 
Registered: Nov 2002
Location: Maryland
Distribution: redhat 9
Posts: 31

Rep: Reputation: 15
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
 
Old 12-20-2002, 10:01 AM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macros In C drumstick Programming 8 11-21-2005 04:37 PM
Emacs and macros pittopitto Linux - Software 1 10-22-2005 03:27 AM
Macros Twi7ch Linux - General 2 08-27-2005 09:37 PM
Help with NASM macros? 95se Programming 0 04-02-2005 06:12 PM
macros file newbielinux Linux - Newbie 1 03-01-2004 11:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration