LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-05-2009, 08:08 AM   #1
bartmag2
LQ Newbie
 
Registered: Dec 2008
Posts: 3

Rep: Reputation: 0
Vim and macro recording with slash


Lets say, that I've editing text "foo" in Vim (pure version 7.2, without plugins or .vimrc), and recording macro, to transform "foo" into "<h2>foo</h2>". To do that, I press "qa", then I've got message "recording" at bottom Vim's window. After editing, I press once again "q" to stop recording. When I enter in vim ":@a" to play macro, there's error "E488: Trailing characters i<h2></h2>". The reason is, I think, that there's slash in macro, but it means, that there's no way to record macro with simple HTML text (without any plugins, like surround.vim).

Is there any solution for this?
 
Old 02-05-2009, 07:41 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,415

Rep: Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785
As it says here http://vimdoc.sourceforge.net/htmldoc/usr_10.html#10.1 , you don't use

:@a

just

@a
 
Old 02-06-2009, 04:20 AM   #3
bartmag2
LQ Newbie
 
Registered: Dec 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chrism01 View Post
just

@a
Thanks ... RTFM as always
 
  


Reply

Tags
macro, vim


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
LXer: Vim tips: Using Vim mappings and abbreviations LXer Syndicated Linux News 0 06-18-2006 02:54 PM
LXer: Cream for Vim - Making Vim more user friendly LXer Syndicated Linux News 0 06-18-2006 12:54 AM
Basic difference between / (slash) and /root (slash root) ? tofee Linux - Newbie 2 03-24-2006 05:04 AM
is it possible to create vim macro to..... hedpe Linux - Software 1 06-16-2005 09:41 PM
#defining a macro inside a macro? saravkrish Programming 1 05-24-2005 10:48 PM

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

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