⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gedit.sgml

📁 一个简单的文本编辑器
💻 SGML
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE Article PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"[
<!ENTITY version "0.9.0">
]>

<article id="index">

  <artheader>
  <title>gedit</title>

  <copyright>
    <year>1998, 1999, 2000</year>
    <holder>Alex Roberts and Evan Lawrence</holder>
  </copyright>
  <copyright>
   <year>2000</year>
   <holder>Eric Baudais (Documentation Author)</holder>
  </copyright>

  <!-- translators: uncomment this:

  <copyright>
   <year>2000</year>
   <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
  </copyright>

   -->

  <legalnotice>
   <para>
    Permission is granted to copy, distribute and/or modify this
    document under the terms of the <citetitle>GNU Free Documentation
    License</citetitle>, Version 1.1 or any later version published
    by the Free Software Foundation with no Invariant Sections, no
    Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy
    of the <citetitle>GNU Free Documentation License</citetitle> from
    the Free Software Foundation by visiting <ulink type="http"
    url="http://www.fsf.org">their Web site</ulink> or by writing to:
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
   </para>
   <para>
    Many of the names used by companies to distinguish their products and
    services are claimed as trademarks. Where those names appear in any
    GNOME documentation, and those trademarks are made aware to the members
    of the GNOME Documentation Project, the names have been printed in caps
    or initial caps.
   </para>
  </legalnotice>

  <!-- this is version of manual, not application --> 
  <releaseinfo>
  This is version 1.0 of the gedit manual.
  </releaseinfo>

  </artheader>

  <sect1 id="intro">
    <title>Introduction</title>

    <para>
      <application>Gedit</application> is a light-weight text editor.  It has 
      all the basic features you come to expect from a simple text editor, but 
      <application>gedit</application> has a native graphic user interface (GUI).  
      <application>Gedit</application> also has command line arguments available to 
      users to quickly and easily view and edit files from a <systemitem>terminal</systemitem>.  
      Overall, <application>gedit</application> is an easy to use text editor with 
      utilizing the powerful capabilities of the <systemitem>GNOME desktop</systemitem>.
    </para>

    <para>
      <application>Gedit</application> has a verastile plug-in architecture to extend its
      capablilties.  This allows you to perform functions you don't normally except from a text 
      editor, such as piping the outputing of a shell command to the screen.  
      The plug-in architecture also lets you email people, 
      browse the internet, or produce a <command>diff</command> from <application>gedit</application>.
    </para>

    <para>
      <application>Gedit</application> provides a variety of ways to accomplish all your 
      text editing needs.  <application>Gedit</application> has the traditional menu, 
      with all the commands, tools, and options.  It also has a toolbar, where the commands 
      you use most often will be found.  You can also place the menu and the toolbar anywhere on 
      the desktop you choose, for quick access.  <application>Gedit</application> also has 
      a menu in the <interface>text window</interface>.  You need to click the right mouse button 
      to access the menu.  Inside you'll see the common editing commands you use the most.  
      <application>Gedit</application> provides a <interface>menu</interface>, 
      <interface>toolbar</interface>, and <interface>right click menu</interface> in order to 
      give you the quickest and easiest access to <application>gedit's</application> commands.
    </para>
    
    <para>
      To run <application>gedit</application>, select 
      <guimenuitem>gedit</guimenuitem> from the
      <guisubmenu>Applications</guisubmenu> submenu of the <guimenu>Main
      Menu</guimenu>, or type <command>gedit</command> on the
      command line. 
    </para>
    
    <para>
      <application>Gedit</application> is a basic application of the
      GNOME desktop environment. This document describes version
      &version; of <application>gedit</application>.
    </para>
  </sect1>

  <sect1 id="usage">
    <title>Using gedit</title>

    <para>
      A text editor is an essential tool for your GNOME desktop.  From 
      writing a small document, editing a configuration file, or composing 
      a webpage, <application>gedit</application> will fill your 
      need.  <!--Another useful feature is <application>gedit's</application> 
      <link linkend="plugins">plug-ins</link>.  They extend the functionality 
      of the basic text editor.-->
    </para>

    <para>
      Starting <application>gedit</application> opens 
      the <interface>Main window</interface>.

      <figure id="mainwindow-fig">
	<title>gedit Main Window</title>
	<screenshot>
	  <screeninfo>gedit Main Window</screeninfo>
	  <graphic fileref="images/gedit" format="png"
		   srccredit="Eric Baudais">
	  </graphic>
	</screenshot>
      </figure>

      From here you see the <link linkend="menubar">menu bar</link> 
      which has all the options and tools for <application>gedit</application>.  
      You also see the toolbar with all 
      the basic commands you will probably use the most in 
      <application>gedit</application>.  If you right-click on the text window, 
      under the toolbar, a <link linkend="pop-up-menu">pop-up menu</link> 
      will appear displaying some common editing and file commands.
    </para>

    <para>
      <application>Gedit</application> has <link linkend="plugins">plug-ins</link> 
      so you can send a quick email to a friend, lookup a 
      webpage if you need help with your work, or produce a file that tells 
      the difference between two other files, using the <command>diff</command> command.  
      The shell output plugin inserts the output of any shell command into 
      <application>gedit</application>.  <application>Gedit's</application> 
      plug-ins will let you insert the current time in your document, as it 
      appears in <command>date</command>, insert the phrase <quote>Hello World</quote>
      in your current document, reverse the letters in the current document 
      you're editing, or convert a decimal number to either a hexidecimal 
      or octal number
      <footnote>
	<para>
	  Decimal, hexidecimal, and octal numbers are number with a different base.  
	  A decimal number has a base of 10, these are numbers you see everyday, 
	  hexidecimal number has a base of 16, and octal numbers have a base of 8.  
	  So, a decimal number of 45 would be 2D in hexidecimal, and 55 in octal.
	</para>
      </footnote>
      and back again.
    </para>

    <sect2 id="usage-commandline">
      <title>Using gedit from the Command line</title>
      
      <para>
	<application>Gedit</application> can also be started from the command line, 
	by typing <command>gedit</command> with the name of the file you want to 
	edit.  This will open a new <interface>Main Window</interface> of 
	<application>gedit</application> with the file you typed in the command line.
	You can also open multiple files in <application>gedit</application> from 
	the command line.  You type <command>gedit</command> with each file's 
	name, separated by a space, after the command <command>gedit</command>.  
	So, to open the three files <filename>file1.txt</filename>, 
	<filename>file2.txt</filename>, and <filename>file3.txt</filename>, you 
	need to type <command>gedit</command> <filename>file1.txt</filename> 
	<filename>file2.txt</filename> <filename>file3.txt</filename> in a terminal 
	and <application>gedit</application> will open the three file listed above.  
	This feature is very handy to quickly edit a configuration file or script 
	while you are using your favorite shell.
	<note>
	  <para>
	    If you open a file using <application>gedit</application> from a 
	    <systemitem>X terminal</systemitem> and then kill the 
	    <systemitem>X terminal</systemitem>, the <application>gedit</application> 
	    you opened will also be killed.  This happens because 
	    <application>gedit</application> is a child process of the 
	    <systemitem>X terminal</systemitem>, the parent process.  In the 
	    Unix environment if you kill the parent process, all the child processes 
	    that are spawned by the parent process are killed.  Killing all the 
	    <quote>children</quote> of the parent process is very useful in 
	    a Unix environment.  It's really okay if you don't understand the above 
	    explanation.  Just remember if you open gedit in a 
	    <systemitem>X terminal</systemitem> and kill the <systemitem>X terminal</systemitem>, 
	    <application>gedit</application> will also be killed.
	  </para>
	</note>
      </para>

      <para>
	<application>Gedit</application> also has support for pipes when you use it 
	in a <systemitem>console</systemitem> or <systemitem>X terminal</systemitem>.  
	When you use a pipe with <application>gedit</application>, on the command line, 
	<application>Gedit</application> is opened and the output of the other 
	command that is piped to <application>gedit</application> is displayed as 
	a text file in <application>gedit's</application> <interface>Main Window</interface>.
	For example if you want to display a listing of what files are in a specific 
	directory using the <command>ls</command> command, you will type <command>ls</command> 
	<command>|</command> <command>gedit</command>.  
	<footnote>
	  <para>
	    The | (pipe) character varies from keyboard to keyboard, but it will, most often, be 
	    underneath the \ (backslash)character.  Some common places to look for the pipe 
	    character is: to the right on the shift key on the right side of the keyboard, to 
	    the right of the ] (square bracket) key or above the enter key on the right side 
	    of the keyboard, or to the left of the backspace key on the right side of the keyboard.
	  </para>
	</footnote>
	The output of <command>ls</command>, 
	that is normally displayed on the <systemitem>console</systemitem> or 
	<systemitem>X terminal</systemitem>, will be displayed in 
	<application>gedit</application> as a new text file.  This option is very useful 
	for commands that display their output too fast or if you want to use the output 
	in a text file.
      </para>
    </sect2>
<!--  ***FIXME: Need to write something about the toolbar?***  -->
<!--    <sect2 id="toolbar">
      <title>Toolbar</title>
      <para>
      <figure id="toolbar-fig">
	<title>gedit Toolbar</title>
	<screenshot>
	  <screeninfo>gedit toolbar</screeninfo>
	  <graphic fileref="images/toolbar" format="png"
		   srccredit="dkw">
	  </graphic>
	</screenshot>
      </figure>
      </para>
    </sect2>
-->
  </sect1>

  <sect1 id="plugins">
    <title>Plug-ins</title>

    <para>
      There are many plugins that come with <application>gedit</application>.  They are meant 
      to extend and enhance the abilities of <application>gedit</application>.  The plugins are 
      separate from the main program and thus supplement <application>gedit</application> while 
      only adding the capabilities and size to <application>gedit</application> that you want.
    </para>

      <figure id="manager-fig">
	<title>Plugin Manager</title>
	<screenshot>
	  <screeninfo>plugin manager</screeninfo>
	  <graphic fileref="images/manager" format="png"
		   srccredit="Eric Baudais">
	  </graphic>
	</screenshot>
      </figure>

    <para>
      When <application>gedit</application> starts, you will see in the <guimenu>Plugins</guimenu> 
      menu a menu item for each of the installed plugins.  You need to open the 
      <guimenuitem>Manager&hellip;</guimenuitem> to choose which plugins 
      you want to enable in <application>gedit</application>.  The plugin manager lets you choose 
      only the plugins you want to use.  You will notice only the plugins you install will be shown 
      in the <guimenu>Plugin</guimenu> menu.  Click on which plugin you want to install, 
      in the left window, and then press the <guibutton>Add</guibutton> button.  This will install one plugin in 
      <application>gedit</application> and put the plugin in the <guimenu>Plugin</guimenu> menu, so 
      you can run the plugin.  If you want to install all the plugins, just press the 
      <guibutton>Add All</guibutton> button.  To uninstall a plugin in <application>gedit</application>, 
      click on the plugin you want to uninstall, in the right window, and press the <guibutton>Remove</guibutton> 
      button.  If you want to disable all the plugins, just press the <guibutton>Remove All</guibutton> 
      button.
    </para>

    <sect2 id="browse">
      <title>The Browse Plugin</title>

      <figure id="browse-fig">
	<title>Browse Plugin</title>
	<screenshot>
	  <screeninfo>browse plugin</screeninfo>
	  <graphic fileref="images/browse" format="png"
		   srccredit="Eric Baudais">
	  </graphic>
	</screenshot>
      </figure>

      <para>
	The <guimenuitem>browse</guimenuitem> plugin has a text window to enter the url of the webpage 
	you want to visit.  When you enter the url, <application>gedit</application> displays the 
	webpage in the <systemitem>main window</systemitem>.  If <application>Lynx</application> does 
	not have the correct path, at the bottom 
	of the dialog, you can change it by clicking the <guibutton>Change</guibutton> button.
	<figure id="mlynx-fig">
	  <title>Change Lynx Path</title>
	  <screenshot>
	    <screeninfo>change lynx path</screeninfo>
	    <graphic fileref="images/lynx" format="png"
		   srccredit="Eric Baudais">
	    </graphic>
	  </screenshot>
	</figure>
	You then need to enter the correct path for your system in the text window or click the 
	<guibutton>Browse</guibutton> button to find <filename>lynx</filename> on your system.
	After you have all the correct fields filled in, press the <guibutton>OK</guibutton> to 
	display the webpage.
      </para>
    </sect2>

    <sect2 id="diff">
      <title>The Diff Plugin</title>

      <figure id="diff-fig">
	<title>Diff Plugin</title>
	<screenshot>
	  <screeninfo>diff plugin</screeninfo>
	  <graphic fileref="images/diff" format="png"
		   srccredit="Eric Baudais">
	  </graphic>
	</screenshot>
      </figure>

      <para>
	The <guimenuitem>diff</guimenuitem> plugin has two ways to select the file you want to 
	determine its difference. You can select the original file from the list of files you have opened 
	in <application>gedit</application>.  You can also enter the original file in 
	the first text window (the one on the left).  You then enter the revised file in the second text 
	window (the one on the right) or by selecting the file from the list of opened files in 
	<application>gedit</application> (on the right).  The difference of the files will then be seen in the 
	<systemitem>Main Window</systemitem>.

	<note>
	  <para>
	    <application>Gedit</application> runs the <command>diff</command> command on the two files 
	    you enter in the dialog.  The output is then displayed in <application>gedit's</application> 
	    <systemitem>Main Window</systemitem>.  If the first file entered is <filename>file1.txt</filename> 
	    and the second file entered is <filename>file2.txt</filename>, then the gedit will display the 
	    output of the command <prompt>$</prompt><command>diff</command> <filename>file1.txt</filename> 
	    <filename>file2.txt</filename>.
	  </para>
	</note>
      </para>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -