diff options
author | 2013-07-08 16:09:29 -0400 | |
---|---|---|
committer | 2013-07-08 16:09:29 -0400 | |
commit | 6600c4f959bb4ea91a2f632bfc5375f7e75e40c4 (patch) | |
tree | 3c108fa22c3c6d6d32ea7beef55039bd845149d5 /doc | |
parent | 7d1f21b44479d8b4484f8e27872eafd203b0e727 (diff) | |
download | textadept-6600c4f959bb4ea91a2f632bfc5375f7e75e40c4.tar.gz textadept-6600c4f959bb4ea91a2f632bfc5375f7e75e40c4.zip |
Renamed "language-specific" modules to just "language modules" in documentation.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/02_Installation.md | 20 | ||||
-rw-r--r-- | doc/04_WorkingWithFiles.md | 6 | ||||
-rw-r--r-- | doc/06_AdeptEditing.md | 12 | ||||
-rw-r--r-- | doc/07_Modules.md | 76 | ||||
-rw-r--r-- | doc/08_Preferences.md | 53 | ||||
-rw-r--r-- | doc/09_Themes.md | 2 | ||||
-rw-r--r-- | doc/11_Scripting.md | 4 | ||||
-rw-r--r-- | doc/14_Appendix.md | 4 |
8 files changed, 85 insertions, 92 deletions
diff --git a/doc/02_Installation.md b/doc/02_Installation.md index c098ca63..353d0b81 100644 --- a/doc/02_Installation.md +++ b/doc/02_Installation.md @@ -50,12 +50,12 @@ appropriate package for your platform. For the Windows and Mac OSX packages, the bundled GTK+ runtime accounts for more than 3/4 of the download and unpackaged application sizes. Textadept itself is much smaller. -You also have the option of downloading an official set of -[language-specific modules][] from the download page. Textadept itself includes -C/C++ and Lua language modules by default. +You also have the option of downloading an official set of [language modules][] +from the download page. Textadept itself includes C/C++ and Lua language modules +by default. [download page]: http://foicica.com/textadept/download -[language-specific modules]: 07_Modules.html#Language-Specific +[language modules]: 07_Modules.html#Language.Modules ## Installation @@ -66,8 +66,8 @@ privileges. Unpack the archive anywhere. -If you downloaded the set of language-specific modules, unpack it where you -unpacked the Textadept archive. The modules are located in the +If you downloaded the set of language modules, unpack it where you unpacked the +Textadept archive. The modules are located in the */path/to/textadept_x.x/modules/* directory. ### Mac OSX @@ -77,7 +77,7 @@ Unpack the archive and move *Textadept.app* to your user or system contains an optional *ta* script for launching Textadept from the command line that you can put in a directory in your "$PATH" (e.g. */usr/local/bin/*). -If you downloaded the set of language-specific modules, unpack it, right-click +If you downloaded the set of language modules, unpack it, right-click *Textadept.app*, select "Show Package Contents", navigate to *Contents/Resources/modules/*, and move the unpacked modules there. @@ -85,9 +85,9 @@ If you downloaded the set of language-specific modules, unpack it, right-click Unpack the archive anywhere. -If you downloaded the set of language-specific modules, unpack it where you -unpacked the Textadept archive. The modules are located in the -*textadept_x.x\modules\\* directory. +If you downloaded the set of language modules, unpack it where you unpacked the +Textadept archive. The modules are located in the *textadept_x.x\modules\\* +directory. ## Running diff --git a/doc/04_WorkingWithFiles.md b/doc/04_WorkingWithFiles.md index 764b9c0b..c8fc43c5 100644 --- a/doc/04_WorkingWithFiles.md +++ b/doc/04_WorkingWithFiles.md @@ -37,8 +37,8 @@ settings in the buffer status statusbar. #### Indentation -Usually, [language-specific modules][] or [user settings][] dictate the -buffer's indentation setting. By default, indentation is 2 spaces. Pressing +Usually, [language modules][] or [user settings][] dictate the buffer's +indentation setting. By default, indentation is 2 spaces. Pressing `Ctrl+Alt+Shift+T` (`^⇧T` on Mac OSX | `M-T` or `M-S-T` in curses) manually toggles between using tabs and spaces, although this only affects future indentation. Existing indentation remains unchanged. `Ctrl+Alt+I` (`^I` | `M-I`) @@ -46,7 +46,7 @@ performs the conversion. (If the buffer uses tabs, all indenting spaces convert to tabs. If the buffer uses spaces, all indenting tabs convert to spaces.) Similarly, the "Buffer -> Indentation" menu manually sets indentation size. -[language-specific modules]: 07_Modules.html#Buffer.Properties +[language modules]: 07_Modules.html#Buffer.Properties [user settings]: 08_Preferences.html#Buffer.Properties #### Line Endings diff --git a/doc/06_AdeptEditing.md b/doc/06_AdeptEditing.md index 764693c7..68b0dbd4 100644 --- a/doc/06_AdeptEditing.md +++ b/doc/06_AdeptEditing.md @@ -251,8 +251,8 @@ and display API documentation. Pressing `Ctrl+Space` (`⌥⎋` on Mac OSX | `^Sp in curses) completes the current symbol and `Ctrl+H` (`^H` | `M-H` or `M-S-H`) shows any known documentation on the current symbol. 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][]. All of -the [official][] Textadept language-specific modules have Adeptsenses. +defined. [Language modules][] usually [define Adeptsenses][]. All of the +[official][] Textadept language modules have Adeptsenses.  @@ -260,7 +260,7 @@ the [official][] Textadept language-specific modules have Adeptsenses.  -[Language-specific modules]: 07_Modules.html#Language-Specific +[Language modules]: 07_Modules.html#Language.Modules [Adeptsense]: api/_M.textadept.adeptsense.html [define Adeptsenses]: api/_M.html#Adeptsense [official]: http://foicica.com/hg @@ -279,9 +279,9 @@ followed by the `Tab` (`⇥` | `Tab`) key. Subsequent presses of `Tab` (`⇥` | `Tab`) cause the caret to enter placeholders in sequential order, `Shift+Tab` (`⇧⇥` | `S-Tab`) goes back to the previous placeholder, and `Ctrl+Shift+K` (`⌥⇧⇥` | `M-S-K`) cancels the current snippet. Textadept supports nested -snippets, snippets inserted from within another snippet. Language-specific -modules usually define their [own set][] of snippets, but your -[snippet preferences][] can define some too. +snippets, snippets inserted from within another snippet. Language modules +usually define their [own set][] of snippets, but your [snippet preferences][] +can define some too.  diff --git a/doc/07_Modules.md b/doc/07_Modules.md index 297a0ba5..02b6bf0c 100644 --- a/doc/07_Modules.md +++ b/doc/07_Modules.md @@ -1,46 +1,40 @@ # Modules -Most of Textadept's functionality comes from Lua modules. Essentially there are -two classes of module: generic and language-specific. A generic module provides -features for all programming languages while a language-specific module provides -features for a specific programming language. +Most of Textadept's functionality comes from Lua modules loaded on startup. An +example is the [textadept module][] which implements most of Textadept's +functionality (find & replace, key bindings, menus, snippets, etc.) See the +[preferences][] page for instructions on how to load your own modules on +startup. -## Generic - -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.). In general, Textadept should load these kinds -of modules on startup. See the [preferences][] page for instructions on how to -do this. +Textadept also recognizes a special kind of module: a language module. Language +modules provide functionality specific their respective programming languages. [textadept module]: api/_M.textadept.html [preferences]: 08_Preferences.html#Loading.Modules -## Language-Specific +## Language Modules -Language-specific modules have a scope limited to a single programming language. -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 define shell commands for -running and compiling code, indentation settings, custom key bindings, and -perhaps a custom context menu. The manual discusses these features below. +Language modules have a scope limited to a single programming language. 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 define shell commands for running and +compiling code, indentation settings, custom key bindings, and perhaps a custom +context menu. The manual discusses these features below. ### Compile and Run -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. 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][]. +Most language 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. 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 module does not exist or does not [define][] commands +or an error format, you can do so [manually][] in your [user-init file][].  @@ -51,27 +45,27 @@ exist or does not [define][] commands or an error format, you can do so ### Buffer Properties 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. You can do so manually with your +endings which differ from Textadept's defaults. In this case, language 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 +[language module preferences]: 08_Preferences.html#Language ### Key Bindings -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. +Most language 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 ### Context Menu -Some language-specific modules add extra actions to the context menu. -Right-click inside the view to bring up this menu. +Some language modules add extra actions to the context menu. Right-click inside +the view to bring up this menu. ## Getting Modules diff --git a/doc/08_Preferences.md b/doc/08_Preferences.md index 463c66c2..75ed019b 100644 --- a/doc/08_Preferences.md +++ b/doc/08_Preferences.md @@ -17,21 +17,21 @@ code. Try to refrain from modifying the default modules that come with Textadept, even if you just want to change an option in a generic module, modify the buffer -settings for a language-specific module, edit file types, or add a small bit of -custom code. Upgrading Textadept to a new version may overwrite those changes. -Instead you have two options: load your own module instead of the default one, -or run your custom module code after the default module loads. For the most -part, use the second option because it is simpler and more compatible with -future releases. The manual discusses both options below in the context of -generic and language-specific modules. +settings for a language module, edit file types, or add a small bit of custom +code. Upgrading Textadept to a new version may overwrite those changes. Instead +you have two options: load your own module instead of the default one, or run +your custom module code after the default module loads. For the most part, use +the second option because it is simpler and more compatible with future +releases. The manual discusses both options below in the context of generic and +language modules. #### Generic Many of Textadept's generic modules have configurable settings changeable from *~/.textadept/init.lua* after Textadept loads the module. The module's [LuaDoc][] lists these settings. For example, to disable character autopairing -with typeover and stripping whitespace on save, add the following to your -*~/.textadept/init.lua*: +with typeover and stripping trailing whitespace on save, add the following to +your *~/.textadept/init.lua*: _M.textadept.editing.AUTOPAIR = false _M.textadept.editing.TYPEOVER_CHARS = false @@ -57,20 +57,20 @@ rather than its own. [LuaDoc]: api/index.html -#### Language-Specific +#### Language -Similar to generic modules, putting your own language-specific module in +Similar to generic modules, putting your own language 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/* results in Textadept loading that -module for editing Lua code in place of its own. However, if you make custom -changes to that module and upgrade Textadept later, the module may no longer be -compatible. Rather than potentially wasting time merging changes, run custom -code independent of a module in the module's *post_init.lua* file. In this case, -instead of copying the `lua` module and creating an -`events.LANGUAGE_MODULE_LOADED` event handler to use tabs, simply put the event -handler in *~/.textadept/modules/lua/post_init.lua*: +For example, copying the default Lua language module from *modules/lua/* to +*~/.textadept/modules/* results in Textadept loading that module for editing Lua +code in place of its own. However, if you make custom changes to that module and +upgrade Textadept later, the module may no longer be compatible. Rather than +potentially wasting time merging changes, run custom code independent of a +module in the module's *post_init.lua* file. In this case, instead of copying +the `lua` module and creating an `events.LANGUAGE_MODULE_LOADED` event handler +to use tabs, simply put the event handler in +*~/.textadept/modules/lua/post_init.lua*: events.connect(events.LANGUAGE_MODULE_LOADED, function(lang) if lang == 'lua' then buffer.use_tabs = true end @@ -97,11 +97,10 @@ After creating or downloading a generic module called `foo` that you want to load along with the default modules, simply add the following to your *~/.textadept/init.lua*: - _M.foo = require 'foo' + _M.foo = require('foo') -Textadept automatically loads language-specific modules when opening a source -file of that language, so simply installing the language-specific module is -sufficient. +Textadept automatically loads language modules when opening a source file of +that language, so simply installing the language module is sufficient. ### Key Bindings @@ -145,18 +144,18 @@ split view. Any settings there override Textadept's default *properties.lua* settings. For example, to use tabs rather than spaces and have a tab size of 4 spaces by default, your *~/.textadept/properties.lua* would contain: - buffer.tab_width = 4 buffer.use_tabs = true + buffer.tab_width = 4 (Remember that in order to have per-filetype properties, you need to have a -[language-specific module][].) +[language module][].) Textadept's *properties.lua* is a good reference to see available properties to set. It also has many commented out properties that you can copy to your *~/.textadept/properties.lua* and uncomment to turn on or change the value of. Use [Adeptsense][] to view a property's documentation or read the [LuaDoc][]. -[language-specific module]: 07_Modules.html#Buffer.Properties +[language module]: 07_Modules.html#Buffer.Properties [Adeptsense]: 06_AdeptEditing.html#Adeptsense [LuaDoc]: api/buffer.html diff --git a/doc/09_Themes.md b/doc/09_Themes.md index eb069795..5777d896 100644 --- a/doc/09_Themes.md +++ b/doc/09_Themes.md @@ -72,7 +72,7 @@ managing more changes is probably easier with the latter. [`gui.set_theme()`]: api/gui.html#set_theme -### Language-Specific +### Language Textadept also allows you to customize themes per-language through the `events.LANGUAGE_MODULE_LOADED` event. For example, changing the color of diff --git a/doc/11_Scripting.md b/doc/11_Scripting.md index 44a71db0..c0c68b59 100644 --- a/doc/11_Scripting.md +++ b/doc/11_Scripting.md @@ -84,8 +84,8 @@ them. ### Modules -*modules/* contains generic and language-specific modules for editing text and -source code. +*modules/* contains generic and language modules for editing text and source +code. ### Themes diff --git a/doc/14_Appendix.md b/doc/14_Appendix.md index 944fb9d6..a3f21a08 100644 --- a/doc/14_Appendix.md +++ b/doc/14_Appendix.md @@ -267,11 +267,11 @@ Notes: refrain from setting properties like `buffer.sel_eol_filled` which belong in a [*properties.lua*][] file. 6. The separate *buffer.lua* is gone. Use [*properties.lua*][] or a - [language-specific module][]. + [language module][]. [customizing themes]: 09_Themes.html#Customizing.Themes [*properties.lua*]: 08_Preferences.html#Buffer.Properties -[language-specific module]: 07_Modules.html#Buffer.Properties +[language module]: 07_Modules.html#Buffer.Properties ##### Theme Preference |