شهریور 16, 1400ترفندهای vim

خیلی وقتها نیاز داریم که چندین خط رو در ویرایشگر محبوب vim بصورت همزمان کامنت کنیم ، در این ویدیو کوتاه بصورت عملی اینکار رو آموزش می دیم.
دستوری که وارد کردیم به این معنیه که ابتدای محدوده خطوطی که مشخص کردیم (خطوط 813 تا 845) کاراکتر # رو جایگذاری کن.
comment out range of line vim
Specify which lines to comment in vim:
Reveal the line numbers:
:set number
then
:5,17s/^/#/ this will comment out line 813-845
:5,17s/^#// this will uncomment out line 813-845
or this:
:%s/^/#/ will comment out all lines in file
منابع
#https://vim.fandom.com/wiki/Ranges#Comments
#https://www.linuxscrew.com/vim-deleting-lines
#https://stackoverflow.com/questions/1676632/whats-a-quick-way-to-comment-uncomment-lines-in-vim
#https://stackoverflow.com/questions/1676632/whats-a-quick-way-to-comment-uncomment-lines-in-vim#comment27973419_1676672
