M VIM Command

How to use M Command in Linux VIM editor?

Explanation


This command is used to move the cursor to middle line of the file.

Usage:

M

Example:

  • Open the file test.txt using the command
    $ vim test.txt
  • You can view that the cursor is now focussed in the second line
    M VIM Command
  • To move the cursor to begining of middle line of the file
    Press M
    Move Cursor to Middle Line VIM

Ask Questions

Ask Question