ทำออกมาแล้วได้ประมาณนีครับ

อันดับแรก ติดตั้ง Official Plugin กันก่อนครับ
เนื่องจากเราไม่มี apt-get เหมือนบน linux เลยต้องใช้ Dawin Ports แทน
cd /opt/local/bin/portslocation/dports/gedit-plugins % sudo port install gedit-plugins
ใครสนใจ download มา compile เองเอาได้ที่นี้ครับ
- Download ได้จาก live.gnome.org/GeditPlugins
- Direct download gedit-plugins-2.18.0.tar.gz
Plugin ที่เราต้อง enable คือ
- Session Saver: you can save the status of the tabs/files opened
- Snippets: use quicly the most useful piece of code
- File Browser Pane: a mini file browser embedded in the editor
- Code comment: a shortcut to comment your code. Many languages are supported
- กด ctrl + m เพื่อ comment
- กด ctrl + shift + m เพื่อ un comment
ทำตัว Snap open
เมื่อก่อนจะพยายามเปิดจากด้านข้าง พอผึก Snap open มานานๆ พอเริ่มจำได้ก็เริ่มติด นอกจากจะเร็วแล้วยังช่วยให้เราจำไฟล์ในโปรแกรมของเราได้อีกด้วย
- Download ได้จาก upperbound.net
- Direct download snapopen-1.1.4.tar.gz
เมื่อ download มาแล้วให้ untar ไฟล์แล้วนำทั้ง folder และไฟล์ plugin ไปใส่ไว้ที่
~/.gnome2/gedit/plugins
จากนั้นเข้าไปเปิดใช้ plugin ที่ menu > Edit > Preferences > plugins > Snap Open
วิธีใช้ให้กด ctrl + alt + o ในการใช้ Snap Open
ปัญหาที่เจอคือเรากด alt ไม่ได้ครับ :( ทางแก้คือ
สร้างไฟล์ .xmodmap ขึ้นมาแล้วใส่ code ข้างล่างลงไป
clear Mod1 keycode 66 = Alt_L keycode 69 = Alt_R add Mod1 = Alt_L add Mod1 = Alt_R
save แล้ว restart X11 เป็นอันเรียบร้อย
ติด plugin Class browser
plugin นี้สำหรับคนที่มีไฟล์ยาวโดยเฉพาะครับ
- Download ได้จาก stambouliote
- Direct download gedit_classbrowser-0.2.1.tar.gz
untar แล้วเอาไปไว้ที่เดิม ~/.gnome2/gedit/plugins
เมื่อ enable ผ่าน menu > Edit > Preferences > plugins เป็นอันเรียบร้อย
ปัญหาคือมันเปิดเป็นหน้าต่างทิ้งไว้แบบ netbean หรือ eclipse ไม่ได้ต้องคอย click อยู่เรื่อยๆ (ยังไม่รู้ short cut)
ใส่ syntax highlight ของ .rhtml, .html.erv และไฟล์อื่นๆ ของ rails ด้วยสามคำสั่งครับ
curl http://robzon.kapati.net/rails/rhtml.lang > rhtml.lang sudo mv rhtml.lang /opt/local/share/gtksourceview-2.0/language-specs curl http://robzon.kapati.net/rails/rails.xml > rails.xml sudo mv rails.xml /opt/local/share/mime/packages sudo update-mime-database /opt/local/share/mime
สามคำสั่งนี้ไม่เหมือนของ linux ต้องเปลี่ยน /usr เป็น /opt/local/share ครับ กับ leopard ไม่ได้ลง wget มาให้ แต่มี curl มาแทน
ติดตั้ง Word Completion
- Download ได้จาก elias.hiex.at
- Direct download auto_completion.gedit-plugin
- Direct download 2 auto_completion.py ต้องเอามาทั้งสองไฟล์ครับ สำหรับไฟล์แรกตอน download มา leopard จะเติม .txt ให้ ต้องลบออกไปก่อนนะครับ
untar แล้วเอาไปไว้ที่เดิม ~/.gnome2/gedit/plugins เมื่อ enable ผ่าน menu > Edit > Preferences > plugins เป็นอันเรียบร้อย
ถึงขั้นตอนสำคัญสุด การทำ themes ให้เหมือน textmate ครับ
ติดตั้ง Dark scheme สามารถ Download ได้จาก http://grigio.org, Direct download darkmate.xml การติดตั้งให้เข้าไปที่ menu > Edit > Preferences > Font & Color > "+ Add..."
เลือก font เป็น monaco ครับ ของ windows กับ linux ต้องไป download มา แต่ของ mac มีอยู่แล้น
ส่วนของการทำ test ขอละไว้ก่อนนะครับ (มีปัญหากับ ruby-gnome2)
ที่มา grigio.org
ปล. Plugin อื่นๆ ที่ผมเลือกใส่จะมี
- Color Picker: เอาไว้ใช้ generate Hex code ของสีครับ
- Tag list: เอาไว้ดูว่า ตัวอักษรประหลาดต้องเขียนแบบไหนใน HTML
- Draw Spaces: เอาไว้เขียนรูป tab "->" และช่องว่าง "." ครับ เลือกเป็นสีเข้มๆ ซัก #313131 กำลังดี
| Attachment | Size |
|---|---|
| gedit.png | 13.88 KB |
| gedit3.png | 81.32 KB |
ทำไมต้องใช้ gedit บน leopard ด้วยครับ เมื่อมี textmate แล้ว
ไม่มีให้ลงชื่อ ก็ลงชื่อตรงนี้ละกัน PunNeng
ที่ทำงานใช้ gedit น่ะครับ เลยมีจิตนาการว่า ใช้ให้เหมือนกันไปเลยดีกว่า พวก short cut กับเทคนิคการ config จะได้เหมือนกันไปเลยครับ แม้ว่าเครื่องจะมี software ผิดกฏหมายอยู่บ้าง แต่ใช้ของถูกต้องก็สบายใจครับ
ทั้งหมดเหมือนข้ออ้างครับ จริงๆ ในใจคือเห็นว่าตัวทำ auto complete มันห่วยมากๆ พอเข้าไปดูวิธี set แล้วไม่ยากอย่างที่คิด ทำให้เกิดความรู้สึกว่าอยากเข้าไปทำให้มันดีๆ จะเอามาทำที่ทำงานก็กะไรอยู่ แต่ไม่กล้าพูดตอนแรกเพราะอายน่ะครับ ตอนนี้ยังทำไม่สำเร็จเลย :p
Apirak.com Panatkool
Post new comment