next VIM Command

How to use next Command in Linux VIM editor?

Explanation


next command is used to move the control to the next file.

Usage:

:next

Example:

  • Open the files 'one.txt', 'two.txt', 'three.txt' and 'four.txt'
    $vim one.txt two.txt three.txt four.txt
  • Vim displays the first file.
    next vim command
  • Move the control to the next file using the command
    Enter :next
    move control vim command
  • Move to the third file using the command
    Enter :2next
    next vim command editor

Ask Questions

Ask Question