Save as a file VIM Command

How to use Save as a file Command in Linux VIM editor?

Explanation


file command is used to create a new file with given name.

Usage:

:file <filename>

Example:

  • Open the file one.txt using the command
    $vim one.txt
    file vim command
  • Create new file with the name 'five.txt'
    Enter :file five.txt
    create a new file vim

Ask Questions

Ask Question