diff options
-rw-r--r-- | doc/01_Introduction.md | 6 | ||||
-rw-r--r-- | doc/02_Installation.md | 11 | ||||
-rw-r--r-- | doc/03_UserInterface.md | 10 | ||||
-rw-r--r-- | doc/04_WorkingWithFiles.md | 12 | ||||
-rw-r--r-- | doc/05_FileNavigation.md | 8 | ||||
-rw-r--r-- | doc/06_AdeptEditing.md | 28 | ||||
-rw-r--r-- | doc/07_Modules.md | 6 | ||||
-rw-r--r-- | doc/08_Preferences.md | 25 | ||||
-rw-r--r-- | doc/09_Themes.md | 8 | ||||
-rw-r--r-- | doc/10_Advanced.md | 6 | ||||
-rw-r--r-- | doc/11_Scripting.md | 2 | ||||
-rw-r--r-- | doc/12_Compiling.md | 16 |
12 files changed, 92 insertions, 46 deletions
diff --git a/doc/01_Introduction.md b/doc/01_Introduction.md index 5ac05e8c..6171ff2e 100644 --- a/doc/01_Introduction.md +++ b/doc/01_Introduction.md @@ -25,9 +25,9 @@ Textadept is faster than ever before. Textadept is minimalist. Not only is this apparent in its appearance, but the editor's C core was designed to never exceed 2000 lines of code and its Lua -extension code is capped at 4000 lines. After 5 years of development, Textadept -has maintained the same amount of code since its inception while evolving into a -vastly superior editor. +extension code is capped at 4000 lines. After more than 5 years of development, +Textadept has maintained the same amount of code since its inception while +evolving into a vastly superior editor. ### Ridiculously Extensible diff --git a/doc/02_Installation.md b/doc/02_Installation.md index a631e715..7bf3b11f 100644 --- a/doc/02_Installation.md +++ b/doc/02_Installation.md @@ -6,8 +6,8 @@ In its bid for minimalism, Textadept also needs very little to run. The GUI version needs only [GTK+][], a cross-platform GUI toolkit, version 2.18 or later on Linux and BSD systems. A GTK+ runtime is already bundled into the Windows and Mac OSX packages. Textadept also has its own [copy of Lua][]. The terminal -version of Textadept requires [ncurses][]. This dependency is only necessary if -you wish to run the editor from a terminal. +(ncurses) version of Textadept requires [ncurses][], but that dependency is only +necessary if you wish to run the editor from a terminal. [GTK+]: http://gtk.org [copy of Lua]: 11_Scripting.html#Lua.Configuration @@ -20,9 +20,10 @@ available through your package manager. Otherwise, compile and install it from the [GTK+ website][]. The GUI versions of Textadept in the Linux binary downloads require GLib version -2.28 or later to support single-instance functionality. You can compile -Textadept with earlier versions of GLib down to 2.22. For reference, Ubuntu -11.04, Debian Wheezy, Fedora 15, and openSUSE 11.4 support GLib 2.28 or later. +2.28 or later to support [single-instance](#Single.Instance) functionality. You +can compile Textadept with earlier versions of GLib down to 2.22. For reference, +Ubuntu 11.04, Debian Wheezy, Fedora 15, and openSUSE 11.4 support GLib 2.28 or +later. Most Linux and BSD systems already have ncurses installed. If not, look for it in your package manager, or compile and install it from the [ncurses website][]. diff --git a/doc/03_UserInterface.md b/doc/03_UserInterface.md index 948038cb..e847ca70 100644 --- a/doc/03_UserInterface.md +++ b/doc/03_UserInterface.md @@ -11,11 +11,11 @@ provided later in the manual. ## Menu The completely customizable menu provides access to all of Textadept's features. -It is only available in the GUI version of Textadept. In the terminal, you can -use the [command selection][] dialog instead. Textadept is very keyboard-driven -so most menu items have an assigned key shortcut. Key bindings are changeable -in your [key preferences][] and will reflect in the menu. Here is a -[complete list][] of default key bindings. +It is only available in the GUI version of Textadept. In the terminal version, +you can use the [command selection][] dialog instead. Textadept is very +keyboard-driven so most menu items have an assigned key shortcut. Key bindings +are changeable in your [key preferences][] and will reflect in the menu. Here is +a [complete list][] of default key bindings. [command selection]: 10_Advanced.html#Command.Selection [key preferences]: 08_Preferences.html#Key.Bindings diff --git a/doc/04_WorkingWithFiles.md b/doc/04_WorkingWithFiles.md index dd9f515c..c9119292 100644 --- a/doc/04_WorkingWithFiles.md +++ b/doc/04_WorkingWithFiles.md @@ -52,8 +52,12 @@ the `Buffer -> Indentation` menu. #### Line Endings Line endings, commonly known as end-of-line (EOL) markers, are set based on the -current platform. On Windows, CRLF (`\r\n`) is used. Otherwise, LF (`\n`) is. -This can be changed manually using the `Buffer -> EOL Mode` menu. +current platform for new files. On Windows, CRLF (`\r\n`) is used. Otherwise, LF +(`\n`) is. This can be changed manually using the `Buffer -> EOL Mode` menu. +Unlike indentation settings, switching EOL modes converts all existing EOLs +automatically. Textadept attempts to auto-detect the EOL mode of opened files +regardless of the current platform, but falls back to the defaults mentioned +earlier when necessary. #### Encodings @@ -112,8 +116,8 @@ horizontally and vertically. `Ctrl+Alt+S` or `Ctrl+Alt+H` splits horizontally into top and bottom views and `Ctrl+Alt+V` splits vertically (`^S` and `^V` respectively on Mac OSX | N/A in ncurses) into side-by-side views. You can resize the splitter bar by clicking and dragging with the mouse or using -`Ctrl+Alt++` and `Ctrl+Alt+-` (`^+` and `^-` | N/A). The same file can be worked -with in multiple views. +`Ctrl+Alt++` and `Ctrl+Alt+-` (`^+` and `^-` | N/A). The same file can be opened +in multiple views. Pressing `Ctrl+Alt+N` (`^⌥⇥` on Mac OSX | N/A in ncurses) goes to the next view and `Ctrl+Alt+P` (`^⌥⇧⇥` | N/A) goes to the previous one. Note: depending on the diff --git a/doc/05_FileNavigation.md b/doc/05_FileNavigation.md index e0749313..a1db0ed0 100644 --- a/doc/05_FileNavigation.md +++ b/doc/05_FileNavigation.md @@ -24,10 +24,10 @@ caret : `(`, `)`, `[`, `]`, `{`, and `}`. Pressing `Ctrl+M` (`^M` on Mac OSX | ## Bookmarks You can place bookmarks on lines in buffers to jump back to them later. -`Ctrl+F2` (`⌘F2` on Mac OSX | none in ncurses) toggles a bookmark on the current -line, `F2` jumps to the next bookmarked line, `Shift+F2` (`⇧F2` | none) jumps to -the previously bookmarked line, `Alt+F2` (`⌥F2` | none) jumps to the bookmark -selected from a list, and `Ctrl+Shift+F2` (`⌘⇧F2` | none) clears all bookmarks +`Ctrl+F2` (`⌘F2` on Mac OSX | `F1` in ncurses) toggles a bookmark on the current +line, `F2` jumps to the next bookmarked line, `Shift+F2` (`⇧F2` | `F3`) jumps to +the previously bookmarked line, `Alt+F2` (`⌥F2` | `F4`) jumps to the bookmark +selected from a list, and `Ctrl+Shift+F2` (`⌘⇧F2` | `F6`) clears all bookmarks in the current buffer. ## Goto Line diff --git a/doc/06_AdeptEditing.md b/doc/06_AdeptEditing.md index e71b82a8..994c7ff5 100644 --- a/doc/06_AdeptEditing.md +++ b/doc/06_AdeptEditing.md @@ -57,18 +57,30 @@ key (`^` on Mac OSX | N/A in ncurses) places an additional caret at that point. Clicking and dragging while holding the same modifier creates multiple selections. When you start typing, the text is mirrored at each selection. -This is currently unavailable in ncurses. +Creating multiple selections with the mouse is currently unavailable in ncurses. ### Rectangular Selection Holding `Alt+Shift` (`⌥⇧` on Mac OSX | `M-S-` in ncurses) and pressing the arrow keys enables rectangular selections to be made. Start typing to type on each -line. +line. You can also hold the `Alt` modifier key (`Super` on Linux | `⌥` on Mac +OSX | N/A in ncurses) while clicking and dragging the mouse to create +rectangular selections.   +Note: In some Linux environments, the `Alt+Shift+Arrow` combinations are used by +the window manager and may need to be reconfigured. Also, `Super`+Mouse is used +because `Alt`+Mouse generally moves windows. If you prefer to use `Alt`, you can +change [`buffer.rectangular_selection_modifier`][] in your [theme][]. The +`Super` modifier key is usually defined as the left "Windows" key, but may need +to be reconfigured too. + +[`buffer.rectangular_selection_modifier`]: api/buffer.html#rectangular_selection_modifier +[theme]: 09_Themes.html#View + ### Select to Matching Brace Putting the caret over a brace character (`(`, `)`, `[`, `]`, `{`, or `}`) and @@ -85,7 +97,7 @@ and their key bindings. ### Marks -In ncurses, since some terminals do not recognize certain key commands like +In ncurses, since some terminals do not recognize certain key combinations like `Shift+Arrow` for making selections, you can use marks to create selections. Create a mark at the current caret position with `^^`. Then use regular movement keys like the arrows, page up/down, and home/end to extend the selection in one @@ -150,6 +162,8 @@ previous, replace, and replace all buttons; `Up` and `Down` arrows switch between the find and replace text fields; `^P` and `^N` cycles through history; and `F1-F4` toggles find options. +Pressing `Esc` (`⎋` | `Esc`) hides the pane when you are finished. + [Lua patterns]: 14_Appendix.html#Lua.Patterns ### Replace in Selection @@ -212,7 +226,8 @@ highlight syntax incorrectly. Pressing `F5` triggers a full redraw. Some lexers support code folding, where blocks of code can be temporarily hidden, making viewing easier. Fold points are denoted by arrows in the margin to the left of the code. Clicking on one toggles the folding for that block of -code. +code. You can also press `Ctrl+*` (`⌘*` on Mac OSX | `M-*` in ncurses) to +toggle the fold point on the current line.  @@ -234,7 +249,8 @@ and display API documentation. Symbol completion is available by pressing `Ctrl+Space` (`⌥⎋` on Mac OSX | `^Space` in ncurses). Documentation for symbols is available with `Ctrl+H` (`^H` | `M-H` or `M-S-H`). Note: In order for this feature to work, the language you are working with must have an [Adeptsense][] -defined. Language-specific modules usually [define Adeptsenses][]. +defined. [Language-specific modules][] usually [define Adeptsenses][]. All of +the [official][] Textadept language-specific modules have Adeptsenses.  @@ -242,8 +258,10 @@ defined. Language-specific modules usually [define Adeptsenses][].  +[Language-specific modules]: 07_Modules.html#Language-Specific [Adeptsense]: api/_M.textadept.adeptsense.html [define Adeptsenses]: api/_M.html#Adeptsense +[official]: http://foicica.com/hg ### Snippets diff --git a/doc/07_Modules.md b/doc/07_Modules.md index 8ea211e8..b46e3f91 100644 --- a/doc/07_Modules.md +++ b/doc/07_Modules.md @@ -36,9 +36,9 @@ in the current file. Pressing `Ctrl+Shift+R` (`⌘⇧R` on Mac OSX | `M-^R` in ncurses) executes the command for compiling code and `Ctrl+R` (`⌘R` | `^R`) executes the command for running code. Double-clicking on any error messages will jump to where the errors occurred. Note: In order for these features to -work, the language you are working with must have its run command and error -format defined. If the language-specific module does not exist or does not -[define][] commands or an error format, it can be done [manually][] in your +work, the language you are working with must have its compile and run commands +and error format defined. If the language-specific module does not exist or does +not [define][] commands or an error format, it can be done [manually][] in your [user-init file][]. [define]: api/_M.html#Compile.and.Run diff --git a/doc/08_Preferences.md b/doc/08_Preferences.md index f0cdd2f0..7fb21c22 100644 --- a/doc/08_Preferences.md +++ b/doc/08_Preferences.md @@ -62,8 +62,11 @@ your `menu.lua` instead of its own. ### Language-Specific -Similar to generic modules, copying the default Lua language-specific module -(`modules/lua`) to `~/.textadept/modules/` causes Textadept to load that module +Similar to generic modules, putting your own language-specific module in +`~/.textadept/modules/` causes Textadept to load that module for editing the +language's code instead of the default one in `modules/` (if the latter exists). +For example, copying the default Lua language-specific module from +`modules/lua/` to `~/.textadept/modules/` causes Textadept to use that module for editing Lua code instead of the default one. If you make custom changes to these kinds of copies of language-specific modules, you will likely want to update them with each new Textadept release. Instead of potentially wasting time @@ -100,6 +103,10 @@ contain the following: _M.textadept = require 'textadept' _M.foo = require 'foo' +Language-specific modules are loaded automatically by Textadept when a source +file of that language is opened. No additional action is required after +installing the module. + ### Key Bindings For simple changes to key bindings, `~/.textadept/init.lua` is a good place to @@ -111,7 +118,8 @@ instead of `Ctrl+N`: If you plan on redefining most key bindings, you would probably want to copy or create a new `keys.lua` and then put it in `~/.textadept/modules/textadept/`. -You can learn more about key bindings in the [key bindings LuaDoc][]. +You can learn more about key bindings and how to define them in the +[key bindings LuaDoc][]. [key bindings LuaDoc]: api/keys.html @@ -160,18 +168,27 @@ can override or add to them in your `~/.textadept/mime_types.conf`: ### Detect by Extension +The syntax for mapping a file extension to a lexer is: + file_ext lexer Note: `file_ext` should not start with a `.` (period). ### Detect by Shebang +The syntax for mapping a word contained in a shebang line (the first line of a +file whose first two characters are `#!`) to a lexer is: + #shebang_word lexer -Examples of `shebang_word`s are `lua`, `ruby`, `python`. +Examples of `shebang_word`s are `lua`, `ruby`, `python` which match lines like +`#!/usr/bin/lua`, `#!/usr/env/ruby`, and `#!/usr/bin/python3`, respectively. ### Detect by Pattern +The syntax for mapping a Lua pattern that matches the first line of a file to a +lexer is: + /pattern lexer [Lua pattern syntax][] is used. Only the last space, the one separating the diff --git a/doc/09_Themes.md b/doc/09_Themes.md index 37f5379e..89a77389 100644 --- a/doc/09_Themes.md +++ b/doc/09_Themes.md @@ -2,7 +2,7 @@ Textadept's look and feel is customized with themes. The themes that come with Textadept are `light`, `dark`, and `term`. By default the `light` theme is used -for the GUI version and `term` for the ncurses version. +for the GUI version and `term` for the terminal version. <span style="display: block; clear: right;"></span> @@ -28,6 +28,12 @@ comments, strings, and keywords in programming languages. [Styles][] are composed of fonts and colors and apply universally to all programming language elements, resulting in a single, unified theme. +In the terminal version of Textadept, colors are determined by your terminal +emulator's settings. The only colors recognized by Textadept are the standard +black, red, green, yellow, blue, magenta, cyan, white, and bold variants of +those colors. How your terminal chooses to display these colors is up to you. +However, you can still customize which colors are used for particular styles. + [Styles]: api/lexer.html#Styling.Tokens ### Buffer diff --git a/doc/10_Advanced.md b/doc/10_Advanced.md index 1009733e..04f05afe 100644 --- a/doc/10_Advanced.md +++ b/doc/10_Advanced.md @@ -8,9 +8,9 @@ inspecting, and entering `buffer` or `view` commands. If you try to cause instability in Textadept's Lua state, you might very well succeed so be careful. For available commands, see the [Lua API][]. Abbreviated commands for [`buffer`][], [`view`][] and [`gui`][] are available: the command -`buffer:append_text('foo')` can be shortened to `append_text('foo')`. As a -result, use `_G.print()` for Lua's `print()` since [`gui.print()`][] is -shortened to `print()`. +`buffer:append_text('foo')` can be shortened to `append_text('foo')`. Therefore, +use `_G.print()` for Lua's `print()` since [`gui.print()`][] is shortened to +`print()`.  diff --git a/doc/11_Scripting.md b/doc/11_Scripting.md index abd4e313..aa15df9e 100644 --- a/doc/11_Scripting.md +++ b/doc/11_Scripting.md @@ -22,7 +22,7 @@ since the editor is written primarily in Lua. ### Generating LuaDoc -You can generate API documentation for your own modules using the +You can generate Textadept-like API documentation for your own modules using the `doc/markdowndoc.lua` [LuaDoc][] module (you must have [Discount][] installed): luadoc -d . [-t template_dir] --doclet _HOME/doc/markdowndoc [module(s)] diff --git a/doc/12_Compiling.md b/doc/12_Compiling.md index c6481176..b134c411 100644 --- a/doc/12_Compiling.md +++ b/doc/12_Compiling.md @@ -155,14 +155,14 @@ non-Lua, libraries. ### Notes on CDK -[CDK][] is a library of ncurses widgets. Textadept includes a stripped down -version of this library. The following source files have been removed: -`alphalist.c`, `calendar.c`, `cdk_compat.{c,h}`, `cdk_test.h`, `dialog.c`, -`{d,f}scale.{c,h}`, `fslider.{c,h}`, `gen-{scale,slider}.{c,h}`, `get_index.c`, -`get_string.c`, `graph.c`, `histogram.c`, `marquee.c`, `matrix.c`, -`popup_dialog.c`, `radio.c`, `scale.{c,h}`, `selection.c`, `slider.{c,h}`, -`swindow.c`, `template.c`, `u{scale,slider}.{c,h}`, `view_{file,info}.c`, and -`viewer.c`. +[CDK][] is a library of ncurses widgets. The terminal version of Textadept +includes a stripped down version of this library. The following source files +were removed from CDK: `alphalist.c`, `calendar.c`, `cdk_compat.{c,h}`, +`cdk_test.h`, `dialog.c`, `{d,f}scale.{c,h}`, `fslider.{c,h}`, +`gen-{scale,slider}.{c,h}`, `get_index.c`, `get_string.c`, `graph.c`, +`histogram.c`, `marquee.c`, `matrix.c`, `popup_dialog.c`, `radio.c`, +`scale.{c,h}`, `selection.c`, `slider.{c,h}`, `swindow.c`, `template.c`, +`u{scale,slider}.{c,h}`, `view_{file,info}.c`, and `viewer.c`. `cdk.h` has been modified to not `#include` "matrix.h", "viewer.h", and any headers labeled "Generated headers" due to their machine-dependence. |