From 96c85498c019e381d0aeed2e33e626563563ea8c Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 7 Mar 2012 09:28:43 -0500 Subject: Documentation overhaul with Discount (Markdown implementation). The standard LuaDoc template is no longer used. Instead, the new `scripts/markdowndoc.lua` has the template for LuaDoc and `scripts/update_doc` has the template for the Manual. Also added README, CHANGELOG, and THANKS files. --- doc/manual/8_Themes.md | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) (limited to 'doc/manual/8_Themes.md') diff --git a/doc/manual/8_Themes.md b/doc/manual/8_Themes.md index 81ee285d..b40135e2 100644 --- a/doc/manual/8_Themes.md +++ b/doc/manual/8_Themes.md @@ -11,10 +11,11 @@ the name of the theme you would like to use. Themes apply to all buffers. You cannot assign a theme to a particular file or filetype. You can change things like tab and indent settings per filetype -however by creating a [language-specific -module](7_Modules.html#buffer_properties). +however by creating a [language-specific module]. -## Creating or Modifying a Theme +[language-specific module]: 7_Modules.html#Buffer.Properties + +## Creating or Modifying Themes Each theme is a single folder on the filesystem composed of three files: `lexer.lua`, `buffer.lua`, and `view.lua`. It is recommended to put themes in @@ -27,15 +28,16 @@ To use a theme not located in `~/.textadept/themes/` or Textadept's `themes/` directory, you need to specify an absolute path to the theme's folder in your `~/.textadept/theme` file. -#### Lexer +### Lexer Textadept uses lexers to assign names to buffer elements like comments, strings, and keywords. These elements are assigned styles composed of font and color information in the theme's `lexer.lua`. See the `Styling Tokens` section of the -[lexer](../modules/lexer.html) page for more information on how to create styles -and colors. +[lexer][] page for more information on how to create styles and colors. + +[lexer]: ../api/lexer.html -#### Buffer +### Buffer `buffer.lua` contains buffer-specific properties like indentation size and whether or not to use tabs. For example, to set the default tab size to 4 and @@ -45,12 +47,16 @@ use tabs: buffer.use_tabs = true buffer.indent = 4 -See the [LuaDoc](../modules/buffer.html) for documentation on the properties. +See the [LuaDoc][] for documentation on the properties. + +[LuaDoc]: ../api/buffer.html -#### View +### View `view.lua` contains view-specific properties like caret and selection colors. -See the [LuaDoc](../modules/buffer.html) for documentation on the properties. +See the [LuaDoc][] for documentation on the properties. + +[LuaDoc]: ../api/buffer.html ## Testing Themes @@ -66,16 +72,17 @@ Any errors that occur in the theme are printed to `io.stderr`. ## Theming the GUI There is no way to theme GUI controls like text fields and buttons from within -Textadept. Instead, use [GTK Resource files][gtkrc]. The `GtkWindow` name is +Textadept. Instead, use [GTK Resource files][]. The `GtkWindow` name is `textadept`. For example, styling all text fields with a `"textadept-entry-style"` would be done like this: widget "textadept*GtkEntry*" style "textadept-entry-style" -[gtkrc]: http://library.gnome.org/devel/gtk/stable/gtk-Resource-Files.html +[GTK Resource files]: http://library.gnome.org/devel/gtk/stable/gtk-Resource-Files.html ## Getting Themes -For now, user-created themes are obtained from the -[wiki](http://caladbolg.net/textadeptwiki). The classic `dark`, `light`, and -`scite` themes prior to version 4.3 have been moved there. +For now, user-created themes are obtained from the [wiki][]. The classic `dark`, +`light`, and `scite` themes prior to version 4.3 have been moved there. + +[wiki]: http://caladbolg.net/textadeptwiki -- cgit v1.2.3