b VIM Command

How to use b Command in Linux VIM editor?

Explanation


This command is used to move the cursor to the previous word. The cursor will move to the first letter of the previous word. Here we can use numeric prefix to move cursor before multiple words together.

Usage:

b

Example:

  • Open the file test.txt using the command
    $ vim test.txt
  • You can view that the cursor is focused on the word 'country'.
    b VIM Command
  • To move the cursor to first letter of the previous word
    Press b
    Move Cursor to Previous word VIM
  • To move the cursor backward for multiple words
    Enter 3b
    b VIM Command Editor

Ask Questions

Ask Question