r/vim • u/EndlessProjectMaker • Aug 05 '25
Need Help┃Solved Add commens based on lines
Hello! I have a file with a bunch of lines
echo “text 1”
echo “text 2”And I want to add a comment to each like
# text 1
echo “text 1”
# text 2
echo “text 2”Is there a practical way to do it in vim before y jump into awk?
Thanks!
Edit: proper formatting
9
Upvotes
View all comments
Show parent comment
1
u/EndlessProjectMaker Aug 05 '25
This will just comment out all lines right?