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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:58:48+00:00 2026-05-31T10:58:48+00:00

In studying VIM functions to learn to write my own I see that commands

  • 0

In studying VIM functions to learn to write my own I see that commands are sometimes written preceded with the keyword normal:

normal mz

Sometimes with the normal wrapped in an exec:

exec "normal mk"

Or sometimes alone on the line;

0d

Where in the fine manual is this addressed?

  • 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-31T10:58:50+00:00Added an answer on May 31, 2026 at 10:58 am

    You’re getting confused with the various modes. More specifically, the command
    mode and normal mode.

    Command mode is where the ex commands are applied, the commands that begin
    with a colon. VimScript files are just a sequence of ex commands.

    When you need to perform a normal mode command while in ex mode (command mode)
    you use the :normal ex command, which executes the arguments as they would
    be in normal mode.

    When you execute command directly, well, you’re executing it directly. In your
    example, the :d command was used with a range. That’s not the same as the
    d key in normal mode, that’s another entirely different command. Check the
    help for :d and d (the normal command).

    The :execute is useful to build a command as a string and execute it as an
    ex command. In your example, it’s useless. But it becomes handy in other
    cases, as an example when you have a variable holding a line number and wants
    to use its value in a command:

    :let i=4
    :exec "2," . i . "d"
    

    Which is just the same as

    :2,4d
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i studying TDateTime functions and procedure, but not found something that allow me to
Since I started studying object-oriented programming, I frequently read articles/blogs saying functions are better,
While studying the Collection API, we find that some methods ( add , remove
Im studying inline functions in C++ and have come to a section concerning limitations
While studying the Qt framework, I've noticed that it's littered with hundreds of overloaded
Im studying some ruby code and I see this varx variable being used with
While studying a software methodologies, I often see disclaimers along the lines of This
I am studying business models and UML. I read that a 'Model' is a
while studying some security things, there was a question that one can guess the
when studying RMI sometimes (head first Java) dudes use Naming.rebind(name, object) but other peoples

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.