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
- [macOS] How to search or view previous terminal command history
- [Eclipse] Locate Preferences in macOS
- macOS Big Sur compatible Macs List
- How to connect Airpods to Macbook Air or Pro?
- Display ls command file sizes in KB (kilobytes) MB (megabytes) or GB (gigabytes) [Linux/macOS]
- [macOS] Change homepage Macbook Safari Browser
- [Vi/Vim] How to move cursor to the start of a line
- bash: command not found error [macOS Terminal Linux, Unix or Windows]
- Set Python 3.8 as a default python version on macOS
- 30+ Zoom video communications application shortcuts for macOS
- say command macOS terminal examples
- Mac (macos) startup keyboard boot sequence combinations
- Cut, Copy and Paste keyboard commands on mac
- Change Android Toast background color - Android
- [Solved] Dynamic Web Module 3.0 requires Java 1.6 or newer Mac OSX - Mac-OS-X
- java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. - Android
- Android appcompat_v7 Error retrieving parent for item: No resource found that matches the given name - Android
- SharePoint Open in the client application document opens in browser - Java
- How to redirect SharePoint Site Collection to different URL - SharePoint
- Duplicate id @+id/textView1, already defined earlier in this layout Android Error - Android
- Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end users experience - Java
- Integrating Android Facebook SDK 3.17.2 Tutorial - Android
- SharePoint CAML query error - The XML source is not correct - SharePoint
- 32 css cursors web developers must know - CSS
- Failed to load resource: net::ERR_CACHE_MISS PHP - PHP
- 403 forbidden error for Image - PHP
- Struts 2 : There is no Action mapped for namespace [/] and action name [form] associated with context path [/proj] - Java
- How To Disable Landscape Mode in Android Application - Android