查错:gedit-mast 的简体中文翻译

帖子: 7392
注册时间: 2007-11-25 13:29
系统: 14/16/18/Fedroa22/w7
来自: 新疆博乐
送出感谢: 29 次
接收感谢: 95 次

查错:gedit-mast 的简体中文翻译


帖子 TeliuTe » 2011-04-17 23:27

@@image: 'figures/gedit-icon.png'; md5=a7174de2671462e1ac4f80a82ad09184
@@image: 'figures/gedit-icon.png'; md5=a7174de2671462e1ac4f80a82ad09184

gedit Text Editor
gedit 文本编辑器

Jim Campbell
Jim Campbell


<media type=\"image\" mime=\"image/png\" src=\"figures/gedit-icon.png\"></media> gedit Text Editor
<media type=\"image\" mime=\"image/png\" src=\"figures/gedit-icon.png\"></media> gedit 文本编辑器

Welcome to the <app>gedit</app> help guide. For a quick introduction into both <app>gedit's</app> most basic features, as well as some advanced keyboard shortcuts, visit the <link xref=\"gedit-quickstart\">Get started with gedit</link> and <link xref=\"gedit-shortcut-keys\">Shortcut keys</link> pages.
欢迎来到 <app>gedit</app> 帮助指南,要获得 <app>gedit</app> 最基本特性的快速指导,以及一些高级键盘快捷键,请访问 <link xref=\"gedit-quickstart\">gedit 快速入门</link> 和 <link xref=\"gedit-shortcut-keys\">键盘快捷键</link> 页面。

Other help topics are grouped together into sections below. Enjoy using <app>gedit</app>!
其他的帮助主题,放在了后续的章节中,祝您使用 <app>gedit</app> 愉快!

Working With Files

Configure gedit
配置 gedit

gedit Plugins
gedit 插件

Printing with gedit
gedit 打印

@@image: 'figures/gedit-side-pane2.png'; md5=e7a12a43adc9c9cb8c992ad22a815a57
@@image: 'figures/gedit-side-pane2.png'; md5=e7a12a43adc9c9cb8c992ad22a815a57

Daniel Neel
Daniel Neel


View a list of files in the side pane

Keeping track of a large number of files using tabs can be difficult. One way of managing large numbers of files is viewing them in a side pane. Side panes allow you to view more files at a time than is possible using tabs alone.

To view a list of open files in a side pane, click <guiseq><gui>View</gui><gui>Side Pane</gui></guiseq>. A pane will appear to the left of the workspace with a listing of all currently open files. Clicking a file in the side pane will display that file in the workspace.
要用侧边栏查看打开的文件,点菜单 <guiseq><gui>查看</gui><gui>侧边栏</gui></guiseq>,在工作区的左侧将会出现一个面板,显示当前打开文件列表,点击文件名就会在工作区中看到相应的文件。

The side pane also contains a <app>File Browser</app> view. If the pane displays a file directory instead of currently open files, click <media type=\"image\" mime=\"image/png\" src=\"figures/gedit-side-pane2.png\">documents icon</media> at the bottom of the pane to switch to the <app>Documents</app> view.
侧边栏还包括一个 <app>文件浏览器</app> 视图,如果当前显示的是文件夹视图,点击侧边栏底部的 <media type=\"image\" mime=\"image/png\" src=\"figures/gedit-side-pane2.png\">文档图标</media> 来切换到 <app>文档</app> 视图面板。

The side pane only displays files that are open in the current window. When multiple windows are open, only the files in the current window will be displayed in the side pane.
侧边栏只显示当前打开的文件,当打开了多个 gedit 窗口时,只显示当前窗口中打开的文件。

Undo a recent action

We all make mistakes. Even <app>gedit</app> users make mistakes. Fortunately, <app>gedit</app> can help you recover from mistakes. To undo an action in <app>gedit</app>, press <keyseq><key>Ctrl</key><key>Z</key></keyseq>, or click <guiseq><gui>Edit</gui><gui>Undo</gui></guiseq>.
我们都会犯错误,当然 <app>gedit</app> 用户也不例外,幸运的是,<app>gedit</app> 可以帮助您从错误中恢复过来,要撤消上一次操作,按 <keyseq><key>Ctrl</key><key>Z</key></keyseq> 组合键,或者点菜单 <guiseq><gui>编辑</gui><gui>撤消</gui></guiseq> 命令。

<app>gedit</app> will undo one action every time you press <keyseq><key>Ctrl</key><key>Z</key></keyseq> or select <guiseq><gui>Edit</gui><gui>Undo</gui></guiseq> is pressed.
<app>gedit</app> 每次撤消一步,当您按 <keyseq><key>Ctrl</key><key>Z</key></keyseq> 组合键,或者点菜单 <guiseq><gui>编辑</gui><gui>撤消</gui></guiseq> 命令时。

Be careful. If you make a mistake outside of <app>gedit</app> (e.g., If you say something mean to your friend) <app>gedit</app> will not be able to help you undo that mistake.
请注意,如果您的错误超出了 <app>gedit</app> 的能力(比如,您对朋友说了什么),<app>gedit</app> 将不能帮助您恢复那样的错误。

Add and remove tabs

Working with tabs in <app>gedit</app> allows you to keep an eye on several files in a single window. The tab that is larger than the other tabs indicates the file that is currently open. The smaller tabs indicate other files that are available to work on.
在 <app>gedit</app> 中使用标签,可以让您在一个窗口中同时操作多个文件,当前窗口中显示的文档标签要比别的标签稍大些,较小的标签指示其他可用的文件。

Adding tabs

To add a new tab, create a new file with <keyseq><key>Ctrl</key><key>N</key></keyseq>. The tab will be added to the right side of any other tabs.
要添加一个新标签,按组合键 <keyseq><key>Ctrl</key><key>N</key></keyseq>,新出来的标签将会放在标签栏的最右边。

Removing tabs

To remove a tab, click the <guiseq><gui>X</gui></guiseq> on the tab's right side. To remove all open tabs, press <keyseq><key>Ctrl</key><key>Shift</key><key>W</key></keyseq>
要移除一个标签,点击标签右边的 <guiseq><gui>X</gui></guiseq> 按钮,要关闭所有打开的标签,按组合键 <keyseq><key>Ctrl</key><key>Shift</key><key>W</key></keyseq>。

Move and re-order tabs

Tabs in <app>gedit</app> can be moved, making it easier to work with your files. Tabs can be can re-ordered within the same window, moved outside of <app>gedit</app> (creating a new <app>gedit</app> window), and moved from one window to another.
<app>gedit</app> 中的标签可以移动,这样文件操作就更加方便,同一个窗口内的标签可以重新排序,也可以移出 <app>gedit</app>(创建一个新的 <app>gedit</app> 窗口),并且可以从一个窗口移到另外一个窗口中。

Change the order of tabs in the gedit window
在 gedit 窗口中改变标签顺序

To change the ordering of tabs in a window:

Click and hold the mouse button on the tab

Move the tab to the desired position among the other tabs

Release the mouse button

The tab will be placed in the position closest to where you release the tab, immediately beside other opened tabs.

Move a tab, creating a new gedit window
移动标签,创建一个新的 gedit 窗口

To drag a tab into a new window:

Drag the tab out of the space it occupies

or, while the tab to be moved is open, choose <guiseq><gui>Documents</gui><gui>Move to New Window</gui></guiseq>
或者,标签文档打开后,点菜单 <guiseq><gui>文档</gui><gui>移动到新窗口</gui></guiseq>。

It's difficult to drag a tab into a new window when either the old or new window is maximized. For best results, un-maximize the windows before dragging the tab.

Move a tab to another gedit window
将标签移到其他 gedit 窗口中

If you want to move a tab from one window to another:

Drag the tab to the new window

Place it beside other tabs in the new window

See <link xref=\"gedit-shortcut-keys#gedit-tab-shortcuts\"/> for shortcuts to make it easier to manage your tabs.
使用快捷键会更方便管理标签,请参阅:<link xref=\"gedit-shortcut-keys#gedit-tab-shortcuts\"/>。

Turn on syntax highlighting

Syntax Highlighting

<app>gedit</app> provides syntax highlighting for a wide range of markup, programming, and scientific languages. If <app>gedit</app> recognizes the syntax being used when you open a file, it will automatically highlight the text.
<app>gedit</app> 支持广泛的高亮语法,像标记语言、程序语言和科学语言等等,如果 <app>gedit</app> 识别出打开的文件,它将会自动显示高亮文本。

If your syntax or language is not highlighted upon startup, you can select the appropriate syntax or language by clicking <guiseq><gui>View</gui><gui>Highlight Mode</gui></guiseq>, and then choosing the desired syntax. Alternately, you can select the syntax name from a list at the bottom of the <app>gedit</app> window.
如果打开一种文件格式或语言后,没有显示高亮语法,您可以通过点菜单 <guiseq><gui>查看</gui><gui>突出显示模式</gui></guiseq> 来选择一种高亮格式。或者,您还可以从 <app>gedit</app> 窗口底部的格式列表中选择。

Spell-check your document

Using the spell-check feature in <app>gedit</app> requires that you first enable the spell-check plugin. To enable the plugin, select <guiseq><gui>Edit</gui><gui>Preferences</gui><gui>Plugins</gui><gui>Spell Checker</gui></guiseq>.
要在 <app>gedit</app> 中使用拼写检查功能,首先需要您启用拼写插件。要启用此插件,点菜单 <guiseq><gui>编辑</gui><gui>首选项</gui><gui>插件</gui><gui>拼写检查器</gui></guiseq>。

Select <guiseq><gui>Tools</gui><gui>Autocheck Spelling</gui></guiseq> to make <app>gedit</app> highlight spelling errors while you type.
点菜单 <guiseq><gui>工具</gui><gui>自动拼写检查</gui></guiseq>,<app>gedit</app> 会在您输入时,高亮显示错误的拼写。

Paolo Borelli
Paolo Borelli

Jesse van den Kieboom
Jesse van den Kieboom

Steve Frécinaux
Steve Frécinaux

Ignacio Casal Quinteiro
Ignacio Casal Quinteiro

Shortcut keys

Use <gui>shortcut keys</gui> to perform common tasks more quickly than with the mouse and menus. The following tables list all of <app>gedit's</app> shortcut keys.
使用<gui>快捷键</gui>执行常用任务,比用鼠标和菜单要快。下表列出了 <app>gedit</app> 的常用快捷键。

Tab-related Shortcut keys

To Do This

Press This

Switch to the next tab to the left

Ctrl + Alt + PageUp
Ctrl + Alt + PageUp

Switch to the next tab to the right

Ctrl + Alt + PageDown
Ctrl + Alt + PageDown

Close tab

Ctrl + W
Ctrl + W

Save all tabs

Ctrl + Shift + L
Ctrl + Shift + L

Close all tabs

Ctrl + Shift + W
Ctrl + Shift + W

Jump to <var>n</var>th tab
跳到第 <var>n</var> 个标签

Alt + <var>n</var>
Alt + <var>n</var>

Shortcut keys for working with files

Create a new document

Ctrl + N
Ctrl + N

Open a document

Ctrl + O
Ctrl + O

Save the current document

Ctrl + S
Ctrl + S

Save the current document with a new filename

Ctrl + Shift + S
Ctrl + Shift + S

Print the current document

Ctrl + P
Ctrl + P

Print preview

Ctrl + Shift + P
Ctrl + Shift + P

Close the current document

Quit gedit
退出 gedit

Ctrl + Q
Ctrl + Q

Shortcut keys for editing files

Undo the last action

Ctrl + Z
Ctrl + Z

Redo the last undone action

Ctrl + Shift + Z
Ctrl + Shift + Z

Cut the selected text or region and place it on the clipboard

Ctrl + X
Ctrl + X

Copy the selected text or region onto the clipboard

Ctrl + C
Ctrl + C

Paste the contents of the clipboard

Ctrl + V
Ctrl + V

Select all text in the file

Ctrl + A
Ctrl + A

Delete the current line

Ctrl + D
Ctrl + D

Move the selected line up one line

Alt + Up Arrow
Alt + 上方向键

Move the selected line down one line

Alt + Down Arrow
Alt + 下方向键

Shortcut keys for showing and hiding panes

Show / hide the side pane


Show / hide the bottom pane.

Ctrl + F9
Ctrl + F9

Shortcut keys for searching

Find a string

Ctrl + F
Ctrl + F

Find the next instance of the string

Ctrl + G
Ctrl + G

Find the previous instance of the string

Ctrl + Shift + G
Ctrl + Shift + G

Search and Replace

Ctrl + H
Ctrl + H

Clear highlight

Ctrl + Shift + K
Ctrl + Shift + K

Goto line

Ctrl + I
Ctrl + I

Shortcut keys for tools

Check spelling

Shift + F7
Shift + F7

Remove trailing spaces (with plugin)

Alt + F12
Alt + F12

Run \"make\" in the current directory (with plugin)


Directory listing (with plugin)

Ctrl + Shift + D
Ctrl + Shift + D

Shortcut keys for user help

Open the gedit user guide


Search for text

The Find tool can help you find specific sequences of text within in your file.

Finding text

Open the <gui style=\"menu\">search window</gui> by clicking <guiseq><gui>Search</gui><gui>Find</gui></guiseq> or pressing <keyseq><key>Ctrl</key><key>F</key></keyseq>. This will move your cursor to the start of the <gui>search window</gui>.
点菜单 <guiseq><gui>搜索</gui><gui>查找</gui></guiseq> 命令,打开 <gui style=\"menu\">搜索对话框</gui>,也可以按组合键 <keyseq><key>Ctrl</key><key>F</key></keyseq>。

Type the text you wish to search for in the <gui>search window</gui>.
在 <gui>搜索窗口</gui> 中输入您想要查找的文本。

As you type, <app>gedit</app> will begin highlighting the portions of text that match what you have entered.
在您输入的同时,<app>gedit</app> 就会高亮显示文档中的匹配项。

Use the <gui>up</gui> or <gui>down</gui> facing arrows next to the <gui>search window</gui> (or <keyseq><key>Ctrl</key><key>G</key></keyseq> or <keyseq><key>Ctrl</key><key>Shift</key><key>G</key></keyseq>) to scroll up or down through the highlighted text.
使用 <gui>搜索窗口</gui> 旁边的 <gui>向上</gui> 或 <gui>向下down</gui> 箭头切换到上一个或下一个匹配项,也可以按组合键 <keyseq><key>Ctrl</key><key>G</key></keyseq> 和 <keyseq><key>Ctrl</key><key>Shift</key><key>G</key></keyseq>。

To close the <gui>search window</gui>, press <key>Esc</key>.
要关闭 <gui>搜索窗口</gui>,按一下 <key>Esc</key> 键。

The text that you've searched for will remain highlighted by gedit, even after you have completed your search. To remove the highlight, click <guiseq><gui>Search</gui><gui>Clear Highlight</gui></guiseq>, or press <keyseq><key>Ctrl</key><key>Shift</key><key>K</key></keyseq>.
您搜索的文本会保持高亮状态,甚至搜索完毕还会高亮。要取消高亮状态,点菜单 <guiseq><gui>搜索</gui><gui>清除突出显示</gui></guiseq>,或者按组合键 <keyseq><key>Ctrl</key><key>Shift</key><key>K</key></keyseq>。

Save a file

To save a file in <app>gedit</app>, click on the disk-drive icon with the word <gui>Save</gui> next to it. You may also select <guiseq><gui>File</gui><gui>Save</gui></guiseq>, or just press <keyseq><key>Ctrl</key><key>S</key></keyseq>.
要保存当前文档,点击工具栏上的一个小磁盘图标,旁边写着 <gui>保存</gui>。您也可以点菜单 <guiseq><gui>文件</gui><gui>保存</gui></guiseq> 命令,或者按组合键 <keyseq><key>Ctrl</key><key>S</key></keyseq>。

If you are saving a new file, the <gui>Save File</gui> dialog will appear, and you can select a name for the file, as well as the directory where you would like the file to be saved.
如果您是第一次保存,会出现一个 <gui>另存为</gui> 对话框,您可以选择文件存储的位置,输入文件的名称。

Replace text

Editing text can be time consuming. To save time, <app>gedit</app> includes a <app>Replace</app> function that helps you to find and replace portions of text.
修改文本是比较费时的,为了节省时间,<app>gedit</app> 提供了一个 <app>替换</app> 功能,来帮助您查找并替换文本。

Replace text in <app>gedit</app>
在 <app>gedit</app> 中替换文本

Open the Replace tool by clicking <guiseq><gui>Search</gui><gui>Replace</gui></guiseq> or press <keyseq><key>Ctrl</key><key>H</key></keyseq>.
点菜单 <guiseq><gui>搜索</gui><gui>替换</gui></guiseq> 命令打开替换工具,也可以按组合键 <keyseq><key>Ctrl</key><key>H</key></keyseq>。

Enter the text that you wish to replace into the 'Search for:' field.

Enter the new, replacement text into the 'Replace with:' field.

Once you have entered the original and replacement text, select your desired replacement options:

To replace <em>only</em> the next matching portion of text, click <gui>Replace</gui>.
要替换文档中的<em>一个</em>匹配项,点 <guibutton>替换</guibutton>。

To replace <em>all occurrences</em> of the searched-for text, click <gui>Replace All</gui>.
要替换文档中的<em>所有</em>匹配项,点 <guibutton>替换全部</guibutton>。

Use the <gui>Replace All</gui> function with care. <gui>Replace All</gui> works on the entirety of your text file, and does not allow you to highlight portions of text where the replace function will be performed.
使用 <gui>全部替换</gui> 功能要仔细,它会替换文档中的所有项目,并且不会高亮显示被替换的文本。

More options

Match case

The <em>Match case</em> option allows you to specify whether you want your search to be case-sensitive. If this option is selected, searches will be case-sensitive. If not, searches will not be case-sensitive.
<em>区分大小写</em> 选项可以指定搜索时是否考虑大小写。选中此项搜索时将会区分字母的大小写,如果不选中,则不区分字母大小写。

Match entire word only

Use this option to search for a specific word without including fragments of other words. For example, if you searched for the word 'and' with this option selected, the word 'and' would be matched, but the words 's<em>and</em>' and 'comm<em>and</em>er' would not be matched.

Search backwards

This command behaves identically to the Find Previous command. If you wish to step through search results from end to beginning, select this option.

Wrap around

With the <app>wrap around</app> option enabled, <app>gedit</app> will re-start the search/replace action at the top of the file after it has reached the bottom of the file. This ensures that your search/replace action is made across your entire file.

@@image: 'figures/gedit3-screenshot.png'; md5=174aac884967f8e4226ab33d9498c60b
@@image: 'figures/gedit3-screenshot.png'; md5=174aac884967f8e4226ab33d9498c60b

Get started with gedit
开始使用 gedit

<app>gedit</app> is a full-featured text editor for the GNOME desktop environment. You can use it to prepare simple notes and documents, or you can use some of its advanced features, making it your own software development environment.
<app>gedit</app> 具备 GNOME 桌面环境的全部特性,您可以使用它书写简单的便笺和文档,也可以使用它的高级特性,让它成为一个软件开发平台。

Once <app>gedit</app> launches, you can start writing right away. To save your text, just click <gui>Save</gui>.
一旦打开了 <app>gedit</app> 文本编辑器,您就可以开始书写内容,要保存文件,请点击<gui>保存</gui>按钮。

To learn about additional <app>gedit</app> features and to get assistance with performing additional tasks, explore <link xref=\"index\">the other portions</link> of the <app>gedit</app> help.
要学习 <app>gedit</app> 的额外特性,进行别的任务,请访问 <app>gedit</app> 帮助的 <link xref=\"index\">其他部分</link>。

Printing with <app>gedit</app> requires that you have connected and configured your printer. If you have not done this, please consult the printing help documentation for your desktop environment.
在 <app>gedit</app> 中使用打印,需要您连接并配置好打印机,如果您还没有准备好,请查阅打印机在当前桌面环境下的文档。

<app>gedit</app> allows you to both print output to a file, as well as printing output to paper. Prior to printing your document, you can also preview how the printed document will look by using the <app>Print Preview</app> feature.
<app>gedit</app> 可以把文档打印到一个文件中,就像打印在纸上一样。在打印文档之前,您还可以使用<app>打印预览</app>功能,看一下打印的效果。

Printing to paper

Printing output to a file

You can also use <app>gedit</app> to print to a file. To do so, select <guiseq><gui>File</gui><gui>Print</gui><gui>Print to File</gui></guiseq>.
您也可以使用 <app>gedit</app> 打印到文件功能,点菜单 <guiseq><gui>文件</gui><gui>打印</gui><gui>打印到文件</gui></guiseq>。

Printing is enabled for the following file formats:

Portable Document Format (.pdf)

PostScript (.ps)
PostScript (.ps)

Scalable Vector Graphic (.svg)

Add a Terminal console to the bottom pane

<app>gedit</app> makes it possible to include an embedded version of <app>Gnome Terminal</app>, the GNOME command-line application, in the bottom pane of the <app>gedit</app> window. This will let you run scripts, install needed software, or test your program without leaving <app>gedit</app>.
<app>gedit</app> 可以在窗口底部面板中,添加一个 <app>GNOME 终端</app>,它是 GNOME 的命令行应用程序。这样您就可以不必离开 <app>gedit</app> 而运行脚本、安装所需软件,或者调试程序。

To enable this plugin, select <guiseq><gui>Edit</gui><gui>Preferences</gui><gui>Plugins</gui><gui>Embedded Terminal</gui></guiseq>.
要启用此插件,点菜单 <guiseq><gui>编辑</gui><gui>首选项</gui><gui>插件</gui><gui>内部终端</gui></guiseq>。

Once you have enabled the plugin, add the terminal to the bottom panel by selecting <guiseq><gui>View</gui><gui>Bottom Pane</gui></guiseq>, or just press <keyseq><key>Ctrl</key><key>F9</key></keyseq>.
一旦启用此插件,可以通过点菜单 <guiseq><gui>查看</gui><gui>底部面板</gui></guiseq>,把终端添加进来,或者按组合键 <keyseq><key>Ctrl</key><key>F9</key></keyseq>。

@@image: 'figures/gedit-side-pane3.png'; md5=4b800d370193ac0ed8db9eb33b86e11c
@@image: 'figures/gedit-side-pane3.png'; md5=4b800d370193ac0ed8db9eb33b86e11c

Automatically insert tags, strings and special characters into a document

The <app>Tag List</app> plugin allows you to insert common tags and special characters from a list in the side pane. By default, the plugin can insert tags and special characters for HTML, XHTML, XSLT, XUL and LaTeX.
<app>标记列表</app> 插件允许您从侧面板中,插入普通的标记和特殊的字符。默认情况,此插件可以插入 HTML、XHTML、XSLT、XUL 和 LaTeX 的标记和特殊字符。

Using the Tag List plugin

To use the <app>Tag List</app> plugin, you will need to enable the plugin, and then activate the tag-list portion of the side pane.
要使用 <app>标记列表</app> 插件,首先要启用此插件,然后在侧边栏底部选择标签列表按钮。

Enabling the Plugin

You can activate the plugin by selecting <guiseq><gui>Edit</gui><gui>Preferences</gui><gui>Plugins</gui><gui>Tag List</gui></guiseq>. Once you have activated the plugin, access it by selecting <guiseq><gui>View</gui><gui>Side Pane</gui></guiseq>, or by pressing <key>F9</key>.
你可以点菜单 <guiseq><gui>编辑</gui><gui>首选项</gui><gui>插件</gui><gui>标记列表</gui></guiseq> 启用此插件,然后点菜单 <guiseq><gui>查看</gui><gui>侧边栏</gui></guiseq>,或者按 <key>F9</key> 键。

The side pane initially shows a list of open documents, so to view and use the <app>tag list</app>, you will need to click on the tab showing the \"plus\" icon at the bottom of the side pane. The icon will look similar to this:

Inserting Tags and Special Characters

The <app>tag list</app> uses a drop-down menu to let you choose from the different types of tags. For example, one tag option is <gui>HTML - Tags</gui>.
<app>标记列表</app>中,使用下拉列表来选择不同类型的标记符号,例如,里面有一个 <gui>HTML-标记</gui>。

To start inserting tags, complete the following:

Move the cursor to where you will want to insert the tag or special character.

Select the desired tag type from the drop-down menu at the top of the side pane.

Scroll through the list to find the desired tag or character.

Double-click on the tag in the tag list.

The tag or special character you've chosen will then be displayed in your document.

Tag List Tips

You can also insert a tag by pressing <key>Return</key> or <keyseq><key>Shift</key><key>Return</key></keyseq>.
您也可以按<key>回车键</key>或 <keyseq><key>Shift</key><key>回车键</key></keyseq>来插入标记符号。

Pressing the <key>Return</key> key will insert the tag at the cursor position, and then return focus to the document. Pressing <keyseq><key>Shift</key><key>Return</key></keyseq> will insert the tag at the cursor position, but will keep the focus on the <app>tag-list</app>.
按 <key>回车键</key> 将在光标位置插入标记符号,然后焦点留在文档中,按 <keyseq><key>Shift</key><key>回车键</key></keyseq> 在光标位置插入标记符号,而焦点仍然在 <app>标记列表</app>。

You can see a preview of what text will be inserted for each tag and special character by clicking on the word the <gui>Preview</gui> at the bottom of the side pane.

Sort text into alphabetical order

The Sort plugin arranges selected lines of text into alphabetical order.

You cannot use the <gui>Undo</gui> feature to correct a <gui>Sort</gui> operation, so we recommend that you save the file immediately before performing the sort. If you make a mistake with the sort, you can revert to the previously-saved version of the file by selecting <guiseq><gui>File</gui><gui>Revert</gui></guiseq>.
由于<gui>排序</gui>无法使用<gui>撤消</gui>命令恢复,所以建议您在执行排序前保存文件,如果您发现排序操作产生错误,可以通过点菜单 <guiseq><gui>文件</gui><gui>还原</gui></guiseq> 命令,恢复为之前保存的文件。

To enable the <app>Sort</app> plugin, select <guiseq><gui>Edit</gui><gui>Preferences</gui><gui>Plugins</gui><gui>Sort</gui></guiseq>.
要启用<app>排序</app>插件,点菜单 <guiseq><gui>编辑</gui><gui>首选项</gui><gui>插件</gui><gui>排序</gui></guiseq>。

After you have enabled the <gui>Sort</gui> plugin, use it by selecting the lines of text you want to sort, and then clicking <guiseq><gui>Edit</gui><gui>Sort</gui></guiseq>.
在您启用<gui>排序</gui>插件后,选中您想要排序的多个行,然后点菜单 <guiseq><gui>编辑</gui><gui>排序</gui></guiseq>。

The Sort dialog will open, allowing you to choose between several sorting options:

<em>Reverse order</em> will arrange the text in reverse alphabetical order.
<em>逆序排序</em> 按照相反字母顺序排序。

<em>Remove duplicates</em> will remove duplicate values from the list.
<em>删除重复内容</em> 删除列表中重复的行。

<em>Ignore case</em> will ignore case sensitivity.
<em>忽略大小写</em> 不区分字母的大小写。

To have the sort ignore the characters at the start of the lines, set the first character that should be used for sorting in the <em>Start at</em> column spin box.
要指定排序所依据的列,请在排序对话框的 <em>排序开始于列</em> 微调按钮框中设定用于排序的列。

To perform the sort operation, click <gui>Sort</gui>.
要执行排序操作,点击 <gui>排序</gui> 按钮。

Use snippets to quickly insert often-used pieces of text

Coming soon!

Add an interactive Python console to the bottom pane
在底部面板添加一个交互式的 Python 控制台

You can add a Python console to the bottom pane, allowing you to test Python scripts without leaving <app>gedit</app>. To enable the Python console, select <guiseq><gui>Edit</gui><gui>Preferences</gui><gui>Plugins</gui><gui>Python Console</gui></guiseq>.
您可以在底部面板添加一个 Python 控制台,从而不需要离开<app>gedit</app> 就可以测试 Python 脚本。要启用 Python 控制台,点菜单 <guiseq><gui>编辑</gui><gui>首选项</gui><gui>插件</gui><gui>Python 控制台</gui></guiseq>。

Once the Python console is enabled, you can open it by selecting <guiseq><gui>View</gui><gui>Bottom Pane</gui></guiseq>, or just press <keyseq><key>Shift</key><key>F9</key></keyseq>.
一旦启用 Python 控制台,您就可以通过点菜单 <guiseq><gui>查看</gui><gui>底部面板</gui></guiseq>,或者按组合键 <keyseq><key>Shift</key><key>F9</key></keyseq> 来打开它。

If you have also enabled the <gui>Embeded Terminal</gui> plugin, the <gui>Python Console</gui> will appear as a separate tab in the bottom pane.
如果您同时还启用了<gui>内部终端</gui>插件,<gui>Python 控制台</gui>将会出现在底部面板的另一个标签中。

帖子: 7392
注册时间: 2007-11-25 13:29
系统: 14/16/18/Fedroa22/w7
来自: 新疆博乐
送出感谢: 29 次
接收感谢: 95 次

Re: 查错:gedit-mast 的简体中文翻译


帖子 TeliuTe » 2011-04-17 23:27

Emacs, Kate and Vim-style modelines support for gedit
Emacs、Kate 和 Vim-风格的模式行支持

The <app>Modelines</app> plugin allows <app>gedit</app> to analyze the lines of text at the start and end of a file, and then apply a set of document preferences to the file. The <app>Modelines</app> plugin supports a subset of the options used by the <app>Emacs</app>, <app>Kate</app> and <app>Vim</app> text editors.
<app>模式行</app>插件允许 <app>gedit</app> 分析文件中开始行和结束行,然后为文件设置文档选项,<app>模式行</app>插件支持 <app>Emacs</app>、<app>Kate</app> 和 <app>Vim</app> 文本编辑器选项的子集。

To enable the <app>Modelines</app> plugin, select <guiseq><gui>Edit</gui><gui>Preferences</gui><gui>Plugins</gui><gui>Modelines</gui></guiseq>.
要启用<app>模式行</app>插件,点菜单 <guiseq><gui>编辑</gui><gui>首选项</gui><gui>插件</gui><gui>模式行</gui></guiseq>。

General Modeline Options

The following options can be set using <app>gedit</app> modelines:
下列选项可用于 <app>gedit</app> 模式行设置:

Tab width
Tab 制表符宽度

Indent width

Inserting spaces instead of tabs

Text Wrapping

Right margin width

Preferences set using modelines take precedence over the ones specified in the preference dialog.
使用 modelines 设置的选项,会覆盖在首选项对话框里设定的选项。

Emacs Modelines
Emacs Modelines

The first two lines of a document are scanned for <app>Emacs</app> modelines, and <app>gedit</app> supports the following <app>Emacs</app> modeline options:
对 <app>Emacs</app> 模式行扫描文档开头的两行,<app>gedit</app> 支持下列 <app>Emacs</app> 模式行选项:

Tab 制表符宽度


Tab 缩排模式

Text auto-wrap

For more information on <app>Emacs</app> modelines, visit the <link href=\"http://www.gnu.org/software/emacs/manua ... html\">GNU Emacs Manual</link>.
更多关于 <app>Emacs</app> 模式行的相关信息,请访问 <link href=\"http://www.gnu.org/software/emacs/manua ... html\">GNU Emacs 手册</link>。

Kate Modelines
Kate Modelines

The first and last ten lines a document are scanned for <app>Kate</app> modelines, and <app>gedit</app> supports the following <app>Kate</app> modeline options:
对 <app>Kate</app> 模式行扫描文档开头和最后十行,<app>gedit</app> 支持下列 <app>Kate</app> 模式行选项:

Tab 制表符宽度





For more information about <app>Kate</app> modelines, visit the <link href=\"http://kate-editor.org/\">Kate website</link>.
更多关于 <app>Kate</app> 模式行的相关信息,请访问 <link href=\"http://kate-editor.org/\">Kate 网站</link>。

Vim Modelines
Vim Modelines

The first and last three lines a document are scanned for <app>Vim</app> modelines, and <app>gedit</app> supports the following <app>Vim</app> modeline options:
对 <app>Vim</app> 模式行扫描文档开头和最后的三行,<app>gedit</app> 支持下列 <app>Vim</app> 模式行选项:

et (expandtab)
et (expandtab)

ts (tabstop)
ts (tabstop)

sw (shiftwidth)
sw (shiftwidth)



For more information on <app>Vim</app> modelines, visit the <link href=\"http://www.vim.org/\">Vim website</link>.
更多关于 <app>Vim</app> 模式行的信息,请访问 <link href=\"http://www.vim.org/\">Vim 网站</link>。

Install Additional gedit Plugins
安装额外的 gedit 插件

Installing third-party plugins gives you extra functionality that is not included by default in <app>gedit</app>. An online list of third-party plugins is maintained <link href=\"http://live.gnome.org/Gedit/Plugins#thi ... here</link>.
安装不包括在 <app>gedit</app> 默认的第三方插件,可以让您获得更多的功能。在 <link href=\"http://live.gnome.org/Gedit/Plugins#thi ... ">这儿</link> 有一个在线的第三方插件列表。


The first step to install a plugin in <app>gedit</app> is to obtain the plugin. Third-party plugins will often be obtained by downloading them from the plugin's web site. Refer to the plugin's documentation for further information on obtaining the plugin - instructions will vary depending on the plugin.
在 <app>gedit</app> 中安装插件的第一步是获取插件,第三方插件往往可以从插件站点上下载,获取插件可查阅的说明文档很大程度上取决于该插件。


After you have obtained the plugin you wish to install, you will need to install it.

Installing a Plugin

Locate the plugin files to be installed.

Install the plugin files:

Copy the plugin into <file>/home/<var>username</var>/.local/share/gedit/plugins</file>
复制插件到 <file>/home/<var>用户名</var>/.local/share/gedit/plugins</file>

After you have moved the plugin files into the correct directory, the plugin will appear in the Preferences menu (<guiseq><gui>Edit</gui><gui>Preferences</gui><gui>Plugins</gui></guiseq>). From there, the plugin needs to be enabled to be used.

You will need to have hidden files displayed to view the <file>.local</file> directory. To display hidden files, click <guiseq><gui>View</gui><gui>Show Hidden Files</gui></guiseq> or press <keyseq><key>Ctrl</key><key>H</key></keyseq>.
您需要显示隐藏文件,才能找到 <file>.local</file> 文件夹,要显示隐藏文件,点菜单 <guiseq><gui>查看</gui><gui>显示隐藏文件</gui></guiseq> 或者按组合键 <keyseq><key>Ctrl</key><key>H</key></keyseq>。

If the directory <file>.local/share/gedit/plugins/</file> is not present on your system, you will need to create it.
如果在系统中,文件夹 <file>.local/share/gedit/plugins/</file> 不存在,就需要您自己创建它。

Insert the current date/time at the cursor position

As this name of this plugin suggests, the <gui>Insert Date/Time</gui> plugin allows you to insert the date and/or time at the current cursor position. To enable this plugin, select <guiseq><gui>Edit</gui><gui>Preferences</gui><gui>Plugins</gui><gui>Insert Date/Time</gui></guiseq>. To use the plugin, press <guiseq><gui>Edit</gui><gui>Insert Date and Time</gui></guiseq>.
根据插件名称就可以知道,<gui>插入日期/时间</gui>插件可以在光标处插入日期和/或时间。要启用此插件,点菜单 <guiseq><gui>编辑</gui><gui>首选项</gui><gui>插件</gui><gui>插入日期/时间</gui></guiseq>。要使用此插件,点菜单 <guiseq><gui>编辑</gui><gui>插入日期/时间</gui></guiseq>。

By default, the <gui>Insert Date/Time</gui> plugin will prompt you to choose your preferred date/time format each time that you use the plugin. However, you can choose your own default date and time format by selecting <guiseq><gui>Edit</gui><gui>Preferences</gui><gui>Plugins</gui><gui>Insert Date/Time</gui><gui>Configure</gui></guiseq>.
默认情况下,<gui>插入日期/时间</gui>插件会提示您选择一种日期/时间格式。当然,您也可以在 <guiseq><gui>编辑</gui><gui>首选项</gui><gui>插件</gui><gui>插入日期/时间</gui><gui>配置</gui></guiseq>中,选择一个默认日期和时间格式。

@@image: 'figures/gedit-side-pane1.png'; md5=ac9c80cb0552d63b593c71f23be69b53
@@image: 'figures/gedit-side-pane1.png'; md5=ac9c80cb0552d63b593c71f23be69b53

Use the side pane to browse and open files

Depending on how you use <app>gedit</app>, you may find it helpful to use the <app>File Browser pane</app> plugin. This plugin embeds a <app>file browser</app> in the side pane, giving you easy access to your frequently-used files.
依据您的 <app>gedit</app> 使用习惯,您可能会发现<app>文件浏览器面板</app>插件非常有用,这个插件在侧面板内放一个<app>文件浏览器</app>,让您很方便地存取频繁使用的文件。

You can enable the <gui>Side Pane</gui> by selecting <guiseq><gui>Edit</gui><gui>Preferences</gui><gui>Plugins</gui><gui>File Browser Pane</gui></guiseq>.
要启用<gui>侧边栏</gui> ,点菜单 <guiseq><gui>编辑</gui><gui>首选项</gui><gui>插件</gui><gui>文件浏览器面板</gui></guiseq>。

Opening files from the side pane

To activate and use the <gui>side pane</gui>, select <guiseq><gui>View</gui><gui>Side pane</gui></guiseq> (or just press<key>F9</key>), and then click on the <gui>file-browser</gui> icon at the bottom of the pane.
要激活<gui>侧边栏</gui>,点菜单 <guiseq><gui>查看</gui><gui>侧边栏</gui></guiseq>(或者按 <key>F9</key>),然后点侧边栏底部的<gui>文件浏览器</gui>图标。

This will activate the <em>file-browser</em> mode of the <app>side pane</app>. You can then use the navigation buttons at the top of the pane to locate and open your desired files.

External tools

The <em>External Tools</em> plugin can help simplify repetitive tasks. Specifically, it extends <app>gedit</app> by helping you to run scripts on your working files, and by allowing <app>gedit</app> to interact with other programs on your computer. To enable the <app>External Tools</app> plugin, select <guiseq><gui>Edit</gui><gui>Preferences</gui><gui>Plugins</gui><gui>External Tools</gui></guiseq>.
<em>外部工具</em>插件可用于简单的重复任务,尤其是,它可以在您编辑的文档上执行脚本,并且允许 <app>gedit</app> 与系统中的其他程序交互作用。要启用<app>外部工具</app>,点菜单 <guiseq><gui>编辑</gui><gui>首选项</gui><gui>插件</gui><gui>外部工具</gui></guiseq>。

Configure the external tools plugin

Once you have enabled the plugin, you will need to configure it to suit your needs. The configuration options are available by selecting <guiseq><gui>Tools</gui><gui>Manage External Tools</gui></guiseq>.
一旦启用此插件,您得按需要来配置它。配置选项可以点菜单 <guiseq><gui>工具</gui><gui>管理外部工具</gui></guiseq>。

This plugin is for advanced users, and requires knowledge of scripting to be used effectively. Use this plugin with care, as mistakes with your scripts can affect your work in unintended ways.

View document statistics

The <em>Document Statistics</em> plugin can show you various statistics about your current document. To enable this plugin, select <guiseq><gui>Edit</gui><gui>Preferences</gui><gui>Plugins</gui><gui>Document Statisics</gui></guiseq>.
<em>文档统计</em>插件可以显示当前文档的多项信息,要启用此插件,点菜单 <guiseq><gui>编辑</gui><gui>首选项</gui><gui>插件</gui><gui>文档统计</gui></guiseq>。

Using Document Statistics

Once the plugin is enabled, use it by selecting <guiseq><gui>Tools</gui><gui>Document Statistics</gui></guiseq>. A window will display the statistical information of your document, including the number of words, lines, characters, non-space characters, and the size of your file in bytes.
一旦启用此插件,点菜单 <guiseq><gui>工具</gui><gui>文档统计</gui></guiseq>,就会出现一个窗口,显示文档的统计信息,包括单词数、行数、字符数和非空格的字符数,以及文件的字节数。

You can also use <em>Document Statistics</em> to show you information about just a portion of your document. To do this, use the mouse pointer to select the portion of text that you want to examine, and then select <guiseq><gui>Tools</gui><gui>Document Statistics</gui></guiseq>. <app>Gedit</app> will display information for both your entire document, and for the portion of text that you highlighted.
您还可以让<em>文档统计</em>只显示部分文档的信息,要做到这一点,用鼠标选中想要统计的文本,然后点菜单 <guiseq><gui>工具</gui><gui>文档统计</gui></guiseq>,<app>Gedit</app> 除了显示整个文档的信息外,还会显示您选中这部分文档的信息。

Change the case of selected text

This plugin helps you to change the case of selected portions of text. You can use it to change text to be all lower case, all upper case, to invert the case, or apply title case. To enable this plugin, select <guiseq><gui>Edit</gui><gui>Preferences</gui><gui>Plugins</gui><gui>Change Case</gui></guiseq>.
这个插件帮助您更改选中文本的大小写,您可以将文本全部改为小写字母,全部改为大写字母,大小写翻转,或者让字首大写。要启用此插件,点菜单 <guiseq><gui>编辑</gui><gui>首选项</gui><gui>插件</gui><gui>更改大小写</gui></guiseq>。

Once the <em>Change Case</em> plugin is enabled, you can use it by completing the following steps:

Highlight the portion of text that you want to change.

Select <guiseq><gui>Edit</gui><gui>Change Case</gui></guiseq>
点菜单 <guiseq><gui>编辑</gui><gui>更改大小写</gui></guiseq>

Choose your desired text-formatting option.

The updates to the text formatting will take place immediately.

The <gui>Invert Case</gui> option will convert all lower case letters to upper case, and will convert all upper case letters to lower case.
<gui>反转大小写</gui> 选项把小写字母改成大写,把大写字母改成小写。

The <gui>Title Case</gui> option will convert the first letter of each word to upper case. All other letters will be converted to lower case.

If you have not highlighted any text, the <em>Change Case</em> feature will be grayed-out. You need to select a portion of text before you use the <em>Change Case</em> feature.

Auto-complete closing brackets

The <app>Bracket Completion</app> plugin will auto-complete closing brackets for curly braces, parantheses, and square brackets.

To enable the plugin, select <guiseq><gui>Edit</gui><gui>Preferences</gui><gui>Plugins</gui><gui>Bracket Completion</gui></guiseq>.
要启用此插件,点菜单 <guiseq><gui>编辑</gui><gui>首选项</gui><gui>插件</gui><gui>括号补全</gui></guiseq>。

This plugin does not automatically insert closing HTML or XML tags.
这个插件不能自动补全插入的 HTML 或 XML 标记。

Do more with gedit by using gedit plugins.
用 gedit 的插件做更多的事。

Configure and use gedit Plugins
配置和使用 gedit 插件

You can do more with <app>gedit</app> by using plugins. Several plugins are installed by default, but a large number of other plugins are available separately.
您可以通过插件让 <app>gedit</app> 做更多事,一些插件已经默认安装好,但还有更多可用的插件。

Many Linux distributions make a group of these plugins available as a <app>gedit-plugins</app> package. Install the <app>gedit-plugins</app> package to make these extra plugins available to <app>gedit</app>.
许多 Linux 发行版会制作一个像 <app>gedit-plugins> 这样的软件包,安装这个 <app>gedit-plugins> 包,可以在 <app>gedit</app> 中使用更多的外部插件。

Default gedit Plugins
默认的 gedit 插件

Additional gedit Plugins
额外的 gedit 插件

Reopen a recently-used file

By default, <app>gedit</app> provides easy access to five of your most recently-used files. Here is how you can open a recently-used file:
默认情况下,<app>gedit</app> 提供快速访问最近使用的五个文件,用这个方法可以打开最近使用的文件:

Click the downward-facing arrow to the right of the <gui>Open</gui> button.

<app>gedit</app> will display a list of the five most-recently used files.
<app>gedit</app> 会列出最近访问的五个文件。

Select the desired file, and it will open in a new tab.

To adjust the number of recently-used files that gedit displays, you will need to use the <app>gconf-editor</app> application.
要增加显示最近访问的文件数,您需要使用 <app>gconf-editor</app> 程序。

Launch <app>gconf-editor</app> and select <guiseq><gui>apps</gui><gui>gedit-2</gui><gui>preferences</gui><gui>ui</gui><gui>recents</gui></guiseq>.
运行 <app>gconf-editor</app> 然后在侧栏中依次点击 <guiseq><gui>apps</gui><gui>gedit-2</gui><gui>preferences</gui><gui>ui</gui><gui>recents</gui></guiseq>。

Double-click on the number next to <gui>max_recents</gui> and change the number to your desired value.
双击旁边面板中的 <gui>max_recents</gui>,然后输入想要的数字。

Open a file that is located on a server

Prior to opening a file on a server from within <app>gedit</app>, you need to know some technical information about the server. For example, you will need to know the IP Address or URL of the server, and may need to know what kind of server it is (e.g., HTTP, FTP, etc.).
要用 <app>gedit</app> 打开存放于服务器上的文件,您首先需要了解服务器的相关技术信息,例如,您需要知道服务器的 IP 地址或 URL,还要知道是哪一种服务器(比如 HTTP、FTP 等等)。

Also, some types of servers impose restrictions on what you can do with files stored on the server. For example, you may be able to open a file from a server, but may need to save any changes to the file locally, on your own computer.

With these caveats in mind, perform the following steps to open a file from a server using <app>gedit</app>:
了解这些信息后,您可以在 <app>gedit</app> 中,按下列步骤打开服务器上的文件:

Choose <guiseq><gui>File</gui><gui>Open</gui></guiseq> to display the <gui>Open Files</gui> dialog.
点菜单 <guiseq><gui>文件</gui><gui>打开</gui></guiseq> 命令,显示 <gui>打开文件</gui> 对话框。

Select the <gui>Pencil</gui> icon near the top of the <gui>Open Files</gui> dialog.

Enter the IP Address or URL of the appropriate server.
输入服务器的 IP 地址或 URL。

Find and select the file that you wish to open.

Use the Character coding drop-down list to select the appropriate character coding.

Click <gui>Open</gui>.
点 <gui>打开</gui>。

Valid types of URI include http:, ftp:, file:, and all of the methods supported by <app>gvfs</app>.
有效的 URI 包括 http:、ftp:、file: 和所有 <app>gvfs</app> 支持的格式。

Files from some types of URI are opened as read-only, and any changes you make must be saved to a different location. For example, HTTP only allows files to be read. Files opened from FTP are read-only because because not all FTP servers may correctly work with saving remote files.
某些类型的 URI 会以只读方式打开,当您更改后必须另存到其他位置。例如, HTTP 只允许读取文件,从 FTP 上打开的文件一般也是只读,因为并不是所有 FTP 服务器能够处理远程保存文件。

Open a file or set of files

To open a file in <app>gedit</app>, click the <gui>Open</gui> button, or press <keyseq><key>Ctrl</key><key>O</key></keyseq>.
要在 <app>gedit</app> 中打开一个文件,点击 <gui>打开</gui>按钮,或者按组合键 <keyseq><key>Ctrl</key><key>O</key></keyseq>。

This will cause the <gui>Open Files</gui> dialog to appear. Use your mouse or keyboard to select the file that you wish to open, and then click <gui>Open</gui>. The file that you've selected will open in a new tab.

To close the <gui>Open Files</gui> dialog without opening a file, click <gui>Cancel</gui>.
要关闭 <gui>打开文件</gui> 对话框,而不打开任何文件,请点击<gui>取消</gui>按钮。

You can use the <key>Ctrl</key> and <key>Shift</key> keys to open more than one file at a time. If you hold down the <key>Ctrl</key> key while you select multiple files, clicking <gui>Open</gui> will open each of the files that you have selected.
您也可以用 <key>Ctrl</key> 和 <key>Shift</key> 键,一次选择打开多个文件,如果按住 <key>Ctrl</key> 键选择多个文件,点<gui>打开</gui>会打开所有点过的文件。

Holding down the <key>Shift</key> while you select multiple files will open the first file that you select, the last file that you select, and all of the files in between.
按住 <key>Shift</key> 键选择多个文件,会打开从第一个到最后一个之间连续的所有文件。

View and open files from the side pane

The most common way to switch between files in <app>gedit</app> is by using the tabs at the top of the <app>gedit</app> window. In some cases, though, particularly when you are working with a large number of open files, you may find it easier to use the <app>side pane</app>.
在 <app>gedit</app> 中切换文件最常用的方法是,点击窗口上的标签栏。而在某些情况下,比如当您要操作大量文件时,您会发现使用<app>侧边栏</app>会更方便些。

To activate the <app>side pane</app>, select <guiseq><gui>View</gui><gui>Side Pane</gui></guiseq>, or just press the <key>F9</key> key.
要激活<app>侧边栏</app>,点菜单 <guiseq><gui>查看</gui><gui>侧边栏</gui></guiseq>,或者按 <key>F9</key> 键。

You can toggle the <gui>side pane</gui> open or closed by pressing <key>F9</key> at any time.
您可以在任何时候,按 <key>F9</key> 来切换<gui>侧边栏</gui>的显示。

To open files from the <app>side pane</app>, first open the <app>side pane</app> by selecting <guiseq><gui>View</gui><gui>Side Pane</gui></guiseq>, then click on the <gui>file-browser</gui> icon at the bottom of the pane.
要从<app>侧边栏</app>中打开文件,首先要打开<app>侧边栏</app>,点菜单 <guiseq><gui>查看</gui><gui>侧边栏</gui></guiseq>,然后点面板底部的<gui>文件浏览器</gui>图标。

This will activate the <em>file-browser</em> mode of the <app>side panel</app>. You can then use the navigation buttons at the top of the pane to locate and open your desired files.

Using the side pane to switch between open files

Once you have several files open, you can use the side pane to switch between open files. To activate the file browser portion of the <app>side pane</app>, click on the <gui>file</gui> icon at the bottom of the <gui>side pane</gui>.

Clicking on any file name in the <gui>side pane</gui> will open that file for editing.

Use fullscreen mode

When working with a large document, you may find it helpful to work in <app>gedit's</app> fullscreen mode. Using fullscreen mode will hide the <gui>menu bar</gui>, <gui>tab bar</gui> and the <gui>tool bar</gui>, presenting you with more of your text and allowing you to better focus on your tasks.
当打开一个很大的文档时,您会发现使用 <app>gedit</app> 的全屏模式很有用处,这时会隐藏 <gui>菜单栏</gui>、<gui>标签栏</gui> 和 <gui>工具栏</gui>,从而可以显示更多的文本内容,让您方便地编辑文档。

Turn on fullscreen mode

To turn on fullscreen mode, select <guiseq><gui>View</gui><gui>Fullscreen</gui></guiseq>, or press <key>F11</key>. <app>gedit's</app> menu, title, and tab-bars will hide, and you will only be presented with the text of your current file.
要进入全屏模式,点菜单 <guiseq><gui>查看</gui><gui>全屏</gui></guiseq>或者按 <key>F11</key> 键,<app>gedit</app> 的菜单、标题栏和标签栏将会隐藏,只显示当前文档的内容。

If you need to perform an action from the <app>gedit</app> menu while working in fullscreen mode, move your mouse pointer to the top of the screen. The <app>gedit</app> menu bar will reappear, and you can select your desired action.
如果在全屏模式下,您想要运行 <app>gedit</app> 的菜单命令,把鼠标移动到屏幕顶部,就会显示 <app>gedit</app> 的菜单栏,然后您就可以选择相应的菜单命令。

To switch between open tabs while in fullscreen mode, press either <keyseq><key>Ctrl</key><key>Alt</key><key>PgUp</key></keyseq> or <keyseq><key>Ctrl</key><key>Alt</key><key>PgDn</key></keyseq>.
要在全屏模式下,切换不同的标签,按组合键 <keyseq><key>Ctrl</key><key>Alt</key><key>PgUp</key></keyseq> 或 <keyseq><key>Ctrl</key><key>Alt</key><key>PgDn</key></keyseq>。

Turn off fullscreen mode

To turn off fullscreen mode and return to the standard <app>gedit</app> window, move your mouse cursor to the top of the screen, and wait for the <gui>menu bar</gui> to appear. When the <gui>menu bar</gui> appears, select <gui>Leave Fullscreen</gui>.
要关闭全屏模式返回到 <app>gedit</app> 窗口模式,把鼠标指针移到窗口顶部,出现<gui>菜单栏</gui>,然后点<gui>离开全屏</gui>。

File basics: Open, close, and save files

If you are new to <app>gedit</app>, these topics will help you with creating, saving, and opening and closing files.
如果您才接触 <app>gedit</app>,这一章将会帮助您创建、保存、打开和关闭文件。

Edit a file as the root (administative) user
以 root(管理员)身份编辑文件

Editing files as the root user is potentially dangerous, and may break your system in bad ways. Take great care when editing files as the root user.
以 root 身份编辑文件可能带来潜在危险,会因操作失误而损坏系统,请特别小心使用 root 身份编辑文件。

To edit files as the root user, launch <app>gedit</app> from the terminal by entering:
要以 root 身份编辑文件,在终端运行下列命令:

sudo gedit
sudo gedit

Using the <cmd>sudo</cmd> command, you will need to successfully enter your password before <app>gedit</app> will open.
使用 <cmd>sudo</cmd> 命令,正确输入自己的密码后,打开 <app>gedit</app>。

As an alternative to the <cmd>sudo</cmd> command, you may obtain administrative privileges by entering:
作为 <cmd>sudo</cmd> 命令的替代,您也可以通过输入下列命令来获取管理员权限:

su -
su -

You would then launch <app>gedit</app> using the <cmd>gedit</cmd> command.
然后您就可以运行并使用 <app>gedit</app>。

Once you have opened <app>gedit</app> with administrative privileges, the application will retain those privileges until you close it.
一旦您以管理员身份打开 <app>gedit</app>,在您关闭程序前,它将一直具备管理员权限。

Create a new file

The easiest way to create a new file in <app>gedit</app>, is to click the icon that looks like a blank piece of paper with a \"plus\" sign next to it. If you prefer, you may also select <guiseq><gui>File</gui><gui>New</gui></guiseq>, or press <keyseq><key>Ctrl</key><key>N</key></keyseq>.
点击 <app>gedit</app> 的工具栏上,一个带有“+”号的空白页图标按钮,就可以很方便创建一个新文件。您也可以点菜单 <guiseq><gui>文件</gui><gui>新建</gui></guiseq> 或者按组合键 <keyseq><key>Ctrl</key><key>N</key></keyseq>。

Any one of these actions will create a new file in the <app>gedit</app> window. If you have other files open in <app>gedit</app>, the new file that you create will appear as a new tab to the right of those files.
这些操作都会在 <app>gedit</app> 窗口中创建一个新文件,如果窗口中已经打开有文件,那么新文件会在那个文件的右边新建一个标签。

Close a file

To close a file in <app>gedit</app>, select <guiseq><gui>File</gui><gui>Close</gui></guiseq>. Alternately, you can click the small \"X\" that appears on the right-side of the file's tab, or press <keyseq><key>Ctrl</key><key>W</key></keyseq>.
要在 <app>gedit</app> 中关闭一个文件,点菜单 <guiseq><gui>文件</gui><gui>关闭</gui></guiseq>。另外,您也可以点击这个文件所在标签右侧的“X”,或者按组合键 <keyseq><key>Ctrl</key><key>W</key></keyseq>。

Any one of these actions will close a file in <app>gedit</app>. If your file contains changes that have not been saved, <app>gedit</app> will prompt you to save those changes before closing the file.
上述的任何一个操作都会关闭文件,如果您的文件中发生了变化而没有保存,<app>gedit</app> 会在关闭前提示您保存更改。

Change the color scheme

<app>gedit</app> includes several different color schemes, allowing you to change the appearance of the main text window.
<app>gedit</app> 包含多种不同配色方案,允许您更改主文本窗口的外观。

To change the color scheme, complete the following steps:

Select <guiseq><gui>Edit</gui><gui>Preferences</gui><gui>Font & Colors</gui></guiseq>.
点菜单 <guiseq><gui>编辑</gui><gui>首选项</gui><gui>字体 & 颜色</gui></guiseq>。

Choose your desired color scheme.

The new color scheme will be applied immediately.

Use a Custom Color Scheme

You can also use color schemes that have been created by others, or create and use your own color schemes.

Instructions on how to install custom color schemes, as well as examples of color schemes that you can download and use, are available on the <link href=\"http://live.gnome.org/GtkSourceView/Sty ... es\">gedit wiki</link>.
关于如何安装自定义配色方案的说明,以及您可以下载并使用的配色方案,可以在 <link href=\"http://live.gnome.org/GtkSourceView/Sty ... es\">gedit wiki</link> 上找到。

TeliuTe <teliute@163.com>, 2009, 2011

回到 “软件和文档翻译”