vim

Vim (Vi IMproved), a command-line text editor, provides several modes for different kinds of text manipulation. Pressing `i` enters insert mode. `<Esc>` enters normal mode, which enables the use of Vim commands. More information: <https://www.vim.org>.

Install

All systems
curl cmd.cat/vim.sh
Debian Debian
apt-get install vim
Ubuntu
apt-get install vim
Alpine
apk add vim
Arch Arch Linux
pacman -S vim
image/svg+xml Kali Linux
apt-get install vim
CentOS
yum install vim-enhanced-2
Fedora
dnf install vim-enhanced-2
Windows (WSL2)
sudo apt-get update sudo apt-get install vim
OS X
brew install vim
Raspbian
apt-get install vim
Docker
docker run cmd.cat/vim vim powered by Commando

Vim (Vi IMproved), a command-line text editor, provides several modes for different kinds of text manipulation. Pressing `i` enters insert mode. `<Esc>` enters normal mode, which enables the use of Vim commands. More information: <https://www.vim.org>.

  • Open a file:
    vim path/to/file
  • Open a file at a specified line number:
    vim +line_number path/to/file
  • View Vim's help manual:
    :help<Enter>
  • Save and Quit:
    :wq<Enter>
  • Undo the last operation:
    u
  • Search for a pattern in the file (press `n`/`N` to go to next/previous match):
    /search_pattern<Enter>
  • Perform a regular expression substitution in the whole file:
    :%s/regular_expression/replacement/g<Enter>
  • Display the line numbers:
    :set nu<Enter>

© tl;dr; authors and contributors