Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 852249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:33:47+00:00 2026-05-15T07:33:47+00:00

I have a macro that I use to replace special characters for its html

  • 0

I have a macro that I use to replace special characters for its html entities. I would like to save it in my .vimrc.

According to this, I should use let @r=’ macro_text_goes_here ‘. The problem is that my macro is a series of search and replace, something like this:

:%s:á:\á:Ige
:%s:é:\é:Ige
:%s:í:\í:Ige

So, I’ve tried with ^V-enter, <enter>, <CR> using real line breaks, but it never works. On the other side, if I put the text on a register and then run the macro, it works as expected.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T07:33:48+00:00Added an answer on May 15, 2026 at 7:33 am

    adding this to .vimrc works for me

    let @a=':%s/á/\&aacute;/g^M:%s/é/\&eacute;/g^M:%s/í/\&iacute;/g^M'
    

    note that ^M is a special character entered using Ctrl+V, Ctrl+M.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that used Macro. In this macro I would like to
I have a macro setup to automatically open/save a file that I am opening
Suppose I have a C++ macro CATCH to replace the catch statement and that
I want a macro that I can use like this: CREATE_URL(@{SOME-TOKEN}/some/url/path); The macro should
In a regular Java application, I have a BufferedImage that I would like to
I have a Word macro that needs to run using Java. So I use
i have a macro that i use to speed up the implementation of Factory
I would like to use create a object that contains regular expressions as the
I have a macro where I pass in an argument and use that define
I would like a macro or method to find and replace instance of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.