{"id":21253225,"url":"https://github.com/roger-takeshita/vim","last_synced_at":"2025-03-15T05:42:24.687Z","repository":{"id":120935508,"uuid":"338605904","full_name":"Roger-Takeshita/Vim","owner":"Roger-Takeshita","description":"Vim Cheat Sheet","archived":false,"fork":false,"pushed_at":"2022-05-06T03:39:15.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-21T21:11:19.544Z","etag":null,"topics":["vim","vimtutor"],"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/Roger-Takeshita.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":"2021-02-13T15:34:26.000Z","updated_at":"2021-05-02T05:07:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"c3f5c1ed-3f1e-4213-821a-a085919fa652","html_url":"https://github.com/Roger-Takeshita/Vim","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/Roger-Takeshita%2FVim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roger-Takeshita%2FVim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roger-Takeshita%2FVim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roger-Takeshita%2FVim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Roger-Takeshita","download_url":"https://codeload.github.com/Roger-Takeshita/Vim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243690142,"owners_count":20331727,"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":["vim","vimtutor"],"created_at":"2024-11-21T03:50:51.662Z","updated_at":"2025-03-15T05:42:24.666Z","avatar_url":"https://github.com/Roger-Takeshita.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 id='table-of-contents'\u003eTABLE OF CONTENTS\u003c/h1\u003e\n\n- [VIM](#vim)\n  - [Commands](#commands)\n    - [Insert](#insert)\n    - [Exit / Save](#exit--save)\n    - [Move](#move)\n      - [Horizontal Move](#horizontal-move)\n      - [Vertical Move](#vertical-move)\n    - [Search](#search)\n    - [Marker](#marker)\n    - [Copy](#copy)\n    - [Delete](#delete)\n    - [Paste](#paste)\n    - [Replace](#replace)\n    - [Undo](#undo)\n    - [Redo](#redo)\n    - [Search](#search-1)\n    - [Execute Shell Commands](#execute-shell-commands)\n    - [Recording](#recording)\n    - [Select Text and Save as New File](#select-text-and-save-as-new-file)\n    - [Insert Content](#insert-content)\n    - [Change Window Focus](#change-window-focus)\n    - [Help](#help)\n  - [Navigate](#navigate)\n  - [Replace Word / Inner Content Of a Tag + INSERT MODE](#replace-word--inner-content-of-a-tag--insert-mode)\n  - [Change Surround](#change-surround)\n  - [Copy Word](#copy-word)\n  - [Go Replace](#go-replace)\n  - [Copy to Clipboard](#copy-to-clipboard)\n  - [Commentary](#commentary)\n\n# VIM\n\n```Bash\n  vimtutor\n```\n\n## Commands\n\n[Go Back to Contents](#table-of-contents)\n\n### Insert\n\n```Bash\n  a           # Append text after the cursor\n  A           # End of line in insert mode\n  i           # Insert mode\n  o           # Creates a new line below the cursor and place you in Insert mode\n  O           # Creates a new line above the cursor and place you in Insert mode\n  R           # Insert mode (like Insert key)\n```\n\n### Exit / Save\n\n```Bash\n  :q!         # Exit without saving\n  :wq         # Save and exit\n  :w filename # Save as\n```\n\n### Move\n\n```Bash\n  j           # Down\n  k           # Up\n  h           # Left\n  l           # Right\n  w           # Beginning of the word\n  e           # End of the word\n  0           # Beginning of the line\n  $           # End of the line\n  Ctrl + g    # Show where you are in the file\n  number + G  # Go to line\n  %           # Find closing brackets\n  Ctrl + o    # Takes you back to older positions\n  Ctrl + i    # Takes you back to newer positions\n\n  Ctrl + e    # Move down\n  Ctrl + y    # Move up\n```\n\n#### Horizontal Move\n\n```Bash\n  # File\n  gg          # Top of the file\n  Shift + g   # Bottom of the file\n\n  # Screen\n  H           # Top of the screen\n  M           # Middle of the screen\n  L           # Bottom of the screen\n  zz          # Center the file in the middle of the screen\n  zt          # Put your the file in the top of the screen\n  zb          # Put your the file in the bottom of the screen (not very useful)\n  Ctrl + e    # Move the screen down, the cursor stays still\n  Ctrl + y    # Move the screen up, the cursor stays still\n  Ctrl + d    # Move half of the screen down, cursor stay in the same height\n  Ctrl + u    # Move half of the screen up, cursor stay in the same height\n```\n\n#### Vertical Move\n\n```Bash\n  0           # Beginning of the line\n  $           # End of the line\n  ^           # First non blank character\n  g_          # End of the line non blank character\n  %           # Matches the open and closing (), [], ...\n```\n\n### Search\n\n```Bash\n  *           # Search for the word that I am current on\n  f + character # Search in the line\n    ;             # Move forward\n    ,             # Move backwards\n```\n\n### Marker\n\n```Bash\n  mm          # Create a marker with the letter m\n  `m          # Go to marker m\n  'm          # Go to marker m, beginning of the line\n```\n\n### Copy\n\n```Bash\n  v           # Visual model\n      y /      # Copy selected text\n      p       # Paste selected text\n  yw          # Copy single word\n```\n\n### Delete\n\n```Bash\n  x           # Delete single character\n  dw          # Delete word\n  d$          # Delete right until the end\n  d2w         # Delete 2 words\n  diW         # Delete big word (entire block of word)\n  dt + symbol # Delete everything between not including the symbol\n  df + symbol # Delete everything between including the symbol\n```\n\n### Paste\n\n```Bash\n  p           # Paste below\n```\n\n### Replace\n\n```Bash\n  r               # Replace character\n  ce              # Replace until the end of the word (e)\n  c$              # Replace until the end of the line ($)\n  :s/old/new/g    # Substitute globally\n  :%s/old/new/g   # Substitute globally in the line\n  :%s/old/new/gc  # Substitute globally in the line and prompt y/n\n  :#,#s/old/new/g # Substitute first # line, second # number of lines\n```\n\n### Undo\n\n```Bash\n  u           # Undo\n  U           # Undo entire line\n```\n\n### Redo\n\n```Bash\n  Ctrl + r    # Redo\n```\n\n### Search\n\n```Bash\n  /           # Search forward\n  # Option ---------------------------------------\n    :set ic         # Search word, ignore case sensitive\n    :set noic       # Disable case sensitive\n    :set hls        # Activate highlight\n    :set nohlsearch # Deactivate highlight\n    /ign:ore\\c       # Ignore case for just one search\n  # Option ---------------------------------------\n  ?           # Search backwards\n  option n    # Next\n  option N    # Previous\n```\n\n### Execute Shell Commands\n\n```Bash\n  :!          # External commands\n```\n\n### Recording\n\n```Bash\n  q           # Stop recording\n```\n\n### Select Text and Save as New File\n\n```Bash\n  v           # --Visual-- mode\n              # Select your text (using h, j, k, l)\n              # :w to save (:'\u003c,'\u003ew)\n```\n\n### Insert Content\n\n```Bash\n  :r path/file   # Will copy the content of the file as paste under your cursor\n  :r !ls Desktop # Will paste all the filenames under your cursor\n```\n\n### Change Window Focus\n\n```Bash\n  Ctrl+w        # Switch window focus\n```\n\n### Help\n\n```Bash\n  :help\n  :help w\n  :help c_CTRL-D\n  :help insert-index\n  :help user-manual\n```\n\n## Navigate\n\n- Search character in line\n\n  ```Bash\n    f + letter # Move forward including the letter\n    ;          # Move forward\n    ,          # Move backward\n\n    t + letter # Move forward not including the letter\n    ;          # Move forward\n    ,          # Move backward\n\n    F # Search backwards including the letter\n    T # Search backwards not including the letter\n  ```\n\n## Replace Word / Inner Content Of a Tag + INSERT MODE\n\n```Bash\n  cas # Change the whole block of sentence\n  cw  # Change the word from cursor til the end\n  ciw # Change the current word\n  cit # Change inner content of a tag\n  ci\" # Change the inside word of \"\"\n  cip # Change the inner p tag\n  c#j # Change from current line + number\n```\n\n```Bash\n  c/word + enter # Change word that is not accessible easily\n```\n\n## Change Surround\n\n- [tpope/vim-surround](https://github.com/tpope/vim-surround)\n\n  ```Bash\n    cs\"'  # Change surround \" to '\n    ysiw\" # Add surround \"\n  ```\n\n## Copy Word\n\n```Bash\n  yiw # Copy Word\n```\n\n## Go Replace\n\n- [vim-scripts/ReplaceWithRegister](https://github.com/vim-scripts/ReplaceWithRegister)\n\n  ```Bash\n    griw # Go replace inner word\n  ```\n\n## Copy to Clipboard\n\n- [christoomey/vim-system-copy](https://github.com/christoomey/vim-system-copy)\n\n  ```Bash\n    cp   # Copy selection\n    cpiw # Copy word into system clipboard\n    cpi' # Copy inside single quotes to system clipboard\n    cvi' # Paste inside single quotes from system clipboard\n  ```\n\n## Commentary\n\n- [tpope/vim-commentary](https://github.com/tpope/vim-commentary)\n\n  ```Bash\n    gcc  # Comment line\n    gcap # Comment a paragraph\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froger-takeshita%2Fvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froger-takeshita%2Fvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froger-takeshita%2Fvim/lists"}