
Vi/Vim is the most popular text editor for all Linux and Unix-based distributions.
Unfortunately, Ctrl+A keyboard shortcut does not work with vim, If you want to select all the text in a file you have opened on vi editors follow the below steps,
- Press the g button twice: gg - this will take the cursor to the start of the file.
- Now Press Shift + v to move to visual mode.
- Now Press Shift + g to move the end of the last line of the file.
> gg Shift+v Shift+g
You can also use :1 instead of gg
:1 Shift+v followed by Shift+g
-
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to Linux,
- Rename a directory using Linux/Unix command
- ls command to list only directories
- How to Restart or Reload Nginx Server Service on Linux
- 3 ways to clear screen on Linux Terminal
- ls command: sort files by name alphabetically A-Z or Z-A [Linux/Unix/macOS/Bash]
- Copy entire directory using Terminal Command [Linux, Mac, Bash]
- Fix: sudo: unable to open Read-only file system
- Create Hidden File or Directory using Shell Command
- Command to know the installed Debian version?
- The Date Command and its usage [Linux - Unix - macOS]
- Fix - bash: man: command not found
- How to tar.gz a directory or folder Command
- How to Display content of a file in Terminal Screen?
- How to change bash terminal prompt string and color
- Sort ls command by last modified date and time
- Execute .bin and .run file Ubuntu Linux
- zsh hello world example
- How to check uptime of Linux/Unix/macOS system/server using console command?
- [Fix] Linux - bash: useradd: command not found
- Command to check Last Login or Reboot History of Users and TTYs
- How to install and Configure sar sysstat tools in Ubuntu Linux
- How to use SCP Command to Copy Directory
- Linux Remove or Delete Files and Directories using Terminal Commands
- How to connect to SSH port other than default 22
- Install OpenSSL on Linux/Ubuntu
More Posts:
- trurl: A new command-line tool for URL parsing and manipulation by cURL Developer - cURL
- Add Bookmark macOS Safari - MacOS
- Save TextEdit file as a PDF - MacOS
- Android : DeviceMonitor] Sending Tracking request failed! Error - Android
- How to install PowerShell on Mac using Brew - Powershell
- Create Nested Directories using Java Code - Java
- bash get year 2021 calendar - Bash
- Calculate Volume of Ellipsoid - C-Program