I’ve been maintaining the gedit documentation since the run-up to the gedit 3.0 release, and doing so has helped me to get to know some of the ins-and-outs of the program. What can I say, it’s one of the perks of writing documentation - you get to know the software that you’re documenting.
With that, though, I thought I’d pass along some of the basic configurations that help me to write documentation more quickly, and in a more consistently-formatted way.
Here’s a quick run-down of some settings that you may find helpful:
View Preferences - Edit > Preferences > View:
Check the following items:
- Display line numbers (this helps with locating validation errors)
- Display right margin at column (80 characters) (breaking lines at 80 characters makes diffs look prettier)
- Highlight the current line
- Highlight matching brackets (optional: I don’t use this feature, but some people prefer it)
- Enable text wrapping (not needed if you’re breaking lines at 80 characters)
Editor Preferences: Edit > Preferences > Editor
Tab Width: 2
- Insert spaces instead of tabs
- Enable automatic indentation
- Create a backup copy of files before saving (not needed if you’re using revision control, like git or bzr)
With regards to plugins, I recommend enabling the dashboard plugin (which will be available as part of gedit 3.4, included in Ubuntu 12.04, Fedora 17, OpenSUSE 12.2, etc.), and the gedit snippets plugin. In the near future I’ll be writing up a post about using gedit snippets.
One other neat feature that I often use with gedit is the keyboard shortcut for moving a line up or down within the text. If you position your mouse cursor on any point in a line, and then press Alt + Up Arrow, it will move the entirety of that line up within the text. Pressing Alt + Down Arrow will move that line down within the text. Simple enough! (The complete list of gedit shortcut keys is available in the user help, by the way. Just open up gedit and press F1.)
Do you have any suggestions or tips for using gedit to write documentation? If so, I’d appreciate you sharing them with me in the comments.