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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:32:23+00:00 2026-05-29T20:32:23+00:00

A few micro-questions regarding normal!, incsearch and the / operator (search) . I’m not

  • 0

A few micro-questions regarding normal!, incsearch and the / operator (search). I’m not solving any particular problem here, just trying to understand the relations between the mentioned, so I can put up some sort of analogy in my head.

If I have, set incsearch on, while in normal mode upon pressing /something Vim will jump to the first instance of something even before/without me pressing enter.

Okey, so normal! /something should do the same thing. Why doesn’t it?

Similarly, normal! doesn’t recognize special characters. So if I have a text file with this text in it,

something<cr>

(that’s not a special character in there, but literally typed in text)

`normal! /something<cr>`

should put me up to that text. Why doesn’t it?

I like it, but sometimes Vim’s inconsistencies are, to put it mildly, most interesting 🙂

  • 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-29T20:32:23+00:00Added an answer on May 29, 2026 at 8:32 pm

    In :help :normal the relevant text is:

    {commands} should be a complete command.  If
    {commands} does not finish a command, the last one
    will be aborted as if <Esc> or <C-C> was typed.
    

    The command string you give to normal has to be a complete command, or it aborts. However, normal! /something isn’t complete; if you were typing it, Vim would be waiting for you to finish. You could press Esc or Ctrl–C to abort. Or you could complete it by pressing Enter. So the command isn’t complete and it aborts, instead of jumping. To get it to complete, give it the Enter it wants (at the command line):

    :normal! /something^M
    

    You can get the ^M by typing Ctrl–V and then Enter. (If on Windows and Ctrl–V pastes, use Ctrl–Q.) Then you’ll need to press Enter again to finish the whole command. If you were using execute you could do it with:

    :execute "normal! /something\<cr>"
    

    Be sure to use double-quotes so the \<cr> will be interpreted correctly.

    I believe your second question is the same thing. The literally typed <cr> doesn’t affect this situation, you just need to provide the carriage return that will complete the search command, or normal aborts it.

    Since you’ve tagged this question with vimscript, I’m guessing that at least part of your interest is in using this in a script. Getting the literal carriage return into a script and having it work right is kind of a pain. In those cases, I would use execute as shown above, so you can use the double-quote interpretted string method of getting the carriage return.

    As for incsearch, it won’t have an effect because you can’t be partially searching with normal, as we’ve seen. You can only submit the entire search. It will, however, update the most-recent-search register "/, so highlighting will still update correctly.

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

Sidebar

Related Questions

I've asked a few questions on this topic before. Before we're able to implement
I worked on 8051 micro controllers, a few months before, and found it quite
I know that the .NET memory model (on the .NET Framework; not compact/micro/silverlight/mono/xna/what-have-you) guaranteed
I've been using the EventAggregator from Caliburn.Micro for a few weeks now and really
I took a look at some questions here at stack overflow like this &
Few of us would deny the awesomeness of debuggers, but to make it more
Few months ago, I have came across a Silverlight tutorial of Eric Cartman (South
Few basic doubts I have: 1. Is primary key column automatically indexed? 2. What
few days ago i asked about how to get all running processes in the
A few weeks ago, I was assigned to evaluate all our programmers. I'm very

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.