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 8206541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:42:34+00:00 2026-06-07T08:42:34+00:00

I know this is going to sound like a nit-picky question that isn’t very

  • 0

I know this is going to sound like a nit-picky question that isn’t very important, but it actually proves to be a source of frustration for me.

Occasionally I will use the dot operator “.” on a pointer type when I meant to use an arrow “->”. To fix it, I usually need to change just 2-3 dots to arrows, but I can’t seem to find a way to do this in vim that doesn’t take a relatively large amount of keystrokes for the amount of text I am changing.

For example, I could do:

:lineNum,lineNum s/\<objectName\>\./->/g

But that is quite a lot of typing if there are only 2-3 instances.

Alternatively, I can use jkhl to navigate to each period, and do:

r-a><ESC>

But five keystrokes for each one seems like torture after using jkhl to find all three, as well as the mental context switch that comes with entering and exiting insert mode so quickly.

How do you change your dots into arrows? Have you found a method that is faster?

  • 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-06-07T08:42:36+00:00Added an answer on June 7, 2026 at 8:42 am
    /\.<CR>
    s-><ESC>
    n.
    n.
    

    … etc …

    each n goes no the next expression you searched for, and each . repeats the substitution of the dot with an arrow. mix and match ns and dots as needed.

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

Sidebar

Related Questions

I know I am going to sound very noobish for asking this question BUT
I know this is going to sound like a dumb question, but as I'm
Well this is going to sound like a lame question, I know. This is
Ok I know this is going to sound weird but it is what the
This is going to sound like an odd request, but... I have a web
OK, this is going to sound like a crazy idea - but I'm interested
This is going to be a very simple question, I have code that looks
I know this may sound silly, but I'd like to put a version in
This might sound like a silly question to many of you, but it keeps
I know this is going to be something simple that I'm just missing somehow,

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.