If you are using Vi/Vim editor to read a text file and want to move your cursor to the first character of the line i.e. at the start of the line, you can make use of the ^ (caret) symbol on your keyboard,
Example:- Open your file in vi editor - vi myFile.txt
- Now be on the line you want to move to the start of.
- Press ^ character on your keyboard (mostly should Shift + 6 key)
- You would see your cursor moves at the first char of the line.
⚠️ Make sure that you are not in Insert Mode, or else you would see that the character ^ will get added to the text and this shortcut won't work, press Esc (Escape) key to come out of Insert Mode and then try the command.
⚡️ On Windows Operating system keyboard you can make use of Home and End keys as well to get this behavior.
Usecase: Imagine someone is working a terminal on a file that does not have a line break (\r \n) then it would be very difficult to get to the start of the line using the right and left arrow keys!
Hashtags: #vi #vim #viMacOs #macOS #viTips #viCommands
- How to show line numbers in Nano on Mac
- How to install Jupyter Notebook on macOS Sonoma
- How to Disable Remote Management using Mac Terminal
- Test internet speed using macOS Terminal command
- Docker Desktop needs privileged access macOS
- Google Search Hot Trends Screensaver for Mac OS X
- How to do calculations in Mac Terminal
- How to make TextEdit the default text Editor on Mac
- How to Show Full Website Address on Safari for Mac (Ventura/Sonoma)
- The Zsh Shell - Mac Tutorial
- Opening mac Terminal
- How to change the name of your Mac running on macOS Ventura 13
- How to find the Battery Cycle Count on macOS Ventura
- How to set an emoji as Zsh terminal prompt in macOS
- How to access Trash Folder using Mac Terminal Command
- macOS Ventura XCode Command Line Tools Installation
- Hide Bluetooth icon on Mac Menu Bar macOS Ventura 13
- How to run .sh file in Mac Terminal
- Terminal Command to get the list of available shells in macOS
- How to see Storage Information on macOS Ventura
- How to Go To /usr/local/bin on Mac Terminal?
- How to do screen recording on Mac
- How to Find File and Directory Size in Mac Terminal
- Open .bash_profile File in TextEdit using Terminal
- Remove Now Playing icon from macOS Big Sur Menu Bar
- How to open new Terminal using Bash Command - Bash
- Bash Command to Find String in a File - Bash
- Horizontally Center Align tag in HTML using CSS - CSS
- Find and Replace Multiple different words with the same word in a text file - NotepadPlusPlus
- How to Manage Profile Picture on Microsoft Teams - Teams
- Using Java 8 Month Enum with Examples - Java
- PowerShell: How to Write Output to a File - Powershell
- How to Find the Location of Notepad on Windows 11 - Windows