Posts Tagged ‘editor’

ลบ ^M (CTRL-M) ออกจากไฟล์ หรือแทนที่ด้วย ด้วย VIM

Posted by กวิน ชัยเลิศ on Tuesday, June 10th, 2008

เพื่อนๆ คงจะเคยประสบปัญหากับ source code หรือ text file ที่เต็มไปด้วย ^M (CTRL-M) โดยที่เราไม่ต้องการจะเห็นมัน

ผมมีวิธีลบ ^M ออกไปจาก file ด้วย VIM (editor เทพ!) มาแนะนำครับ :)

ตัวอย่าง file ที่เต็มไปด้วย ^M
vim-control-m

คลิกที่นี่เพื่อดูส่วนที่เหลือ »

เปลี่ยน view source editor ของ IE

Posted by กวิน ชัยเลิศ on Friday, May 30th, 2008

เทคนิคสำหรับเปลี่ยน view source editor ของ IE (Windows Internet Exploper)

Run regedit

HKEY_LOCAL_MACHINE
|- Software
|– Microsoft
|— Internet Explorer
|—- View Source Editor
|—– Editor Name (Default) = C:\Program Files\Vim\vim71\gvim.exe

สร้างไฟล์ใหม่ชื่อ change-defaut-viewer.reg แล้ว copy ในข้อความข้างล่างนี้ไปใช้

1
2
3
4
Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name]
@="C:\\Program Files\\Vim\\vim71\\gvim.exe"

สำหรับบรรทัดสุดท้าย ให้เปลี่ยนเป็นที่อยู่ของ editor ที่ต้องการใช้สำหรับ view source

*แล้วพบกลับเทคนิคการใช้งาน VIM ที่นี่ … เร็วๆ นี้ครับ