{"id":24133298,"url":"https://github.com/carlsremy/vimvscode-cheats","last_synced_at":"2025-06-13T16:38:38.842Z","repository":{"id":63306126,"uuid":"564787142","full_name":"CarlsRemy/VimVsCode-Cheats","owner":"CarlsRemy","description":"This repository is intended to offer a comprehensive and practical guide for those who want to integrate the powerful capabilities of Vim into their workflow within Visual Studio Code. The cheat sheet provides key details, tips, and settings to maximize efficiency while programming.","archived":false,"fork":false,"pushed_at":"2023-12-26T21:01:46.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-11T23:37:15.991Z","etag":null,"topics":["cheatsheet","guia-rapida","vim","vim-for-visual-studio-code","visual-studio-code"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CarlsRemy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-11T13:52:25.000Z","updated_at":"2024-10-18T15:47:36.000Z","dependencies_parsed_at":"2023-12-26T17:43:09.962Z","dependency_job_id":"acce1ec7-3f91-45ab-9ed5-2d0d679e3760","html_url":"https://github.com/CarlsRemy/VimVsCode-Cheats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarlsRemy%2FVimVsCode-Cheats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarlsRemy%2FVimVsCode-Cheats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarlsRemy%2FVimVsCode-Cheats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarlsRemy%2FVimVsCode-Cheats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CarlsRemy","download_url":"https://codeload.github.com/CarlsRemy/VimVsCode-Cheats/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241348197,"owners_count":19948157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cheatsheet","guia-rapida","vim","vim-for-visual-studio-code","visual-studio-code"],"created_at":"2025-01-11T23:35:21.631Z","updated_at":"2025-03-01T09:42:43.706Z","avatar_url":"https://github.com/CarlsRemy.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vim VsCode Cheats Sheet\n\n## Introduction\n\nIn this document, I'll share my Vim learnings for the **[VS. Code](https://code.visualstudio.com \"Visual Studio Code\")**, as well as any tips I find useful about that tool or extension.\n\nAlso remember to check the official documentation [VSCodeVim](https://github.com/VSCodeVim/Vim \"VSCode Vim\") or the next page to understand vim better [Vim Tips](https://www.barbarianmeetscoding.com/boost-your-coding-fu-with-vscode-and-vim/moving-blazingly-fast-with-the-core-vim-motions/) \n\n\u003cp align=\"center\" width=\"100%\"\u003e\n    \u003cimg width=\"40%\" src=\"https://raw.githubusercontent.com/VSCodeVim/Vim/master/images/icon.png\"\u003e \n\u003c/p\u003e\n\n\n## First advice or clarification\n\nThe letters change their behavior depending on whether they are uppercase or lowercase. By using \u003ckbd\u003eShift\u003c/kbd\u003e we tell vim not to add any modifiers to the [Operator](#Operators), otherwise with lower case it will wait for a second and even a third parameter for its execution.\n\nAs an example of this we have  \u003ckbd\u003eD\u003c/kbd\u003e. where pressing \u003ckbd\u003ed\u003c/kbd\u003e with \u003ckbd\u003eCaps Lock\u003c/kbd\u003e active or pressing  \u003ckbd\u003ed\u003c/kbd\u003e and \u003ckbd\u003eShift\u003c/kbd\u003e will cut the text from the pointer position to the end of the line, where doing it with lowercase \u003ckbd\u003ed\u003c/kbd\u003e will do nothing until the same key is pressed a second time or a modifier is passed (\u003ckbd\u003ew\u003c/kbd\u003e of word, \u003ckbd\u003es\u003c/kbd\u003e sentence, \u003ckbd\u003ep\u003c/kbd\u003e of paragraph among others)\n\n\n\u003e [!TIP]  \n\u003e If yours is not so much theory but practice, you can visit these websites and learn in a more interactive way: [Vim Snake](https://vimsnake.com/), [Vim Adventures](https://vim-adventures.com/), [Vim Genius](http://www.vimgenius.com/lessons).   \nI also recommend this **[free Vim course](https://www.udemy.com/course/vim-aumenta-tu-velocidad-de-desarrollo/ \"Vim by Nicolas Schurmann\")** taught on Udemy.\n\n### Modes\n\n|              |         |\n|--------------|---------|\n|Normal        |is the default mode of files when opening them for the first time. this is read only, since with this we can only cut with \u003ckbd\u003eX\u003c/kbd\u003e, \u003ckbd\u003eC\u003c/kbd\u003e, \u003ckbd\u003eS\u003c/kbd\u003e  and \u003ckbd\u003eD\u003c/kbd\u003e |\n|Insert        |It is the way that allows us to edit it. \u003ckbd\u003eCrtl\u003c/kbd\u003e + \u003ckbd\u003ec\u003c/kbd\u003e is blocked, if we press this we will only change to normal mode. this mode is activated from Normal mode with the \u003ckbd\u003ei\u003c/kbd\u003e key or \u003ckbd\u003eInsert\u003c/kbd\u003e key  |\n|Visual\t\t     |this is useful to make selections of words or fragments of a phrase, it is activated from Normal mode with \u003ckbd\u003ev\u003c/kbd\u003e|\n|Visual Inline |this is useful for making selections of entire paragraphs, it is activated from Normal mode with \u003ckbd\u003eV\u003c/kbd\u003e|\n|Visual Block  |this is useful for making Text Block selections, it is activated from Normal mode with \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003ev\u003c/kbd\u003e|\n|Replace\t\t\t |as its name indicates, it is to replace the text, it is activated from the normal mode with \u003ckbd\u003eR\u003c/kbd\u003e or by pressing the \u003ckbd\u003eInsert\u003c/kbd\u003e key from the insertion mode|\n                                                                                                                                \n### Movement / Displacement\n\n|               |     |\n|---------------|-----|\n| \u003ckbd\u003eh\u003c/kbd\u003e  | allows us to move to the left. we encode the amount of characters that we will move with numbers |\n| \u003ckbd\u003e4\u003c/kbd\u003e \u003ckbd\u003eh\u003c/kbd\u003e | will move us 4 positions to the left |\n| \u003ckbd\u003ej\u003c/kbd\u003e\t| it would be the same as with **\u003ckbd\u003eh\u003c/kbd\u003e** but moving down |\n| \u003ckbd\u003ek\u003c/kbd\u003e\t| we'll move up |\n| \u003ckbd\u003el\u003c/kbd\u003e \t| we'll move to the right |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003ej\u003c/kbd\u003e | this would be the same as **\u003ckbd\u003ej\u003c/kbd\u003e** |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003ek\u003c/kbd\u003e\t| this would be the same as **\u003ckbd\u003ek\u003c/kbd\u003e** |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003eg\u003c/kbd\u003e | we move to the first line, but we can also modify the line we go to |\n| \u003ckbd\u003e8\u003c/kbd\u003e \u003ckbd\u003eG\u003c/kbd\u003e | positions us on line 8, if it does not exist it directs us to the last line |\n| \u003ckbd\u003eG\u003c/kbd\u003e | it moves us to the last line, if it allows a numeric modifier |\n| \u003ckbd\u003e[\u003c/kbd\u003e \u003ckbd\u003e[\u003c/kbd\u003e | we move to the first line. does not allow numeric modifier |\n| \u003ckbd\u003e]\u003c/kbd\u003e \u003ckbd\u003e]\u003c/kbd\u003e | we move to the  last line. does not allow numeric modifier |\n| \u003ckbd\u003eH\u003c/kbd\u003e  | we scroll to the visible top of the screen, it would be the same as pressing the **\u003ckbd\u003ePage Up\u003c/kbd\u003e** key |\n| \u003ckbd\u003eM\u003c/kbd\u003e  | we move to the visible central part of the screen |\n| \u003ckbd\u003eL\u003c/kbd\u003e  | we scroll to the visible bottom of the screen, it would be the same as pressing the **\u003ckbd\u003ePage Down\u003c/kbd\u003e** key |\n| \u003ckbd\u003e0\u003c/kbd\u003e  | moves to the first character of a line, of the line we are on |\n| \u003ckbd\u003e^\u003c/kbd\u003e  | moves to the first character of a **non-blank** line, of the line we are on |\n| \u003ckbd\u003e$\u003c/kbd\u003e  | moves to the last charcacter of a line, of the line we are on |\n| \u003ckbd\u003e_\u003c/kbd\u003e  | moves to the first character of a line, of the line we are on |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003e_\u003c/kbd\u003e | moves to the last character of a **non-blank** line, of the line we are on |\n| \u003ckbd\u003e-\u003c/kbd\u003e  | moves up positioning it self in the first character that is **non-blank** |\n| \u003ckbd\u003e+\u003c/kbd\u003e  | moves down to the first **non-blank** character |\n| \u003ckbd\u003ew\u003c/kbd\u003e  | moves to the first letter of each word, from right to the left and when finished go down to the next line |\n| \u003ckbd\u003eW\u003c/kbd\u003e  | moves to the first letter of each word, from right to the left and when finished go down to the next line  (skip special characters) |\n| \u003ckbd\u003eb\u003c/kbd\u003e  | moves to the first letter of each word, from right to left and when it finishes it goes up to the previous line. the symbols are taken as separate words.  |\n| \u003ckbd\u003eB\u003c/kbd\u003e  | moves to the first letter of each word, from right to left and when it finishes it goes up to the previous line. the symbols are taken as part of the words.  |\n| \u003ckbd\u003ee\u003c/kbd\u003e  | moves to the last letter of each word, from  left to right the  and when finished go down to the next line. the symbols are taken as separate words. |\n| \u003ckbd\u003eE\u003c/kbd\u003e  | moves to the last letter of each word, from  left to right the  and when finished go down to the next line. the symbols are taken as part of the words. |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003eb\u003c/kbd\u003e | select the word under the cushion and perform a similarity search, and introduce us in visual mode|\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003ee\u003c/kbd\u003e | moves to the last letter of each word, from left to right and when finished go up to the previous line   |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003ef\u003c/kbd\u003e | will open the file that has the name of the word under the cursor. If it does not exist, the process of creating a new file will be done. |\n| \u003ckbd\u003eCtrl\u003c/kbd\u003e \u003ckbd\u003eo\u003c/kbd\u003e  | jump to previous location where the cursor has recently been |\n| \u003ckbd\u003eCtrl\u003c/kbd\u003e \u003ckbd\u003ei\u003c/kbd\u003e  | jumps to the next previous location where the cursor has recently been |\n| \u003ckbd\u003e(\u003c/kbd\u003e  | moves to the next sentence |\n| \u003ckbd\u003e)\u003c/kbd\u003e\t| moves to the previous sentence |\n| \u003ckbd\u003e{\u003c/kbd\u003e  | moves us one paragraph Up   |\n| \u003ckbd\u003e}\u003c/kbd\u003e\t| moves us one paragraph Down |\n| \u003ckbd\u003e%\u003c/kbd\u003e  | it moves between the start and end blocks of {},[], () |\n| \u003ckbd\u003ez\u003c/kbd\u003e \u003ckbd\u003ez\u003c/kbd\u003e | scroll the line with the cursor to the center of the screen |\n| \u003ckbd\u003ez\u003c/kbd\u003e \u003ckbd\u003et\u003c/kbd\u003e | scroll the line with the cursor to the top |\n| \u003ckbd\u003ez\u003c/kbd\u003e \u003ckbd\u003eb\u003c/kbd\u003e | scroll the line with the cursor to the bottom |\n\n### Operators \n\n\noperators support numeric values, [moves](#movement--displacement) such as k,w and modifiers. example \u003ckbd\u003e2\u003c/kbd\u003e + \u003ckbd\u003ec\u003c/kbd\u003e + \u003ckbd\u003ei\u003c/kbd\u003e + \u003ckbd\u003e\"\u003c/kbd\u003e which can be translated as it will cut 2 lines from its position down everything that is inside \"\n\nthese do not change their function when changing from lowercase to uppercase, they only stop admitting modifiers at the end of them.\n\n\n|                |        |\n|----------------|--------|\n| \u003ckbd\u003ec\u003c/kbd\u003e   | cuts a line, but does not delete it. after this we will return to insert mode. |\n| \u003ckbd\u003ec\u003c/kbd\u003e \u003ckbd\u003e-\u003c/kbd\u003e  | cut the line from the course to the next one above it, eliminating a line break.. after this we will return to insert mode.|\n| \u003ckbd\u003ec\u003c/kbd\u003e \u003ckbd\u003e+\u003c/kbd\u003e  | cut the line from the course to the next one below it, eliminating a line break.. after this we will return to insert mode. |\n| \u003ckbd\u003ed\u003c/kbd\u003e   | performs the same function as \u003ckbd\u003ec\u003c/kbd\u003e but without changing modes |\n| \u003ckbd\u003es\u003c/kbd\u003e   | cut character and return to insert mode. only accepts numeric modifiers |\n| \u003ckbd\u003eS\u003c/kbd\u003e   | cut line and return to insert mode. only accepts numeric modifiers |\n| \u003ckbd\u003ex\u003c/kbd\u003e   | cut character below the cursor. only accepts numeric modifiers |\n| \u003ckbd\u003eX\u003c/kbd\u003e   | cut character before cursor. only accepts numeric modifiers |\n| \u003ckbd\u003eo\u003c/kbd\u003e   | inserts a blank line after the line where the cursor is positioned and returns to insert mode. only accepts numeric modifiers  |\n| \u003ckbd\u003eO\u003c/kbd\u003e   | inserts a blank line before the line where the cursor is positioned and returns to insert mode. only accepts numeric modifiers  |\n| \u003ckbd\u003ey\u003c/kbd\u003e \u003ckbd\u003ey\u003c/kbd\u003e   | copy line  |\n| \u003ckbd\u003ey\u003c/kbd\u003e \u003ckbd\u003ew\u003c/kbd\u003e   | copy word  |\n| \u003ckbd\u003ep\u003c/kbd\u003e   | paste the copied text  |\n| \u003ckbd\u003e~\u003c/kbd\u003e   | change a character from uppercase to lowercase and vice versa. only accepts numeric modifiers |\n| \u003ckbd\u003e\"\u003c/kbd\u003e \u003ckbd\u003e0\u003c/kbd\u003e \u003ckbd\u003eY\u003c/kbd\u003e | copy and save with name \"0\" in the register. to see the log read the [**:reg command**](#commands) |\n| \u003ckbd\u003e\"\u003c/kbd\u003e \u003ckbd\u003e0\u003c/kbd\u003e \u003ckbd\u003ep\u003c/kbd\u003e | Paste from 0 register. to see the log read the [**:reg command**](#commands) |\n| \u003ckbd\u003e2\u003c/kbd\u003e \u003ckbd\u003ep\u003c/kbd\u003e | paste the copied text twice |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003e~\u003c/kbd\u003e \u003ckbd\u003e~\u003c/kbd\u003e | is similar to ~ but this will do the whole line instead |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003eu\u003c/kbd\u003e \u003ckbd\u003eu\u003c/kbd\u003e | change the entire line to lowercase |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003eU\u003c/kbd\u003e \u003ckbd\u003eU\u003c/kbd\u003e | change the entire line to uppercase |\n| \u003ckbd\u003eu\u003c/kbd\u003e | undo last change. only accepts numeric modifiers |\n| \u003ckbd\u003er\u003c/kbd\u003e | redo the last change. only accepts numerical modifiers |\n| \u003ckbd\u003e.\u003c/kbd\u003e | repeat last action. only accepts numeric modifiers |\n| \u003ckbd\u003e\u003e\u003c/kbd\u003e \u003ckbd\u003e\u003e\u003c/kbd\u003e | tabulate the text. we can indicate the number of lines to affect|\n| \u003ckbd\u003e2\u003c/kbd\u003e \u003ckbd\u003e\u003e\u003c/kbd\u003e \u003ckbd\u003e\u003e\u003c/kbd\u003e | will tabulate the text affecting 2 lines |\n| \u003ckbd\u003e\u003e\u003c/kbd\u003e \u003ckbd\u003e2\u003c/kbd\u003e \u003ckbd\u003e\u003e\u003c/kbd\u003e | will tabulate the text affecting 2 lines |\n| \u003ckbd\u003e\u003c\u003c/kbd\u003e \u003ckbd\u003e\u003c\u003c/kbd\u003e | will remove a tab from the text |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003ep\u003c/kbd\u003e | paste after cursor  |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003eP\u003c/kbd\u003e | paste before cursor |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003ec\u003c/kbd\u003e \u003ckbd\u003ec\u003c/kbd\u003e | make a comment in line. if it is commented, it will eliminate the comment indicators, leaving the text of this |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003eC\u003c/kbd\u003e \u003ckbd\u003eC\u003c/kbd\u003e | make a comment in blocks. if it is commented, it will eliminate the comment indicators, leaving the text of this |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003ec\u003c/kbd\u003e \u003ckbd\u003e-\u003c/kbd\u003e | comments from the current line up. we can indicate how many lines up we want to affect |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003eC\u003c/kbd\u003e \u003ckbd\u003e2\u003c/kbd\u003e \u003ckbd\u003e-\u003c/kbd\u003e | here we indicate that we want to affect 2 lines |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003ec\u003c/kbd\u003e \u003ckbd\u003e+\u003c/kbd\u003e | It is very similar to the previous sentence but this one comments from the current line downwards. |\n| \u003ckbd\u003eJ\u003c/kbd\u003e | join the line where we are positioned with the line below with a space between both |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003eJ\u003c/kbd\u003e | Similar to the previous statement only this one does not add any space |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003et\u003c/kbd\u003e | allow us to move to the next tab. if we pass a numeric modifier to the tab that corresponds to the number we pass  |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003eT\u003c/kbd\u003e | allow us to move to the previous tab. If we pass a numeric modifier, it will move as many tabs back as we indicate. |\n| \u003ckbd\u003e2\u003c/kbd\u003e \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003eT\u003c/kbd\u003e | If we are in tab number 3, it will move us 2 tabs back, this positions us in the first |\n\n### Modifiers\n\n|                |     |\n|----------------|-----|\n| \u003ckbd\u003ei\u003c/kbd\u003e   | represents the part inside a text, example the text that is inside \" \" |\n| \u003ckbd\u003ea\u003c/kbd\u003e   | renders the entire text object, including \"\", (), spaces, tabs |\n| \u003ckbd\u003es\u003c/kbd\u003e   | represents the sentences    |\n| \u003ckbd\u003ep\u003c/kbd\u003e   | represents the paragraphs   |\n| \u003ckbd\u003eb\u003c/kbd\u003e   | represents the blocks of () |\n| \u003ckbd\u003eB\u003c/kbd\u003e   | represents the blocks of {} |\n| \u003ckbd\u003et\u003c/kbd\u003e   | represents the tag blocks \u003c\u003e.for this to work we must indicate em modifier a or i before this since there is another modifier that works with the T, example: \u003ckbd\u003ec\u003c/kbd\u003e \u003ckbd\u003ea\u003c/kbd\u003e \u003ckbd\u003et\u003c/kbd\u003e cuts the content and the tag itself or text within \u003c\u003e |\n| \u003ckbd\u003e/\u003c/kbd\u003e   | represents the text from the cursor position to the appearance of the search occurrence, if it is not found it will do nothing, \u003ckbd\u003ed\u003c/kbd\u003e \u003ckbd\u003e/\u003c/kbd\u003e ***fire*** will delete all the text found before the word fire |\n| \u003ckbd\u003ef\u003c/kbd\u003e   | represents the text from to the position of the occurrence including itself, it searches for characters |\n| \u003ckbd\u003eF\u003c/kbd\u003e   | it is similar to the previous sentence only that it looks for the previous occurrence |\n| \u003ckbd\u003et\u003c/kbd\u003e   | represents the text from to the position of the occurrence does not include itself, it searches for characters |\n| \u003ckbd\u003eT\u003c/kbd\u003e   | it is similar to the previous sentence only that it looks for the previous occurrence |\n| \u003ckbd\u003e\u003c\u003c/kbd\u003e   | represent that character | \n| \u003ckbd\u003e\u003e\u003c/kbd\u003e   | represent that character | \n| \u003ckbd\u003e(\u003c/kbd\u003e   | represent that character |  \n| \u003ckbd\u003e)\u003c/kbd\u003e   | represent that character | \n| \u003ckbd\u003e{\u003c/kbd\u003e   | represent that character |  \n| \u003ckbd\u003e}\u003c/kbd\u003e   | represent that character | \n| \u003ckbd\u003e[\u003c/kbd\u003e   | represent that character | \n| \u003ckbd\u003e]\u003c/kbd\u003e   | represent that character |\n| \u003ckbd\u003e\"\u003c/kbd\u003e   | represent that character | \n| \u003ckbd\u003e'\u003c/kbd\u003e   | represent that character | \n| \u003ckbd\u003e`\u003c/kbd\u003e   | represent that character | \n\n### Visual mode\n\n|                           |     |\n|---------------------------|-----|\n| \u003ckbd\u003ea\u003c/kbd\u003e \u003ckbd\u003ew\u003c/kbd\u003e | select a word              |\n| \u003ckbd\u003ea\u003c/kbd\u003e \u003ckbd\u003eb\u003c/kbd\u003e | select block of ()         |\n| \u003ckbd\u003ea\u003c/kbd\u003e \u003ckbd\u003eB\u003c/kbd\u003e | select block of {}         |\n| \u003ckbd\u003ea\u003c/kbd\u003e \u003ckbd\u003et\u003c/kbd\u003e | select tag block \u003c\u003e        |\n| \u003ckbd\u003ei\u003c/kbd\u003e \u003ckbd\u003eb\u003c/kbd\u003e | select text inside ()      |\n| \u003ckbd\u003ei\u003c/kbd\u003e \u003ckbd\u003eB\u003c/kbd\u003e | select text inside {}      |\n| \u003ckbd\u003ei\u003c/kbd\u003e \u003ckbd\u003et\u003c/kbd\u003e | select text inside tags \u003c\u003e |\n| \u003ckbd\u003eo\u003c/kbd\u003e              | moves the cursor between the last letter of the selection and the first | \n\n### Search\n\nallows us to search the current file easily. allows us to use Regular Expression (regex), which is a huge advantage over Vs Code's built-in search engine. \n\nto search for a specific word we use \u003c /\u003e , it is useful when we search for words that could be contained in other words, for example sensitive and insensitive, it would be done ***/\u003csensitive/\u003e***\n\n|                |     |\n|----------------|-----|\n| \u003ckbd\u003e/\u003c/kbd\u003e   |allows you to search forwards  |\n| \u003ckbd\u003e?\u003c/kbd\u003e   |allows you to search backwards |\n| \u003ckbd\u003e#\u003c/kbd\u003e   |af we are in normal mode, it allows us to search for the word under the cursor, then when it finds consistency, it allows us to scroll down between them |\n| \u003ckbd\u003e*\u003c/kbd\u003e   |performs the same function, only it allows us to scroll up|\n| \u003ckbd\u003en\u003c/kbd\u003e   |next occurrence     |\n| \u003ckbd\u003eN\u003c/kbd\u003e   |previous occurrence |\n\n### Flag search\n\n|                |     |\n|----------------|-----|\n| \u003ckbd\u003ec\u003c/kbd\u003e   |case insensitive |\n| \u003ckbd\u003eC\u003c/kbd\u003e   |case sensitive |\n\n\n\n\n### Commands\n\nthe commands in vim begin with \":\" followers of the sentence to be executed, the vast majority are descriptive and allow abbreviations which I will indicate with [] the syllables that are optional for their operation, example: w is the abbreviation for :write , which in the document will be written like this :w[rite]\n\n|                |     |\n|----------------|-----|\n| :e[dit]        |create or edit file. we must indicate the file after said command example ***:e main.js***\n| :reg[istro]    |show log of whatever is copied with vim (it's different from trash )\n| :w[rite]       |save a file\n| :q[uit]        |close file. it will give an error if it finds unsaved changes\n| :q!            |! at the end of the command causes the same to close discarding any unsaved changes\n| :x             |close and save changes\n| :wq            |close and save changes\n| :wa[ll]        |save changes to all files\n| :qa[ll]        |close all files\n| :tabnew        |open file in new tab:v\n| :tabn[ext]     |move to the next tab\n| :tabp[revious] |move to the previous tab\n| :tabm[over]    |allows us to change the position of the tab, it goes from index 0\n| :tabc[lose]    |close current tab\n| :tab[only]     |close all tabs and keep open only the focused one\n| :tabdo         |run command on all tabs example ***:tabdo wq*** (will save and close each tab)\n| :sp[lit]\t     |split into two windows, top half and bottom half\n| :vs[plit]      |split into two windows, left and right\n| :noh[lsearch]  |clear search\n| :%s/ / /       |It is used to find and replace one text with another in a file. %s/Search/replace/flag where good search is the word or pattern to search for, replace the replacement obviously and flag [the filter or search flag](#flag-substitution)\n| :.!            |we can execute terminal commands and add the text returned by it to our file. in windows we can execute cmd commands\n\n\n### Flag substitution\n\n|                |     |\n|----------------|-----|\n| \u003ckbd\u003eg\u003c/kbd\u003e   |find each occurrence\n| \u003ckbd\u003ei\u003c/kbd\u003e   |case insensitive \n| \u003ckbd\u003eI\u003c/kbd\u003e   |case sensitive\n| \u003ckbd\u003ec\u003c/kbd\u003e   |ask for confirmation before replacing. \n\n### Ranges\n\nranges are a good way to indicate a range of action for commands. \nthese are written towards ***:.,2d*** where \u003ckbd\u003ed\u003c/kbd\u003e is an [operator](#operators) to be executed\n\n|                |     |\n|----------------|-----|\n| :%             |indicates that you want to affect the entire file |\n| :.,2           |this range consists of 2 parts start qwhich in this case is \u003ckbd\u003e.\u003c/kbd\u003e which is expressed as the current position of the cursor and the 2 indicates that the range ends at line 2 |\n| :.,$           |this would be similar to the previous one with the slight difference that \u003ckbd\u003e$\u003c/kbd\u003e implies that it will start at the current cursor position and end at the last line of the file. |\n| :1,.-1         |here it is indicated that the range begins on line 1 and ends one line before the current position of the cursor, we can also do .+1 to indicate that it ends one line below the current position of the cursor |\n\n### Other curious things \n\n|                |     |\n|----------------|-----|\n| \u003ckbd\u003eZ\u003c/kbd\u003e \u003ckbd\u003eZ\u003c/kbd\u003e   |close and save changes |\n| \u003ckbd\u003ei\u003c/kbd\u003e   |return to insert mode place the cursor one character before the previous position\n| \u003ckbd\u003eI\u003c/kbd\u003e   |return to insert mode place cursor on first character\n| \u003ckbd\u003ea\u003c/kbd\u003e   |return to insert mode place cursor on last character\n| \u003ckbd\u003eA\u003c/kbd\u003e   |return to insert mode place the cursor one character after the previous position\n| \u003ckbd\u003ee\u003c/kbd\u003e \u003ckbd\u003ea\u003c/kbd\u003e |will return to insert mode by placing the cursor on the last letter of the word in which we were positioned |\n| \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003ed\u003c/kbd\u003e |go to the definition of the word under the cursor |\n\n\n### Macro\n\nMacros in Vim are used to store a series of commands that perform an action and then be able to execute the same script over and over again without having to write the same thing every time.\n\nThese are assigned a **one-letter** name.\n\n|                |     |\n|----------------|-----|\n| \u003ckbd\u003eq\u003c/kbd\u003e \u003ckbd\u003ea\u003c/kbd\u003e   | to start recording, a macro with the name **\"a\"** |\n| \u003ckbd\u003eq\u003c/kbd\u003e    | Stop recording macro |\n| \u003ckbd\u003e@\u003c/kbd\u003e \u003ckbd\u003ea\u003c/kbd\u003e | play **\"a\"** macro |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlsremy%2Fvimvscode-cheats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarlsremy%2Fvimvscode-cheats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlsremy%2Fvimvscode-cheats/lists"}