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 check Command Line Tools Version [Updated for Ventura]
- Trigger Notification Center Message using Mac Terminal Command
- [macOS] How to search or view previous terminal command history
- Show/Hide Hidden Files and Directories on Mac Finder
- How to clear Mac Terminal screen
- Setting JAVA_HOME in macOS Big Sur
- How to find files taking up space on your Mac
- How to Show Battery percentage on Big Sur Menu Bar
- How to uninstall Microsoft Outlook on Mac
- Move from Zsh to Bash shell macOS
- Install Native Golang on M1/M2 ARM based Mac
- Shutdown Mac Terminal Command
- How to Refresh Mac Desktop
- How to Set Background Wallpaper on macOS 13 Ventura
- The Zsh Shell - Mac Tutorial
- Installing brew on M1/M2 ARM Mac
- Display Seconds in Digital Clock on Mac Menu Bar [macOS]
- How to Increase Mac Terminal Buffer Size
- Add Sketch from iPhone to MacBook with macOS Monterey
- How to view the desktop when using macOS Stage Manager?
- [fix] App store not working on Mac, Blank Black or White Screen
- [fix] How to Show file extensions on all files on Mac
- Limit scrollback rows in macOS Terminal
- How to open terminal on Mac to run commands
- Set Custom Background Wallpaper on Mac Terminal (macOS Ventura)
- Upload Pdf file using PHP Script - PHP
- How to minimize all Windows in Mac - MacOS
- Remove Html head and body tags from ckeditor source - Html
- How to pass value to another Power Apps screen - PowerApps
- How to Gzip a file directory on Mac OS X using Terminal Command - Mac-OS-X
- Copy all .vcf Mobile Contacts files into one .vcf - HowTos
- Binary, Decimal, Octal, and Hexadecimal Numbers Tables - 2022
- Indent XML Formatting In Notepad++ - NotepadPlusPlus