LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 07: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, 06:41 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,280

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


All times are GMT -5. The time now is 05:25 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration