---
# System prepended metadata

title: VIM Cheat Sheet

---

# VIM Cheat Sheet
`
https://vim.rtorr.com/
`
## VIM Configuration 
1. Remove all the trailing empty spaces in a file 
:%s/\s\+$//e
2. Insert commaa(,) in the end of the line 
:%s/$/,/
3. Append all the lines in a single line 
ggVGJ
4. Remove all the rows except for rows containing word
:g!/[word]/d
5. Goto defintion 	
	gd:
In order to switch back to the original file you can simply press `CTRL-o`
6. Delete all the lines inside the pattern 
	di[parentheis] i.e di{}
7. Delete the contents inside "" with `ci"`
9. Block navigation: SHIFT + {
10. Install the easymotion plugin 
    - Include `Plugin 'easymotion/vim-easymotion'` in ~/.vimrc
    - nmap s <Plug>(easymotion-overwin-f) # Search Pattern 
    - nmap s <Plug>(easymotion-overwin-f2)
11. Move to the middle of the sentence 