LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-12-2006, 06:14 PM   #1
alexisb
LQ Newbie
 
Registered: Jun 2003
Location: Lima, Peru
Distribution: Fedora Core 3
Posts: 17

Rep: Reputation: 0
Saving Macros in vim


Hi, I have assigned an often used combination of keys to a macro in vim, it's very simple, go to start of line and insert /* , then go to end of line and append */, basically this comments a line like:

Code:
var a=anything;
and put it like:

Code:
/*var a=anything;*/
I used qa to record my macro so I can call it with @a, I know, it's really basic, I have started with vim just one month ago, but still quite useful.

I want to know if this and other macros I create are saved somewhere so I can use them with any file whenever I want or I have to explicitly save them in some file.

I've read most of the manual and googled for it but couldn't find a precise answer.

Any ideas?

Thanks!
 
Old 01-12-2006, 06:42 PM   #2
zhy2111314
Member
 
Registered: Aug 2005
Location: China
Distribution: redhat(Fedora Core)->Debian Sid->Slackware
Posts: 91

Rep: Reputation: 15
You can check this :
http://www.vi-improved.org/tutorial.php#macros
And I did the things they said, when I define a macro following their idea and after restarting vim it also works, so you can try.
 
Old 01-12-2006, 06:50 PM   #3
alexisb
LQ Newbie
 
Registered: Jun 2003
Location: Lima, Peru
Distribution: Fedora Core 3
Posts: 17

Original Poster
Rep: Reputation: 0
Hi, thanks a lot!, I'll take a look
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
NEdit macros theonebeyond Linux - Software 2 05-29-2018 06:04 PM
Macros In C drumstick Programming 8 11-21-2005 04:37 PM
Macros Twi7ch Linux - General 2 08-27-2005 09:37 PM
keystroke macros squip Programming 1 10-09-2003 12:46 PM
saving and not saving sessions on desktop ergo_sum Linux - Newbie 2 09-26-2003 07:27 AM

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

All times are GMT -5. The time now is 06:41 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