เมื่อสร้างโปรเจกต์เริ่มต้นของ Flutter จะพบว่ามี Comment แถมมาให้แบบละเอียดยิบ วันนี้เลยจะมาแชร์วิธีลบ Comment ทั้งหมดแบบง่ายๆภายในไม่กี่วินาทีกัน ไปดูกันเล้ยยย
Environment
- Visual Studio Code (Editor)
- OS : Mac or Windows
For macOS
- กด
Command+Shift+P
เพื่อสร้างโปรเจกต์ใหม่ - เปิดไฟล์ main.dart ในโปรแกรม Visual studio
Command + Option + F
(⌥⌘F) [Replace].Command + Option + R
(⌥⌘R) [Use Regular Expression].- พิมพ์
//.*
in search form. - Press the Tab key to go to the replace form.
Command + Enter
(⌘Enter) [Replace All].Command + S
(⌘S) [Save], AutoFormat.
For Windows
- กด
Control+Shift+P
เพื่อสร้างโปรเจกต์ใหม่ - เปิดไฟล์ main.dart ในโปรแกรม Visual studio
Control + H
[Replace]Alt + R
[Use Regular Expression]- พิมพ์
//.*
in search form. - Press the Tab key to go to the replace form.
Control + Alt + Enter
[Replace All]Control + S
[Save], Auto-format.