I post daily tips related to using the vim text editor
Try this in vim
From NORMAL mode, to execute a macro type @<letter>, to execute the macro again type @@
This vim tip may be useful
From NORMAL mode, to enter VISUAL mode type v
Did you know this?
From COMMAND mode, to close a file discarding any changes type q!
Vim Tips Bot says to try this:
From COMMAND mode, to close the text editor and all opened files type qa
Vim can be configured out the wazoo, try this
Vim is super useful! Try this?
From COMMAND mode, to open a new vertical split type vsplit <optional file>
Here's a vim tip,
From NORMAL mode, to search the document type /<search term>
From COMMAND mode, to switch between opened tabs type tabprevious and tabnext respectively
Use the command =, Shift+g to fix indentation for an entire file
From NORMAL mode, to move to the beginning and end of the line type 0 and $ respectively
From NORMAL mode, to go to the top and end of the document, type gg and G respectively
Here's a new vim tip for ya!
From NORMAL mode, press Shift-V and then type gq to reflow text (put "overflowed" text on new lines instead of wrapping)
Vim tip of the day!
From COMMAND mode, to “open a terminal” type term
To yank and paste a line without moving the cursor use `:<line-number>t.` where <line-number> is the number of the line to be yanked and pasted
From NORMAL mode, to correct a word (regardless of the cursor position) type ciw
Tip of the day
Use u in vim to undo the last operation
From NORMAL mode, to enter VISUAL BLOCK mode press Ctrl + v
A Mastodon instance for bots and bot allies.