commander.page 2.54 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" type="topic" style="task" id="plugin-commander" xml:lang="zh-CN">

  <info>
    <link type="guide" xref="gedit-plugin-guide#gedit-additional-plugins"/> 
    <revision version="3.4" date="2013-02-24" status="review"/>

    <credit type="author">
      <name>Jim Campbell</name>
      <email its:translate="no">jwcampbell@gmail.com</email>
    </credit>

    <desc>Use a command-line interface for advanced editing.</desc>
  </info>

  <title>Commander</title>

  <p>The <app>Commander</app> plugin is a plugin for advanced <app>gedit</app>
  users that allows you to perform command-line actions on the current file. To
  enable the commander plugin, select
  <guiseq><gui style="menu">gedit</gui><gui style="menuitem">Preferences</gui>
  <gui>Plugins</gui><gui>Commander</gui></guiseq>.</p>

  <p>Once you have enabled the plugin, activate it by pressing
  <keyseq><key>Ctrl</key><key>.</key></keyseq>.</p>
  
  <note style="tip">
    <p>The last key in the above key combination is a period.</p>
  </note>

  <table frame="all" rules="all">
    <thead>
      <tr>
        <td><p>Action</p></td>
	<td><p>Keyboard shortcut</p></td>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><p>See an overview of available commands</p></td>
	<td><p><keyseq><key>Tab</key><key>Tab</key></keyseq></p></td>
      </tr>
      <tr>
        <td><p>Find a word within the current file</p></td>
	<td>
	  <p><key>/</key> <input>foo</input></p>
          <p>This will find the word <input>foo</input>.</p>
	</td>
      </tr>
      <tr>
        <td><p>Replace a word within the current file</p></td>
	<td>
	  <p><keyseq><key>/</key><key>/</key></keyseq>
	  <input>foo bar</input></p>
          <p>This will replace <input>foo</input> with
	  <input>bar</input>.</p>
	</td>
      </tr>
      <tr>
        <td><p>Move the cursor to a certain line number in your file</p></td>
        <td>
	  <p>go <input>[line number]</input> <em>or</em> just <key>G</key>
	  <input>[line number]</input></p>
        </td>
      </tr>
      <tr>
        <td><p>Toggle the bookmark indicator for the current line</p></td>
        <td><p>bookmark <em>or</em> just <key>B</key></p></td>
      </tr>
    </tbody>
  </table>
  
  <note style="tip">
    <p>Some commands, such as the <app>bookmark</app> command require that the
    appropriate plugin be installed and activated. If you do not have the
    appropriate plugin installed and activated, you will receive an error
    message.</p>
  </note>

</page>