diff --git a/tech_docs/linux/vim.md b/tech_docs/linux/vim.md index f42510f..2317fdb 100644 --- a/tech_docs/linux/vim.md +++ b/tech_docs/linux/vim.md @@ -1,3 +1,25 @@ +In Vim, to move to the top of the document, select all text, and then either delete or yank (copy) it, you'll use different sequences of commands depending on what you want to accomplish. Here are the steps for each action: + +1. **Move to the Top and Select All Text**: + - You can use `ggVG` to select all text in the document. Here's how it breaks down: + - `gg` moves the cursor to the first line of the document. + - `V` starts visual line mode. + - `G` extends the selection to the last line of the document. + +2. **Delete the Selected Text**: + - After selecting the text with `ggVG`, you can press `d` to delete the selected text. + +3. **Yank (Copy) the Selected Text**: + - After selecting the text with `ggVG`, you can press `y` to yank the selected text. + +Here’s how you can remember and execute these commands: +- To delete all text: `ggVGd` +- To yank (copy) all text: `ggVGy` + +These commands make it easy to quickly manipulate large sections of text in Vim. + +--- + ## Vim Productivity Tips and Tricks ### Faster File Navigation and Selection Techniques @@ -1190,4 +1212,4 @@ filetype plugin on autocmd FileType text setlocal spell " End of .vimrc -``` \ No newline at end of file +```