The External Tools plugin allows you to execute external commands from gedit. You can pipe some content into a command and exploit its output (for example, sed), or launch a predefined command (for example, make).
Use the External Tools Manager to create and edit commands. To run an external command, choose it from the menu.
The following commands are provided with the External Tools plugin:
- Build
-
Runs make in the current document's directory.
- Directory Listing
-
Lists the contents of the current document's directory in a new document.
- Environment Variables
-
Displays the environment variables list in the bottom pane.
- Grep
-
Searches for a term in all files in the current document directory, using pattern matching. Results are shown in the bottom pane.
- Remove Trailing Spaces
-
Removes all spaces from the end of lines in the document.
To add an external command, choose .
In the External Tools Manager window, click New. You can speficy the following details for the new command:
- Description
-
This description is shown in the statusbar when the menu command is chosen.
- Accelerator
-
Enter a keyboard shortcut for the command.
- Commands
-
The actual commands to be run. Several gedit environment variables can be used to pass content to these commands: see หัวข้อ 10.4.4 Variables.
- Input
-
The content to give to the commands (as stdin): the entire text of the current document, the current selection, line, or word.
- Output
-
What to do with the output of the commands: display in the bottom pane, put in a new document, or place in the current document, at the end, at the cursor position, or replacing the selection or the entire document.
- Applicability
-
Determines which sort of documents can be affected by the command, for example whether saved or not, and local or remote.
To edit a tool, select it in the list and make changes to its properties.
To rename a tool, click it again in the list.
To restore a built-in tool that you have changed, press Revert.
To remove a tool, select it in the list and press Remove. You can not remove built-in tools, only those you have created yourself.
You can use the following variables in the Commands field of the command definition:
-
GEDIT_CURRENT_DOCUMENT_URI
-
GEDIT_CURRENT_DOCUMENT_NAME
-
GEDIT_CURRENT_DOCUMENT_SCHEME
-
GEDIT_CURRENT_DOCUMENT_PATH
-
GEDIT_CURRENT_DOCUMENT_DIR
-
GEDIT_DOCUMENTS_URI
-
GEDIT_DOCUMENTS_PATH
เกี่ยวกับ
สงวนลิขสิทธิ์
- สงวนลิขสิทธิ์ © 2550 โครงการเอกสาร GNOME
- สงวนลิขสิทธิ์ © 2545, 2546, 2547 ซัน ไมโครซิสเท็มส์
- สงวนลิขสิทธิ์ © 2543 Eric Baudais
- สงวนลิขสิทธิ์ © 2008 Tosaporn Kijosoth (naneng@gmail.com)
ข้อกฎหมาย
อนุญาตให้ทำซ้ำ เผยแพร่ และ/หรือ ดัดแปลงเอกสารนี้ได้ ภายใต้เงื่อนไขของ GNU Free Documentation License (GFDL) รุ่น 1.1 หรือรุ่นถัดมารุ่นใดๆ ที่เผยแพร่โดยมูลนิธิซอฟต์แวร์เสรี (Free Software Foundation) โดยไม่มี "หัวข้อห้ามเปลี่ยน" (Invariant Sections), ไม่มี "ข้อความปกหน้า" (Front-Cover Texts) และไม่มี "ข้อความปกหลัง" (Back-Cover Texts) คุณสามารถอ่านสำเนาของ GFDL ได้จาก ลิงก์นี้ หรือในแฟ้ม COPYING-DOCS ที่เผยแพร่มาพร้อมกับคู่มือนี้
คู่มือนี้ เป็นส่วนหนึ่งของชุดคู่มือ GNOME ที่เผยแพร่ภายใต้ GFDL ถ้าคุณต้องการเผยแพร่คู่มือนี้แยกต่างหากจากชุด คุณสามารถทำได้โดยเพิ่มสำเนาของสัญญาอนุญาตไปกับคู่มือ ตามที่อธิบายในข้อ 6 ของสัญญาอนุญาต
มีชื่อหลายชื่อที่บริษัทต่างๆ ใช้แยกความแตกต่างของผลิตภัณฑ์และบริการของตนจากบริษัทอื่น และอ้างเป็นเครื่องหมายการค้า ที่ใดก็ตามที่ชื่อเหล่านั้นปรากฏในเอกสารของ GNOME และสมาชิกโครงการเอกสาร GNOME ได้รับทราบเกี่ยวกับเครื่องหมายการค้าเหล่านั้น ชื่อเหล่านั้นจะเขียนด้วยตัวพิมพ์ใหญ่ หรือขึ้นต้นด้วยตัวพิมพ์ใหญ่
เอกสารนี้และฉบับดัดแปลงของเอกสารนี้ เผยแพร่ภายใต้เงื่อนไขของ GNU FREE DOCUMENTATION LICENSE พร้อมด้วยความเข้าใจในสิ่งต่อไปนี้:
-
เอกสารนี้ เผยแพร่ตามสภาพที่เป็น โดยไม่มีการรับประกันใดๆ ทั้งสิ้น ไม่ว่าจะโดยชัดแจ้งหรือโดยนัย ซึ่งรวมถึงโดยไม่ได้จำกัดเพียงการรับประกันว่าเอกสารนี้หรือฉบับดัดแปลงของเอกสารนี้จะปลอดจากข้อผิดพลาดที่อาจเรียกร้องความเสียหายได้ หรือเหมาะกับวัตถุประสงค์เฉพาะใดๆ หรือไม่มีการละเมิดสิทธิ์ ความเสี่ยงทั้งหมดเกี่ยวกับคุณภาพ ความถูกต้อง และประสิทธิภาพของเอกสารนี้หรือฉบับดัดแปลงของเอกสารนี้ อยู่ที่ตัวคุณ หากมีการพิสูจน์พบว่าเอกสารนี้หรือฉบับดัดแปลงมีข้อบกพร่องในแง่ใดๆ ก็ตาม คุณ (ไม่ใช่ผู้เขียนเริ่มแรก หรือผู้ร่วมสมทบใดๆ) จะรับภาระค่าใช้จ่ายของการให้บริการ การซ่อมแซมหรือแก้ไขที่จำเป็น คำปฏิเสธความรับผิดชอบเกี่ยวกับการรับประกันนี้ เป็นส่วนสำคัญของสัญญาอนุญาตนี้ ไม่อนุญาตให้ใช้เอกสารนี้หรือฉบับดัดแปลงของเอกสารนี้ นอกจากจะอยู่ภายใต้คำปฏิเสธความรับผิดชอบนี้ และไม่มีสภาวะใดและทฤษฎีทางกฎหมายใด ไม่ว่าจะในการล่วงละเมิด (รวมถึงการละเลย), ในสัญญา หรืออื่นๆ ที่ผู้เขียน ผู้เขียนเริ่มแรก ผู้ร่วมสมทบใดๆ หรือผู้เผยแพร่เอกสารนี้หรือฉบับดัดแปลง หรือผู้สนับสนุนแก่กลุ่มคนดังกล่าว จะมีภาระผูกพันต่อบุคคลใดในความเสียหายโดยตรง โดยอ้อม โดยพิเศษ โดยบังเอิญ หรือโดยผลพวง ของสิ่งใด รวมถึงโดยไม่จำกัดเพียงความเสียหายในเรื่องความสูญเสียเจตนาดี การสะดุดของงาน ความล้มเหลวหรือการทำงานผิดพลาดของคอมพิวเตอร์ หรือความเสียหายหรือความสูญเสียอื่นใดทั้งหมด ที่เกิดขึ้นจาก หรือเกี่ยวข้องกับการใช้เอกสารนี้หรือฉบับดัดแปลง แม้กลุ่มบุคคลเหล่านั้นจะได้รับทราบความเป็นไปได้ของความเสียหายดังกล่าวก็ตาม
ข้อเสนอแนะ
หากพบปัญหาหรือมีข้อเสนอแนะสำหรับโปรแกรม gedit หรือเกี่ยวกับคู่มือนี้ กรุณาแจ้งให้เราทราบ ตามขั้นตอนใน หน้าเสนอแนะ GNOME