Research/Tools
VIM: How to comment/uncomment lines quickly
sunnyan
2023. 9. 22. 22:13
728x90
1. 플러그인 종류
- NERD commenter : https://github.com/preservim/nerdcommenter
- commentary: https://github.com/chrisbra/vim-commentary
2. CTRL-V를 사용하는 방법
reference: https://stackoverflow.com/questions/1676632/whats-a-quick-way-to-comment-uncomment-lines-in-vim
- Coment
1. ESC (normal mode)
2. Ctrl+v (Visual block mode)
3. Select lines you want
4. Shift + i (capital I)
5. Insert text you want(#, //, anyone)
6. Press ESC ESC (IMPORTANT: press twice!)
- Comment out
1. ESC (normal mode)
2. Ctrl+v (Visual block mode)
3. Select lines you want4. Press d or x
728x90