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 list all users in Mac Terminal
- Docker Desktop needs privileged access macOS
- Mac: How to show count of files and folders in Finder
- How to Change Background Color TextEdit on Mac
- How to adjust MacBook Desktop icons size
- Test internet speed using macOS Terminal command
- How to change the default font and text size in Microsoft Excel for Mac
- How to install Java on macOS [Big Sur]
- How to come out of dquote prompt in Terminal - macOS/Linux
- How to Increase MacBook Trackpad Cursor Speed on macOS Ventura/Sonoma
- Fix: Microsoft Excel Quit Unexpectedly on Mac
- How to Adjust macOS System Font Size
- How to Quit Applications on Mac Using Terminal
- How to check zsh installed version using terminal
- Two Ways to Extract rar (*.rar) files on Mac
- How to Right Click on Mac Desktop?
- How to Add Brew to PATH M1/M2 Mac
- How to search (find) in macOS Terminal Console Text
- macOS 13 Ventura - The New About this Mac Window
- TextEdit Get the count of lines in a file
- How to run .sh file in Mac Terminal
- Google Search Hot Trends Screensaver for Mac OS X
- Check Reboot History Mac
- [Solution] Mac Update Stuck Preparing macOS Ventura 13.0 About 30 minutes remaining
- Display Safari URL address link on hover
- Unable to connect to the Internet : Google Chrome - Chrome
- How to Identify installed PowerShell version - Powershell
- Fix - sudo: systemctl: command not found - Ubuntu
- Microsoft Lists and SharePoint Online edit grid view - use undo and redo changes - SharePoint
- Bash: Command to Find the Length of a String - Bash
- [Solution] Java JDBC SQLException: No value specified for parameter 1 - Java
- How to Sort an ArrayList in Java using Comparator - Java
- Word wrap text in Notepad++ - NotepadPlusPlus