วิธีลบคอมเมนต์ทั้งหมดบน Starter app ของ Flutter บน VS Code

เมื่อสร้างโปรเจกต์เริ่มต้นของ Flutter จะพบว่ามี Comment แถมมาให้แบบละเอียดยิบ วันนี้เลยจะมาแชร์วิธีลบ Comment ทั้งหมดแบบง่ายๆภายในไม่กี่วินาทีกัน ไปดูกันเล้ยยย

Environment

  • Visual Studio Code (Editor)
  • OS : Mac or Windows

For macOS

  1. กด Command+Shift+P เพื่อสร้างโปรเจกต์ใหม่
  2. เปิดไฟล์ main.dart ในโปรแกรม Visual studio
  3. Command + Option + F (⌥⌘F) [Replace].
  4. Command + Option + R (⌥⌘R) [Use Regular Expression].
  5. พิมพ์ //.* in search form.
  6. Press the Tab key to go to the replace form.
  7. Command + Enter (⌘Enter) [Replace All].
  8. Command + S (⌘S) [Save], AutoFormat.

For Windows

  1. กด Control+Shift+P เพื่อสร้างโปรเจกต์ใหม่
  2. เปิดไฟล์ main.dart ในโปรแกรม Visual studio
  3. Control + H [Replace]
  4. Alt + R [Use Regular Expression]
  5. พิมพ์ //.* in search form.
  6. Press the Tab key to go to the replace form.
  7. Control + Alt + Enter [Replace All]
  8. Control + S [Save], Auto-format.

ใส่ความเห็น

อีเมลของคุณจะไม่แสดงให้คนอื่นเห็น ช่องข้อมูลจำเป็นถูกทำเครื่องหมาย *