aboutsummaryrefslogtreecommitdiff
path: root/doc/07_Modules.md
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2013-05-20 12:41:29 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2013-05-20 12:41:29 -0400
commitcd53300ce7b4b6ce90dcf95525fd7cc14efc3685 (patch)
tree907466d522cc6939b42b6d043e991c27e09a1cea /doc/07_Modules.md
parentd042865f672d6708df80250c9c59172148a55f11 (diff)
downloadtextadept-cd53300ce7b4b6ce90dcf95525fd7cc14efc3685.tar.gz
textadept-cd53300ce7b4b6ce90dcf95525fd7cc14efc3685.zip
Rewrote the manual to use the active voice.
Diffstat (limited to 'doc/07_Modules.md')
-rw-r--r--doc/07_Modules.md74
1 files changed, 38 insertions, 36 deletions
diff --git a/doc/07_Modules.md b/doc/07_Modules.md
index 62553287..297a0ba5 100644
--- a/doc/07_Modules.md
+++ b/doc/07_Modules.md
@@ -10,9 +10,9 @@ features for a specific programming language.
Generic modules have a broad scope and are usually available for programming in
all languages or writing plain-text. An example is the [textadept module][]
which implements most of Textadept's functionality (find & replace, key
-bindings, menus, snippets, etc.). These kinds of modules are generally loaded on
-startup. See the [preferences][] page for instructions on how to load generic
-modules when Textadept starts.
+bindings, menus, snippets, etc.). In general, Textadept should load these kinds
+of modules on startup. See the [preferences][] page for instructions on how to
+do this.
[textadept module]: api/_M.textadept.html
[preferences]: 08_Preferences.html#Loading.Modules
@@ -20,26 +20,27 @@ modules when Textadept starts.
## Language-Specific
Language-specific modules have a scope limited to a single programming language.
-The name of the module is named after the language's lexer in the *lexers/*
-directory and is automatically loaded when editing source code in that
+The module's name matches the language's lexer in the *lexers/* directory.
+Textadept automatically loads the module when editing source code in that
particular language. In addition to the source code editing features discussed
-previously, these kinds of modules typically also have shell commands for
+previously, these kinds of modules typically also define shell commands for
running and compiling code, indentation settings, custom key bindings, and
-perhaps a custom context menu. These features are discussed below.
+perhaps a custom context menu. The manual discusses these features below.
### Compile and Run
-Most language-specific modules have a command that compiles and/or runs the code
+Most language-specific modules specify commands that compile and/or run the code
in the current file. Pressing `Ctrl+Shift+R` (`⌘⇧R` on Mac OSX | `M-^R` in
curses) executes the command for compiling code and `Ctrl+R` (`⌘R` | `^R`)
-executes the command for running code. Any recognized errors in the output are
-marked. Pressing `Ctrl+Alt+E` (`^⌘E` | `M-X`) attempts to jump to the source of
-the next recognized error and `Ctrl+Alt+Shift+E` (`^⌘⇧E` | `M-S-X`) attempts to
-jump to the previous one. Double-clicking on errors will also jump to their
-sources. Note: In order for these features to 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][].
+executes the command for running code. A new buffer shows the output from the
+command and marks any recognized errors. Pressing `Ctrl+Alt+E` (`^⌘E` | `M-X`)
+attempts to jump to the source of the next recognized error and
+`Ctrl+Alt+Shift+E` (`^⌘⇧E` | `M-S-X`) attempts to jump to the previous one.
+Double-clicking on errors also jumps to their sources. Note: In order for these
+features to 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, you can do so
+[manually][] in your [user-init file][].
![Runtime Error](images/runerror.png)
@@ -51,18 +52,18 @@ error format, it can be done [manually][] in your [user-init file][].
Some programming languages have style guidelines for indentation and/or line
endings which differ from Textadept's defaults. In this case, language-specific
-modules [set][] these preferences. If you wish to change them or use your own
-preferences, see the [language module preferences][] section.
+modules [set][] these preferences. You can do so manually with your
+[language module preferences][].
[set]: api/_M.html#Buffer.Properties
[language module preferences]: 08_Preferences.html#Language-Specific
### Key Bindings
-Most language-specific modules have a set of key bindings for
-[custom commands][]. See the module's [LuaDoc][] or code to find out which key
-bindings are assigned. They are typically stored in the `Ctrl+L` (`⌘L` on Mac
-OSX | `M-L` in curses) key chain prefix.
+Most language-specific modules assign a set of key bindings to
+[custom commands][]. The module's [LuaDoc][] or code lists which key bindings
+map to which commands. The `Ctrl+L` (`⌘L` on Mac OSX | `M-L` in curses) key
+chain prefix typically houses them.
[custom commands]: api/_M.html#Commands
[LuaDoc]: api/index.html
@@ -74,13 +75,14 @@ Right-click inside the view to bring up this menu.
## Getting Modules
-The officially supported language modules are hosted [here][] and are available
-as a separate download. To upgrade to the most recent version of a module, you
-can either use [Mercurial][] (run `hg pull` and then `hg update` on or from
-within the module) or download a zipped version from the module's repository
-homepage and overwrite the existing one.
+Textadept has a set of officially supported language modules available as a
+separate download from the Textadept downloads page with their sources hosted
+[here][]. To upgrade to the most recent version of a module, either use
+[Mercurial][] (run `hg pull` and then `hg update` on or from within the module)
+or download a zipped version from the module's repository homepage and overwrite
+the existing one.
-For now, user-created modules are obtained from the [wiki][].
+For now, the [wiki][] hosts third-party, user-created modules.
[here]: http://foicica.com/hg
[Mercurial]: http://mercurial.selenic.com
@@ -88,14 +90,14 @@ For now, user-created modules are obtained from the [wiki][].
## Installing Modules
-If you do not have write permissions for the directory Textadept is installed
-in, place the module in your *~/.textadept/modules/* folder and replace all
-instances of `_HOME` with `_USERHOME` in the module's *init.lua*. It is
-recommended to put all custom or user-created modules in your
-*~/.textadept/modules/* directory so they will not be overwritten when you
-update Textadept. Also, modules in that directory override any modules in
-Textadept's *modules/* directory. This means that if you have your own *lua*
-module, it will be loaded instead of the one that comes with Textadept.
+If you do not have write permissions in Textadept's installed location, place
+the module in your *~/.textadept/modules/* folder and replace all instances of
+`_HOME` with `_USERHOME` in the module's *init.lua*. Putting all custom or
+user-created modules in your *~/.textadept/modules/* directory prevents the
+possibility of overwriting them when you update Textadept. Also, modules in that
+directory override any modules in Textadept's *modules/* directory. This means
+that if you have your own *lua* module, Textadept loads that one instead of its
+own.
## Developing Modules