UbuntuHelp:gedit
来自Ubuntu中文
Oneleaf(讨论 | 贡献)2007年5月13日 (日) 11:48的版本 (New page: {{From|https://help.ubuntu.com/community/gedit}} {{Languages|php5}} Parent: UbuntuHelp:Software == gedit Text Editor == Gedit is the default text editor for Ubuntu. Menu: Accessor...)
Parent: UbuntuHelp:Software
gedit Text Editor
Gedit is the default text editor for Ubuntu.
Menu: Accessories > Text Editor
Screenshot
attachment:scrn-gedit.png
Hints and Tips
- To enable or disable automatic saving of backup files: Preferences > Editor > File Saving
- To make display text larger or smaller: Preferences > Fonts & Colors
- For editing configuration files, for example your repository list (in Terminal):
gksudo gedit /etc/apt/sources.list </code> Note: If you need to run graphical applications as root, use gksudo, as shown above, as it will set up the environment more appropriately. Avoid ever using sudo with gui apps. == Using gedit for XML / Docbook XML == One can use gedit, a more user-friendly way to make XML markup or Docbook XML for yelp documentation. The pictures and instructions given below uses gedit 2.18.1 . You should make few changes in gedit to take full benefit of the syntax color highlighting which gedit provides so simple mistakes are caught early. The process for this is as under :- Under the View tab make the following changes attachment:gedit1.png The only one which could be an option is whether or not to see line numbers, but apart from that, most of the options just make life easier. Now the next change to do is under Editor tab :- attachment:gedit2.png As one can see there is no much one can do here. Now the next thing is to go to Syntax Highlighting tab. attachment:geditsyntaxhighlight.png Now make sure that Syntax highlighting is turned on. Just to understand or for kicks go down the drop-down menu & see Docbook, on the left-hand side you see the various Elements and can see the various colors associated with that element. Later on you can change the preferences to your liking as you becomes more aware of what you would like to see or are more comfortable with. Now jump to the Plugins Tab :- attachment:geditplugins.png There are no. of changes you can do here, the most important perhaps is the Tag List option. Feel free to make use of other options and see how that changes the text. Now comes the most interesting part, go to View > Highlight Mode > Markup & while we want Docbook one can also see XML & both look slightly different from each other attachment:geditdocbook.png The above one is when the matter is highlighted using geditdocbook. The same matter when highlighted using XML looks like :- attachment:geditmarkup.png That's for the day, feel free to play around with gedit & then markup in general to have a feel of what works, what doesn't. Enjoy :) == Other applications you may wish to look at == == Further Reading == * [http://www.gnome.org/projects/gedit/ gedit] ---- CategoryDocumentation [[category:UbuntuHelp]]