From c7b543e79b41d9a983cc89e264acd0472d09dc92 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 30 Nov 2010 19:55:39 -0500 Subject: New manual. --- core/._G.luadoc | 9 +- core/._m.luadoc | 92 ++++++----- core/.command_entry.luadoc | 27 --- core/.find.luadoc | 31 +--- core/args.lua | 1 - core/file_io.lua | 12 -- core/locale.lua | 9 - doc/manual/10_Advanced.md | 46 ++++++ doc/manual/11_Scripting.md | 57 +++++++ doc/manual/12_Compiling.md | 81 +++++++++ doc/manual/13_Help.md | 15 ++ doc/manual/14_Appendix.md | 236 +++++++++++++++++++++++++++ doc/manual/1_Introduction.md | 88 ++++------ doc/manual/2_Installation.md | 54 +++--- doc/manual/3_Compiling.md | 89 ---------- doc/manual/3_UserInterface.md | 41 +++++ doc/manual/4_UserInterface.md | 30 ---- doc/manual/4_WorkingWithFiles.md | 65 ++++++++ doc/manual/5_FileNavigation.md | 26 +++ doc/manual/5_FolderStructure.md | 39 ----- doc/manual/6_AdeptEditing.md | 151 +++++++++++++++++ doc/manual/6_Startup.md | 60 ------- doc/manual/7_LuaInterface.md | 10 -- doc/manual/7_Modules.md | 93 +++++++++++ doc/manual/8_Themes.md | 62 +++++++ doc/manual/9_Preferences.md | 140 ++++++++++++++++ doc/manual/images/bufferbrowser.png | Bin 0 -> 72930 bytes doc/manual/images/bufferbrowserfiltered.png | Bin 0 -> 39274 bytes doc/manual/images/commandentry.png | Bin 0 -> 6480 bytes doc/manual/images/commandentrycompletion.png | Bin 0 -> 4578 bytes doc/manual/images/darktheme.png | Bin 0 -> 39619 bytes doc/manual/images/docstatusbar.png | Bin 0 -> 2679 bytes doc/manual/images/findinfiles.png | Bin 0 -> 94166 bytes doc/manual/images/icon.png | Bin 0 -> 8030 bytes doc/manual/images/lighttheme.png | Bin 0 -> 46721 bytes doc/manual/images/linux.png | Bin 0 -> 12554 bytes doc/manual/images/macosx.png | Bin 0 -> 14091 bytes doc/manual/images/matchingbrace.png | Bin 0 -> 6107 bytes doc/manual/images/rectangularselection.png | Bin 0 -> 1928 bytes doc/manual/images/rectangularselection2.png | Bin 0 -> 2094 bytes doc/manual/images/scitetheme.png | Bin 0 -> 29966 bytes doc/manual/images/snapopen.png | Bin 0 -> 72278 bytes doc/manual/images/snippet.png | Bin 0 -> 951 bytes doc/manual/images/snippet2.png | Bin 0 -> 5192 bytes doc/manual/images/splitviews.png | Bin 0 -> 136537 bytes doc/manual/images/textadept.png | Bin 0 -> 27344 bytes doc/manual/images/ui.png | Bin 0 -> 109804 bytes doc/manual/images/win32.png | Bin 0 -> 7923 bytes doc/manual/images/wordcompletion.png | Bin 0 -> 3490 bytes doc/manual/images/wordhighlight.png | Bin 0 -> 69127 bytes doc/sidebar.md | 29 ++-- modules/textadept/keys.lua | 9 - modules/textadept/menu.lua | 1 - modules/textadept/mime_types.lua | 39 ----- modules/textadept/snippets.lua | 27 ++- scripts/update_doc | 8 +- 56 files changed, 1171 insertions(+), 506 deletions(-) mode change 100644 => 100755 core/._m.luadoc create mode 100644 doc/manual/10_Advanced.md create mode 100644 doc/manual/11_Scripting.md create mode 100644 doc/manual/12_Compiling.md create mode 100644 doc/manual/13_Help.md create mode 100644 doc/manual/14_Appendix.md delete mode 100644 doc/manual/3_Compiling.md create mode 100644 doc/manual/3_UserInterface.md delete mode 100644 doc/manual/4_UserInterface.md create mode 100644 doc/manual/4_WorkingWithFiles.md create mode 100644 doc/manual/5_FileNavigation.md delete mode 100644 doc/manual/5_FolderStructure.md create mode 100644 doc/manual/6_AdeptEditing.md delete mode 100644 doc/manual/6_Startup.md delete mode 100644 doc/manual/7_LuaInterface.md create mode 100644 doc/manual/7_Modules.md create mode 100644 doc/manual/8_Themes.md create mode 100644 doc/manual/9_Preferences.md create mode 100644 doc/manual/images/bufferbrowser.png create mode 100644 doc/manual/images/bufferbrowserfiltered.png create mode 100644 doc/manual/images/commandentry.png create mode 100644 doc/manual/images/commandentrycompletion.png create mode 100644 doc/manual/images/darktheme.png create mode 100644 doc/manual/images/docstatusbar.png create mode 100644 doc/manual/images/findinfiles.png create mode 100644 doc/manual/images/icon.png create mode 100644 doc/manual/images/lighttheme.png create mode 100644 doc/manual/images/linux.png create mode 100644 doc/manual/images/macosx.png create mode 100644 doc/manual/images/matchingbrace.png create mode 100644 doc/manual/images/rectangularselection.png create mode 100644 doc/manual/images/rectangularselection2.png create mode 100644 doc/manual/images/scitetheme.png create mode 100644 doc/manual/images/snapopen.png create mode 100644 doc/manual/images/snippet.png create mode 100644 doc/manual/images/snippet2.png create mode 100644 doc/manual/images/splitviews.png create mode 100644 doc/manual/images/textadept.png create mode 100644 doc/manual/images/ui.png create mode 100644 doc/manual/images/win32.png create mode 100644 doc/manual/images/wordcompletion.png create mode 100644 doc/manual/images/wordhighlight.png diff --git a/core/._G.luadoc b/core/._G.luadoc index 94c6dfa4..a0c0fb03 100644 --- a/core/._G.luadoc +++ b/core/._G.luadoc @@ -12,19 +12,16 @@ module('_G') -- * `_LEXERPATH`: Paths to lexers, formatted like -- [`package.path`][package_path]. -- * `_RELEASE`: The Textadept release version. --- * `_THEME`: The [theme][theme] file to use. +-- * `_THEME`: The [theme](../manual/8_Themes.lua) file to use. -- * `_USERHOME`: Path to the user's `~/.textadept/`. -- * `_CHARSET`: The character set encoding of the filesystem. This is used in --- [File I/O][file_io]. --- * `RESETTING`: If [`reset()`][reset] has been called, +-- [File I/O](../modules/io.html). +-- * `RESETTING`: If [`reset()`](../modules/_G.html#reset) has been called, -- this flag is `true` while the Lua state is being re-initialized. -- * `WIN32`: If Textadept is running on Windows, this flag is `true`. -- * `OSX`: If Textadept is running on Mac OSX, this flag is `true`. -- -- [package_path]: http://www.lua.org/manual/5.1/manual.html#pdf-package.path --- [theme]: ../manual/6_Startup.html --- [file_io]: ../modules/io.html --- [reset]: ../modules/_G.html#reset --- -- Command line parameters. diff --git a/core/._m.luadoc b/core/._m.luadoc old mode 100644 new mode 100755 index c8665fad..6f34dcba --- a/core/._m.luadoc +++ b/core/._m.luadoc @@ -9,59 +9,75 @@ module('_m') -- Markdown: -- ## Overview -- --- Modules utilize the Lua 5.1 package model. It is recommended to put all --- modules in your `~/.textadept/modules/` directory. A module consists of a --- single directory with an `init.lua` script to load any additional Lua files --- (typically in the same location). Essentially there are two classes of --- modules: generic and language-specific. +-- Note that while language-specific modules can only be used by files of that +-- language, they persist in Textadept's Lua state. Because of this, it is not +-- recommended to set global functions or variables and depend on them, as they +-- may be inadvertantly overwritten. Keep these inside the module. -- --- ## Generic Modules +-- ## Structure -- --- This class of modules is usually available globally for programming in all --- languages. An example is the [`_m.textadept`][m_textadept] module which adds --- a wide variety of text editing capabilities to Textadept. +-- Each module should have an `init.lua` that `require`s all submodules it +-- needs. For an example, see `modules/textadept/init.lua`. -- --- [m_textadept]: ../modules/_m.textadept.html +-- ## Recommended Features for Language-Specific Modules -- --- ## Language-specific Modules +-- #### Snippets -- --- Each module of this class of modules is named after a language lexer in --- `lexers/` and is usually available only for editing code in that particular --- programming language. Examples are the [`_m.cpp`][m_cpp] and --- [`_m.lua`][m_lua] modules which provide special editing features for the --- C/C++ and Lua languages respectively. +-- [Snippets](../modules/_m.textadept.snippets.html) for common code constructs. -- --- [m_cpp]: ../modules/_m.cpp.html --- [m_lua]: ../modules/_m.lua.html +-- #### Commands -- --- For language modules that have a `set_buffer_properties` function, that --- function is called each time a file with that language is opened. This is --- useful for setting `buffer.use_tabs`, `buffer.tab_width`, etc. for different --- languages. +-- ##### Run -- --- Note: While language-specific modules can only be used by files of that --- language, they persist in Textadept's Lua state. Because of this, it is not --- recommended to set global functions or variables and depend on them, as they --- may be inadvertantly overwritten. Keep these inside the module. +-- If the code can be run by an interpreter or other executable, create a [run +-- command](../modules/_m.textadept.run.html#run_command) for it as well as an +-- [error format](../modules/_m.textadept.run.html#error_detail) for the ability +-- to jump to the position in a file where the error occured. -- --- ## Loading Modules +-- For example: -- --- Generic modules can be loaded using `require`: +-- _m.textadept.run.run_command.lua = 'lua %(filename)' -- --- require 'module_name' +-- ##### Compile -- --- Language-specific modules are automatically loaded when a file of that --- language is loaded or a buffer's lexer is set to that language. +-- If the code can be compiled by an executable, create a [compile +-- command](../modules/_m.textadept.run.html#compile_command) for it. -- --- ## Modules and Key Commands +-- For example: +-- +-- _m.textadept.run.compile_command.lua = 'luac %(filename)' +-- +-- ##### Block Comment -- --- When assigning [key commands][key_commands] to module functions, do not --- forget to do so AFTER the function has been defined. Typically key commands --- are placed at the end of files, like `commands.lua` in language-specific --- modules. +-- Create a [comment +-- prefix](../modules/_m.textadept.editing.html#comment_string) for it so code +-- can be easily commented and uncommented. +-- +-- For example: +-- +-- _m.textadept.editing.comment_string.lua = '--' +-- +-- #### Buffer Properties +-- +-- Add a `set_buffer_properties` function with default buffer properties for +-- code like tab and indentation settings. +-- +-- For example: +-- +-- function set_buffer_properties() +-- local buffer = buffer +-- buffer.use_tabs = false +-- buffer.tab_width = 2 +-- buffer.indent = 2 +-- end +-- +-- ## Modules and Key Commands -- --- [key_commands]: ../modules/_m.textadept.keys.html +-- When assigning [key commands](../modules/_m.textadept.keys.html) to module +-- functions, do not forget to do so AFTER the function has been defined. +-- Typically key commands are placed at the end of files, like `init.lua` in +-- the `textadept` module. --- -- This module contains no functions. -function no_functions() end +function no_functions() end no_functions = nil diff --git a/core/.command_entry.luadoc b/core/.command_entry.luadoc index e474fa13..377fa0a8 100644 --- a/core/.command_entry.luadoc +++ b/core/.command_entry.luadoc @@ -11,33 +11,6 @@ module('gui.command_entry') -- -- * `entry_text`: The text in the entry. -- --- ## Overview --- --- Access to the Lua state is available through this command entry. It is useful --- for debugging, inspecting, and entering buffer or view commands. If you try --- cause instability in Textadept's Lua state, you might very well succeed. Be --- careful. --- --- Tab-completion for functions, variables, tables, etc. is available. Press the --- `Tab` key to display a list of available completions. Use the arrow keys to --- make a selection and press `Enter` to insert it. --- --- Abbreviated commands for the `buffer`, `view` and `gui` are available. So --- `buffer:append_text('textadept')` can be shortened to --- `append_text('textadept')`. Please note `print()` calls --- [`gui.print()`][gui_print] and not Lua's `print()`. The latter can be --- accessed with `_G.print()`. --- --- [gui_print]: ../modules/gui.html#print --- --- ## Extending --- --- You can extend the command entry to do more than enter Lua commands. An --- example of this is [incremental search][inc_search]. See --- `modules/textadept/find.lua` for the implementation. --- --- [inc_search]: ../modules/gui.find.html#incremental --- -- ## Events -- -- The following is a list of all command entry events generated in diff --git a/core/.find.luadoc b/core/.find.luadoc index 038d3943..e1251c02 100644 --- a/core/.find.luadoc +++ b/core/.find.luadoc @@ -20,34 +20,6 @@ module('gui.find') -- * `in_files`: Flag indicating whether or not to search for the text in a list -- of files. -- --- ## Overview --- --- In addition to offering standard find and replace, Textadept allows you to --- find with [Lua patterns][lua_patterns] and replace with Lua captures and even --- Lua code! Lua captures (`%n`) are only available from a Lua pattern search, --- but embedded Lua code enclosed in `%()` is always available. --- --- [lua_patterns]: http://www.lua.org/manual/5.1/manual.html#5.4.1 --- --- If any block of text is selected for 'Replace All', only matches found in --- that block are replaced. --- --- Find in Files will prompt for a directory to recursively search and display --- the results in a new buffer. Double-clicking a search result will jump to it --- in the file. Replace in Files is not supported. You will have to Find in --- Files first, and then 'Replace All' for each file a result is found in. --- The 'Match Case', 'Whole Word', and 'Lua pattern' flags still apply. --- --- Incremental search uses the Command Entry. --- --- ## Customizing Look and Feel --- --- There is no way to theme the dialog from within Textadept. Instead you can --- use [GTK Resource files][gtkrc]. The find and replace entries have widget --- names of `textadept-find-entry` and `textadept-replace-entry` respectively. --- --- [gtkrc]: http://library.gnome.org/devel/gtk/unstable/gtk-Resource-Files.html. --- -- ## Events -- -- The following is a list of all find events generated in @@ -65,7 +37,8 @@ module('gui.find') -- - find\_text: the text to search for. -- - repl\_text: the text to replace found text with. ---- Displays and focuses the find/replace dialog. +--- +-- Displays and focuses the find/replace dialog. function focus() end --- diff --git a/core/args.lua b/core/args.lua index 9535fa63..3c0277f6 100644 --- a/core/args.lua +++ b/core/args.lua @@ -4,7 +4,6 @@ module('args', package.seeall) -- Markdown: --- -- ## Events -- -- The following is a list of all arg events generated in diff --git a/core/file_io.lua b/core/file_io.lua index fded1499..574ea6a2 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -8,18 +8,6 @@ local events = _G.events module('io', package.seeall) -- Markdown: --- ## Overview --- --- Textadept represents all characters and strings internally as UTF-8. You will --- not notice any difference for working with files containing ASCII text since --- UTF-8 is compatible with it. Problems may arise for files with more exotic --- encodings that may not be detected properly, if at all. When opening a file, --- the list of encodings tried before throwing a `conversion failed` error is in --- `core/file_io.lua`'s [`try_encodings`](#try_encodings). Textadept respects --- the detected encoding when saving the file. --- --- New files are saved as UTF-8 by default. --- -- ## Converting Filenames to and from UTF-8 -- -- If your filesystem does not use UTF-8 encoded filenames, conversions to and diff --git a/core/locale.lua b/core/locale.lua index 5b14a254..0b148e68 100644 --- a/core/locale.lua +++ b/core/locale.lua @@ -5,15 +5,6 @@ module('locale', package.seeall) -- Markdown: --- ## Overview --- --- All Textadept messages displayed are located in `core/locale.conf`. To change --- the language, simply put a similar file containing the translated messages in --- your `~/.textadept/` folder. See `core/locale.conf` for more information. --- --- Feel free to translate Textadept and send your modified `locale.conf` files --- to me. I will put them up on the site where they can be accessed. --- -- ## Fields -- -- Each message ID in `core/locale.conf` is accessible as a field in this diff --git a/doc/manual/10_Advanced.md b/doc/manual/10_Advanced.md new file mode 100644 index 00000000..86387fca --- /dev/null +++ b/doc/manual/10_Advanced.md @@ -0,0 +1,46 @@ +# Advanced + +## Command Entry + +Access to the Lua state is available through the command entry. Press `F2` to +access it. It is useful for debugging, inspecting, and entering buffer or view +commands. If you try cause instability in Textadept's Lua state, you might very +well succeed so be careful. For more information, see the +[scripting](11_Scripting.html) page. + +Abbreviated commands for the `buffer`, `view` and `gui` are available. So +`buffer:append_text('foo')` can be shortened to `append_text('foo')`. `print()` +redirects to [`gui.print()`](../modules/gui.html#print). Use `_G.print()` for +Lua's `print()`. + +![Command Entry](images/commandentry.png) + +#### Tab Completion + +Tab-completion for functions, variables, tables, etc. is available. Press the +`Tab` key to display a list of available completions. Use the arrow keys to make +a selection and press `Enter` to insert it. + +![Command Completion](images/commandentrycompletion.png) + +#### Extending + +You can extend the command entry to do more than enter Lua commands. An +example of this is [incremental +search](../modules/gui.find.html#find_incremental). See +`modules/textadept/find.lua` for the implementation. + +## File Encoding + +Textadept represents all characters and strings internally as UTF-8. You will +not notice any difference for working with files containing ASCII text since +UTF-8 is compatible with it. Textadept can also detect ISO-8859-1 and MacRoman, +the primary encodings used on Windows and Mac OSX respectively. Files with more +exotic encodings may not be detected properly, if at all. You can change the +list of encodings Textadept tries to detect via +[`io.try_encodings`](../modules/io.html#try_encodings). + +It is recommended to use UTF-8 encoded files because UTF-8 is very well +supported by other text editors and operating systems. You can change the file's +encoding via the `Buffer -> Encoding` menu. Textadept saves new files as UTF-8 +by default. diff --git a/doc/manual/11_Scripting.md b/doc/manual/11_Scripting.md new file mode 100644 index 00000000..aaaaa498 --- /dev/null +++ b/doc/manual/11_Scripting.md @@ -0,0 +1,57 @@ +# Scripting + +Textadept has superb support for editing Lua code. Syntax autocomplete and +LuaDoc is available for many Textadept objects as well as Lua's standard +libraries. See the [lua module documentation](../modules/_m.lua.commands.html) +for more information. + +## LuaDoc and Examples + +Textadept's API is heavily documented. The [LuaDoc](../index.html) is the +ultimate resource on scripting Textadept. There are of course abundant scripting +examples since Textadept is mostly written in Lua. + +## Scintilla + +The editing component used by Textadept is [Scintilla](http://scintilla.org). +The [buffer](../modules/buffer.html) part of Textadept's API is derived from the +[Scintilla API](http://scintilla.org/ScintillaDoc.html) so any C/C++ code using +Scintilla calls can be ported to Lua without too much trouble. + +## Textadept Folder Structure + +Because Textadept is mostly written in Lua, its Lua scripts have to be stored in +an organized folder structure. + +#### Core + +Textadept's core Lua modules are contained in `core/`. These are absolutely +necessary in order for the application to run. They are responsible for +Textadept's Lua to C interface, event structure, file input/output, and +localization. + +#### Lexers + +Lexer Lua modules are responsible for the syntax highlighting of source code. +They are located in `lexers/`. + +#### Modules + +Editor Lua modules are contained in `modules/`. These provide advanced text +editing capabilities and can be available for all programming languages or +targeted at specific ones. + +#### Themes + +Built-in themes to customize the look and behavior of Textadept are located in +`themes/`. + +#### User + +User Lua modules are contained in the `~/.textadept/` folder. This folder may +contain `lexers/`, `modules/`, and `themes/` subdirectories. + +#### GTK + +The `etc/`, `lib/`, and `share/` directories are used by GTK and only appear in +the Win32 and Mac OSX packages. diff --git a/doc/manual/12_Compiling.md b/doc/manual/12_Compiling.md new file mode 100644 index 00000000..2f6e19ea --- /dev/null +++ b/doc/manual/12_Compiling.md @@ -0,0 +1,81 @@ +# Compiling + +## Requirements + +Unfortunately, the requirements for building Textadept are not as minimal as +running it. + +#### Linux and BSD + +Linux systems need the GTK+ development libraries. Your package manager should +allow you to install them. For Debian-based distributions, the package is +typically called `libgtk2.0-dev`. Otherwise, compile and install it from the +[GTK+ website](http://www.gtk.org/download-linux.html). Additionally you will +need the [GNU C compiler](http://gcc.gnu.org) (`gcc`) and +[GNU Make](http://www.gnu.org/software/make/) (`make`). Both should be available +for your Linux distribution through its package manager. + +#### Windows + +Compiling Textadept on Windows is no longer supported. If you wish to do so +however, you need a C compiler that supports the C99 standard (Microsoft's does +not) and the [GTK+ for Windows bundle](http://www.gtk.org/download-windows.html) +(2.16 is recommended). + +The preferred way to compile for Windows is cross-compiling from Linux. To do +so, in addition to the GTK bundle mentioned above, you need +[MinGW](http://mingw.org) with the Windows header files. They should be +available from your package manager. + +#### Mac OSX + +[XCode](http://developer.apple.com/TOOLS/xcode/) is needed for Mac OSX as well +as [jhbuild](http://sourceforge.net/apps/trac/gtk-osx/wiki/Build). After +building `meta-gtk-osx-bootstrap` and `meta-gtk-osx-core`, you need to build +`meta-gtk-osx-themes`. Note that the entire compiling process can easily take +30 minutes or more and ultimately consume nearly 1GB of disk space. + +## Download + +Download the `textadept_x.x.src.zip`, regardless of what platform you are on. + +## Compiling + +#### Linux and BSD + +For Linux systems, simply run `make` in the `src/` directory. The `textadept` +executable is created in the root directory. Make a symlink from it to +`/usr/bin/` or elsewhere in your `PATH`. + +BSD users please run `make BSD=1`. + +#### Cross Compiling for Windows from Linux + +When cross-compiling from within Linux, first unzip the GTK+ for Windows bundle +into a new `src/win32gtk` directory. Then modify the `CC`, `CPP`, and `WINDRES` +variables in the `WIN32` block of `src/Makefile` to match your MinGW +installation and run `make WIN32=1` to build `../textadept.exe`. + +#### Mac OSX + +After using `jhbuild`, GTK is in `~/gtk` so make a symlink from `~/gtk/inst` to +`src/gtkosx` in Textadept. Then run `make OSX=1` to build `../textadept.osx`. At +this point it is recommended to build a new `textadept.app` from an existing +one. Download the most recent app and replace `Contents/MacOS/textadept.osx`, +all `.dylib` files in `Contents/Resources/lib`, and all `.so` files in +`Contents/Resources/lib/gtk-2.0//{engines,immodules,loaders}` with your +own versions in `src/gtkosx/lib`. If you wish, you may also replace the files +in `Contents/Resources/{etc,share}`, but these rarely change. + +##### Problems + +If the build fails because of a + + `redefinition of 'struct Sci_TextRange'` + +error, open `src/scintilla/include/Scintilla.h` and comment out the following +lines (put `//` at the start of the line): + + #define CharacterRange Sci_CharacterRange + #define TextRange Sci_TextRange + #define TextToFind Sci_TextToFind diff --git a/doc/manual/13_Help.md b/doc/manual/13_Help.md new file mode 100644 index 00000000..f80b6e47 --- /dev/null +++ b/doc/manual/13_Help.md @@ -0,0 +1,15 @@ +# Help + +## Command Line Parameters + +Passing `-h` or `--help` to Textadept shows a list of available command line +parameters. + +## Online Help + +Textadept has a [mailing list](http://groups.google.com/group/textadept) and a +[wiki](http://caladbolg.net/textadeptwiki). You can also join us on IRC via +[freenode.net](http://freenode.net) in `#textadept`. + +














+













diff --git a/doc/manual/14_Appendix.md b/doc/manual/14_Appendix.md new file mode 100644 index 00000000..67a5feb7 --- /dev/null +++ b/doc/manual/14_Appendix.md @@ -0,0 +1,236 @@ +# Appendix + +## Key Bindings + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Linux / Win32Mac OSXCommand
File
Ctrl+NApple+NNew file
Ctrl+OApple+OOpen file
Alt+OCtrl+OOpen recent file
NoneNoneReload file
Ctrl+SApple+SSave file
Ctrl+Shift+SApple+Shift+SSave file as
Ctrl+WApple+WClose file
Ctrl+Shift+WApple+Shift+WClose all
NoneNoneLoad Session
NoneNoneSave Session
Alt+QApple+QQuit textadept
Edit
Ctrl+ZApple+ZUndo
Ctrl+YApple+Shift+ZRedo
Ctrl+X
Shift+Del
Apple+X
Shift+Del
Cut
Ctrl+C
Ctrl+Shift+Insert
Apple+C
Ctrl+Shift+Insert
Copy
Ctrl+V
Shift+Insert
Apple+V
Shift+Insert
Paste
Ctrl+AApple+ASelect All
Ctrl+ECtrl+MGo to matching brace
Ctrl+Shift+EApple+Shift+ESelect to matching brace
Ctrl+ReturnEscapeAutocomplete word in file
Ctrl+QCtrl+QBlock comment/uncomment
NoneNoneDelete word
Ctrl+HCtrl+Apple+THighlight word occurances
NoneCtrl+TTranspose characters
NoneNoneConvert indentation
NoneCtrl+KCut to end of line
NoneCtrl+YPaste text cut
Alt+C, TCtrl+C, TEnclose word or selection in XML tag
Alt+C, Shift+TCtrl+C, Shift+TEnclose word or selection in single XML tag
Alt+C, "Ctrl+C, "Enclose word or selection in double quotes
Alt+C, 'Ctrl+C, 'Enclose word or selection in single quotes
Alt+C, (Ctrl+C, (Enclose word or selection in parenthesis
Alt+C, [Ctrl+C, [Enclose word or selection in brackets
Alt+C, {Ctrl+C, {Enclose word or selection in braces
Alt+C, C, <char>Ctrl+C, C, <char>Enclose word or selection in character
Alt+S, TCtrl+S, TSelect between XML tags
Alt+S, "Ctrl+S, "Select between double quotes
Alt+S, 'Ctrl+S, 'Select between single quotes
Alt+S, (Ctrl+S, (Select between parenthesis
Alt+S, [Ctrl+S, [Select between brackets
Alt+S, {Ctrl+S, {Select between braces
Alt+S, WCtrl+S, WSelect word
Alt+S, LCtrl+S, LSelect line
Alt+S, PCtrl+S, PSelect paragraph
Alt+S, SCtrl+S, SSelect scope (style)
Alt+S, GCtrl+S, GGrow selection by a character on each end
Alt+S, C, <char>Ctrl+S, C, <char>Select between characters
InsertInsertToggle overtype
Search
Ctrl+FApple+FFind
F3Apple+GFind next
NoneApple+Shift+GFind prev
NoneApple+RReplace
Ctrl+Shift+FApple+IFind incremental
NoneApple+Shift+FFind in files
NoneCtrl+Apple+GGoto next file in list
NoneCtrl+Apple+Shift+GGoto prev file in list
Ctrl+GCtrl+GGoto line
Tools
F2F2Focus Lua command entry
Ctrl+RCtrl+RRun file
Ctrl+Shift+RCtrl+Shift+RCompile file
TabTabExpand snippet or next placeholder or indent text
Shift+TabShift+TabPrevious snippet placeholder or dedent text
Ctrl+Alt+ICtrl+Apple+ICancel current snippet
Ctrl+Alt+Shift+ICtrl+Apple+Shift+IList snippets available
Alt+ICtrl+IShow style
Buffers
Ctrl+BApple+BSwitch buffers
Ctrl+TabCtrl+TabNext buffer
Ctrl+Shift+TabCtrl+Shift+TabPrev buffer
Ctrl+T, V, EApple+T, V, EToggle show end of line
Ctrl+T, V, WApple+T, V, WToggle show whitespace
Ctrl+T, V, IApple+T, V, IToggle show indentation guides
Ctrl+T, V, TabApple+T, V, TabToggle use tabs or spaces
Ctrl+T, V, SpaceApple+T, V, SpaceToggle show whitespace
Ctrl+T, V, VApple+T, V, VToggle use virtual space
Ctrl+LCtrl+LSelect lexer
F5F5Refresh syntax highlighting
Split Views
Ctrl+Alt+V, NCtrl+V, NNext view
Ctrl+Alt+V, PCtrl+V, PPrev view
Ctrl+Alt+V, SCtrl+V, SSplit view horizontal
Ctrl+Alt+V, Shift+SCtrl+V, Shift+SSplit view vertica
Ctrl+Alt+V, WCtrl+V, WUnsplit view
Ctrl+Alt+V, Shift+WCtrl+V, Shift+WUnsplit all views
NoneNoneGrow split view
NoneNoneShrink split view
Ctrl+PlusCtrl+PlusZoom in
Ctrl+MinusCtrl+MinusZoom out
Ctrl+0Ctrl+0Zoom normal
Movement
RightRight
Ctrl+F
Next character
Shift+RightShift+Right
Ctrl+Shift+F
Select next character
Ctrl+RightCtrl+Right
Ctrl+Apple+F
Next word
Ctrl+Shift+RightCtrl+Shift+Right
Ctrl+Apple+Shift+F
Select next word
Alt+Shift+RightApple+Shift+RightRectangular select next character
LeftLeft
Ctrl+B
Prev character
Shift+LeftShift+Left
Ctrl+Shift+B
Select prev character
Ctrl+LeftCtrl+Left
Ctrl+Apple+B
Prev word
Ctrl+Shift+LeftCtrl+Shift+Left
Ctrl+Apple+Shift+B
Select prev word
Alt+Shift+LeftApple+Shift+LeftRectangular select prev character
DownDown
Ctrl+N
Next line
Shift+DownShift+Down
Ctrl+Shift+N
Select next line
Ctrl+DownCtrl+DownScroll line down
Ctrl+Shift+DownCtrl+Shift+DownRectangular select next line
UpUp
Ctrl+P
Next character
Shift+UpShift+Up
Ctrl+Shift+P
Select prev line
Ctrl+UpCtrl+UpScroll line up
Ctrl+Shift+UpCtrl+Shift+UpRectangular select prev line
HomeHome
Ctrl+A
Goto beginning of line
Shift+HomeShift+Home
Ctrl+Shift+A
Select to beginning of line
Ctrl+HomeCtrl+HomeGoto document start
Ctrl+Shift+HomeCtrl+Shift+HomeSelect to file start
Alt+Shift+HomeApple+Shift+HomeRectangular select to beginning of line
EndEnd
Ctrl+E
Goto end of line
Shift+EndShift+End
Ctrl+Shift+E
Select to end of line
Ctrl+EndCtrl+EndGoto file end
Ctrl+Shift+EndCtrl+Shift+EndSelect to file end
Alt+Shift+EndApple+Shift+EndRectangular select to end of line
Backspace
Shift+Backspace
Backspace
Shift+Backspace
Ctrl+H
Delete previous character
Ctrl+BackspaceCtrl+Backspace
Ctrl+Apple+H
Delete previous word
Ctrl+Shift+BackspaceCtrl+Shift+BackspaceDelete to beginning of line
DelDel
Ctrl+D
Delete next character
Ctrl+DelCtrl+Del
Ctrl+Apple+D
Delete next word
Ctrl+Shift+DelCtrl+Shift+DelDelete to end of line
Page UpPage UpPage up
Shift+Page UpShift+Page UpSelect page up
Alt+Shift+Page UpApple+Shift+Page UpRectangular select page up
Page DownPage DownPage down
Shift+Page DownShift+Page DownSelect page down
Alt+Shift+Page DownApple+Shift+Page DownRectangular select page down
+ +## Lua Patterns + +The following is taken from the +[Lua 5.1 Reference Manual](http://www.lua.org/manual/5.1/manual.html#5.4.1). + +_Character Class:_ + +A character class is used to represent a set of characters. The following +combinations are allowed in describing a character class: + +* **_`x`_:** (where _x_ is not one of the magic characters `^$()%.[]*+-?`) + represents the character _x_ itself. +* **`.`:** (a dot) represents all characters. +* **`%a`:** represents all letters. +* **`%c`:** represents all control characters. +* **`%d`:** represents all digits. +* **`%l`:** represents all lowercase letters. +* **`%p`:** represents all punctuation characters. +* **`%s`:** represents all space characters. +* **`%u`:** represents all uppercase letters. +* **`%w`:** represents all alphanumeric characters. +* **`%x`:** represents all hexadecimal digits. +* **`%z`:** represents the character with representation 0. +* **`%`_`x`_:** (where _x_ is any non-alphanumeric character) represents the + character _x_. This is the standard way to escape the magic characters. Any + punctuation character (even the non magic) can be preceded by a '`%`' when + used to represent itself in a pattern. +* **`[set]`:** represents the class which is the union of all characters in set. + A range of characters can be specified by separating the end characters of the + range with a '`-`'. All classes `%`_x_ described above can also be used as + components in set. All other characters in set represent themselves. For + example, `[%w_]` (or `[_%w]`) represents all alphanumeric characters plus the + underscore, `[0-7]` represents the octal digits, and `[0-7%l%-]` represents + the octal digits plus the lowercase letters plus the '`-`' character. +

+ The interaction between ranges and classes is not defined. Therefore, patterns + like `[%a-z]` or `[a-%%]` have no meaning. +* **`[^set]`:** represents the complement of _set_, where _set_ is interpreted + as above. + +For all classes represented by single letters (`%a`, `%c`, etc.), the +corresponding uppercase letter represents the complement of the class. For +instance, `%S` represents all non-space characters. + +The definitions of letter, space, and other character groups depend on the +current locale. In particular, the class `[a-z]` may not be equivalent to `%l`. + +_Pattern Item:_ + +A _pattern item_ can be + +* a single character class, which matches any single character in the class; +* a single character class followed by '`*`', which matches 0 or more + repetitions of characters in the class. These repetition items will always + match the longest possible sequence; +* a single character class followed by '`+`', which matches 1 or more + repetitions of characters in the class. These repetition items will always + match the longest possible sequence; +* a single character class followed by '`-`', which also matches 0 or more + repetitions of characters in the class. Unlike '`*`', these repetition items + will always match the _shortest_ possible sequence; +* a single character class followed by '`?`', which matches 0 or 1 occurrence of + a character in the class; +* `%n`, for _n_ between 1 and 9; such item matches a substring equal to the + _n_-th captured string (see below); +* `%bxy`, where _x_ and _y_ are two distinct characters; such item matches + strings that start with _x_, end with _y_, and where the _x_ and _y_ are + balanced. This means that, if one reads the string from left to right, + counting +_1_ for an _x_ and -_1_ for a _y_, the ending _y_ is the first _y_ + where the count reaches 0. For instance, the item `%b()` matches expressions + with balanced parentheses. + +_Pattern:_ + +A _pattern_ is a sequence of pattern items. A '`^`' at the beginning of a +pattern anchors the match at the beginning of the subject string. A '`$`' at the +end of a pattern anchors the match at the end of the subject string. At other +positions, '`^`' and '`$`' have no special meaning and represent themselves. + +_Captures:_ + +A pattern can contain sub-patterns enclosed in parentheses; they describe +_captures_. When a match succeeds, the substrings of the subject string that +match captures are stored (_captured_) for future use. Captures are numbered +according to their left parentheses. For instance, in the pattern +`"(a*(.)%w(%s*))"`, the part of the string matching `"a*(.)%w(%s*)"` is stored +as the first capture (and therefore has number 1); the character matching "`.`" +is captured with number 2, and the part matching "`%s*`" has number 3. + +As a special case, the empty capture `()` captures the current string position +(a number). For instance, if we apply the pattern `"()aa()"` on the string +`"flaaap"`, there will be two captures: 3 and 5. + +A pattern cannot contain embedded zeros. Use `%z` instead. diff --git a/doc/manual/1_Introduction.md b/doc/manual/1_Introduction.md index b1ee0826..2190c1ee 100644 --- a/doc/manual/1_Introduction.md +++ b/doc/manual/1_Introduction.md @@ -2,18 +2,23 @@ ## Overview -Textadept is a text editor for programmers. +
+ Textadept +
+ +Textadept is a cross-platform text editor for programmers. In a world where code bloat is commonplace and application speed is second to its number of features, Textadept breaks that trend, aiming to stay minimalist and fast, but at the same time being ridiculously extensible. At its core lies -less than 2000 lines of C code, and that's how it always will be. While other +less than 2000 lines of C code, and that is how it always will be. While other editors rely on numerous plugins for a wide range of functionality, recordable macros to speed up workflow, and shell scripts to quickly transform text, Textadept takes it to the extreme: it gives you complete control over the entire -application using the embedded [Lua][Lua] language. Lua is nearly as fast as C, -and has a very small footprint. In fact, most of Textadept is written in Lua. -Its incredibly fast startup time and operation attest to Lua's worthiness. +application using the embedded [Lua](http://lua.org) language. Lua is one of the +fastest scripting languages available and has a very small footprint. In fact, +most of Textadept is written in Lua. The application's incredibly fast startup +time and operation attest to Lua's worthiness. Tired of all those features you never use in other editors? With Textadept you can disable or remove anything you dislike or do not need. Wish you had an @@ -31,54 +36,25 @@ run them in your shell. These are just some of Textadept's strengths. Textadept is not about constraining the user to a certain set of features while allowing minimal custimization and/or extensibility. Textadept is about allowing that -customization and extensibility from the get-go; the features come after that. - -[Lua]: http://lua.org - -## Help - -Textadept has a [mailing list][mailing_list] and a [wiki][wiki]. You can also -join us on IRC via [freenode.net][freenode] in `#textadept`. - -[mailing_list]: http://groups.google.com/group/textadept -[wiki]: http://caladbolg.net/textadeptwiki -[freenode]: http://freenode.net - -## Screenshots - -
-Main window.
-Main -
-
-Open Buffers.
-Buffers -
-
-Switching Buffers.
-Switch Buffers -
-
-Multiple Languages.
-Multiple Languages -
-
-Lua Commands.
-Lua Command -
-
-Linux OS.
-Linux -
-
-Windows OS.
-Win32 -
-
-Mac OSX.
-Mac OSX -
-
-Extras.
-Extras -
+customization and extensibility from the start; the features come after that. + +
+ Split Views +
+ +## Manual Notation + +* `~/` is denoted as the user's home directory. On Windows machines this is the + value of the `USERHOME` environment variable (typically `C:\Users\\` + or `C:\Documents and Settings\\`). On Linux and Mac OSX machines it + is the value of `HOME` (typically `/home//` and `/Users//` + respectively). +* Any relative directory paths, i.e. paths that do not begin with `/` or `C:\`, + are relative to the location of Textadept. +* Key combinations are not case-sensitive. `Ctrl+N` means the `N` key is pressed + with only the `Control` key being held down, not the `Shift` key. + `Ctrl+Shift+N` means the `N` key is pressed with both `Control` and `Shift` + keys being held down. The same notation is applicable to key chains: + `Ctrl+N, N` vs. `Ctrl+N, Shift+N`. In the first key chain, `Control` and `N` + are pressed followed by `N` with no modifiers. The second has `Control` and + `N` pressed followed by `Shift` and `N`. diff --git a/doc/manual/2_Installation.md b/doc/manual/2_Installation.md index 348e3a8e..8229ab9b 100644 --- a/doc/manual/2_Installation.md +++ b/doc/manual/2_Installation.md @@ -3,27 +3,23 @@ ## Requirements In its bid for minimalism, Textadept also needs very little to run. In fact, the -only thing it needs is [GTK+ 2.0][GTK2] >= 2.16 on Linux systems. GTK is already -included in Windows and Mac OSX packages. Textadept also has it's own version of -Lua. +only thing it needs is [GTK+ 2.0](http://gtk.org) >= 2.16 on Linux systems. GTK +is already included in Windows and Mac OSX packages. Textadept also has it's own +version of Lua. Note: for Win32 and Mac OSX, more than 3/4 of the download and unpackaged application sizes are due to GTK, the cross-platform GUI toolkit Textadept uses. Textadept itself is much smaller. -[GTK2]: http://gtk.org - #### Linux Most Linux systems already have GTK+ installed. If not, it is probably available through your package manager. Otherwise, compile and install it from the -[GTK+ website][GTK-Linux]. - -[GTK-Linux]: http://www.gtk.org/download-linux.html +[GTK+ website](http://www.gtk.org/download-linux.html). #### Mac OSX -Prior to 3.5, the GTK+ [Mac OSX Framework][GTK-OSX] was needed. Newer versions +Prior to 3.5, the GTK+ [Mac OSX Framework][GTK-OSX] was required. Newer versions are all-inclusive and do not require anything. [GTK-OSX]: http://code.google.com/p/textadept/downloads/detail?name=Gtk-Framework-2.14.3-2-test1.dmg @@ -32,26 +28,40 @@ Note that Textadept is designed for Intel Leopard+ Macs. #### Windows -Prior to 3.5, the [GTK+ 2.0 Runtime][GTK-Runtime] was needed. Newer versions are -all-inclusive and do not require anything. - -[GTK-Runtime]: http://sourceforge.net/projects/gtk-win/ +Prior to 3.5, the [GTK+ 2.0 Runtime](http://sourceforge.net/projects/gtk-win/) +was required. Newer versions are all-inclusive and do not require anything. ## Download -Textadept can be downloaded from the [project page][Download]. Select the -appropriate package for your platform. - -[Download]: http://textadept.googlecode.com/ +Download Textadept from the [project page](http://textadept.googlecode.com/). +Select the appropriate package for your platform. ## Installation -#### Linux and Windows +Textadept was designed to be as easy as possible to install by any user. You do +not need to have administrator privilages. + +#### Linux -For Linux and Windows machines, simply unpack the archive anywhere and you are -ready to go. +Unpack the archive anywhere. Run Textadept by running +`/path/to/textadept_VERSION/textadept` from the terminal. You can also create a +symlink to the executable in your `PATH` (e.g. `/usr/bin`) or make a GNOME, KDE, +XFCE, etc. button or menu launcher. #### Mac OSX -For Mac OSX machines, unpack the archive and move `textadept.app` to your user -or system `Applications` directory like any other application. +Unpack the archive and move `textadept.app` to your user or system +`Applications` directory like any other Mac OSX application. Run Textadept by +double-clicking `textadept.app`. + +#### Windows + +Unpack the archive anywhere. Run Textadept by double-clicking `textadept.exe`. +You can also create shortcuts to the executable in your Start Menu, Quick Launch +toolbar, Desktop, etc. + +![Linux](images/linux.png) +   +![Mac OSX](images/macosx.png) +   +![Win32](images/win32.png) diff --git a/doc/manual/3_Compiling.md b/doc/manual/3_Compiling.md deleted file mode 100644 index ed007d61..00000000 --- a/doc/manual/3_Compiling.md +++ /dev/null @@ -1,89 +0,0 @@ -# Compiling - -## Requirements - -The requirements for building Textadept are not quite so minimal. - -#### Linux & BSD - -Linux systems will need the GTK+ development libraries. Your package manager -should allow you to install them. For Debian-based distributions, the package is -typically called `libgtk2.0-dev`. Otherwise, compile and install it from the -[GTK+ website][GTK-Linux]. Additionally you will need the [GNU C compiler][GCC] -(`gcc`) and [GNU Make][Make] (`make`). Both should be available for your Linux -distribution through its package manager. - -[GTK-Linux]: http://www.gtk.org/download-linux.html -[GCC]: http://gcc.gnu.org -[Make]: http://www.gnu.org/software/make/ - -#### Windows - -Compiling Textadept on Windows is no longer supported. If you wish to do so -however, you will need a C compiler that supports the C99 standard (Microsoft's -does not) and the [GTK+ for Windows bundle][GTK-Win32] (2.16 is recommended). - -The preferred way to compile for Windows is cross-compiling from Linux. To do -so, in addition to the GTK bundle mentioned above, you will need [MinGW][MinGW] -with the Windows header files. They should be available from your package -manager. - -[GTK-Win32]: http://www.gtk.org/download-windows.html -[MinGW]: http://mingw.org - -#### Mac OSX - -[XCode][XCode] is needed for Mac OSX as well as [jhbuild][GTK-OSX]. After -building `meta-gtk-osx-bootstrap` and `meta-gtk-osx-core`, you will need to -build `meta-gtk-osx-themes`. Note that the entire compiling process can easily -take 30 minutes or more and ultimately consume nearly 1GB of disk space. - -[XCode]: http://developer.apple.com/TOOLS/xcode/ -[GTK-OSX]: http://sourceforge.net/apps/trac/gtk-osx/wiki/Build - -## Download - -Download the `textadept_x.x.src.zip`, regardless of what platform you are on. - -## Compiling - -#### Linux & BSD - -For Linux systems, simply run `make` in the `src/` directory. The `textadept` -executable will be created in the root directory. You can make a symlink from -it to `/usr/bin/` or elsewhere in your `PATH`. - -BSD users please run `make BSD=1`. - -#### Windows (Cross-Compiling from Linux) - -When cross-compiling from within Linux, first unzip the GTK+ for Windows bundle -into a new `src/win32gtk` directory. Then modify the `CC`, `CPP`, and `WINDRES` -variables in the `WIN32` block of `src/Makefile` to match your MinGW -installation and run `make WIN32=1` to build `../textadept.exe`. - -#### Mac OSX - -After using `jhbuild`, GTK is in `~/gtk` so make a symlink from `~/gtk/inst` to -`src/gtkosx` in Textadept. Then run `make OSX=1` to build `../textadept.osx`. At -this point it is recommended to build a new `textadept.app` from an existing -one. Download the most recent app and replace `Contents/MacOS/textadept.osx`, -all `.dylib` files in `Contents/Resources/lib`, and all `.so` files in -`Contents/Resources/lib/gtk-2.0/[version]/{engines,immodules,loaders}` with your -own versions in `src/gtkosx/lib`. If you wish, you may also replace the files -in `Contents/Resources/{etc,share}`, but these rarely change. - -## Problems - -#### Mac OSX - -In Mac OSX, if the build fails because of a - - `redefinition of 'struct Sci_TextRange'` - -error, you will need to open `src/scintilla/include/Scintilla.h` and comment -out the following lines (put `//` at the start of the line): - - #define CharacterRange Sci_CharacterRange - #define TextRange Sci_TextRange - #define TextToFind Sci_TextToFind diff --git a/doc/manual/3_UserInterface.md b/doc/manual/3_UserInterface.md new file mode 100644 index 00000000..8d15f505 --- /dev/null +++ b/doc/manual/3_UserInterface.md @@ -0,0 +1,41 @@ +# User Interface + +
+ UI +
+ +Textadept's user interface was designed to be simple. It consists of an optional +menubar, editor view, initially hidden find/replace dialog, initially hidden +command entry, and statusbar. Below are brief descriptions of these features. +More in-depth discussion about some of them is provided later in the manual. + +## Menubar + +The completely customizable (and optional!) menubar typically provides access to +all of Textadept's features. + +## Editor View + +The editor view is where you will spend most of your time in Textadept. It +supports unlimited split views and is completely controllable by Lua. + +## Find and Replace Dialog + +This compact dialog is a great way to slice and dice through your document or +directory of files. You can even find and replace text using Lua patterns. It is +available when you need it and quickly gets out of your way when you do not, +minimizing distractions. + +## Command Entry + +The versitile command entry functions as both a place to execute Lua commands +with the internal Lua state and find text incrementally. You can extend it to do +even more if you would like. Like the find/replace dialog, the command entry +pops in and out as you wish. + +## Statusbar + +The left side of the statusbar displays any status messages. The right side +shows the current buffer's status. + +


diff --git a/doc/manual/4_UserInterface.md b/doc/manual/4_UserInterface.md deleted file mode 100644 index 382bcb1d..00000000 --- a/doc/manual/4_UserInterface.md +++ /dev/null @@ -1,30 +0,0 @@ -# User Interface - -Textadept's user interface was designed to be simple. It consists of an optional -menubar, editor view, and initially hidden dialogs for find/replace and command -entry. Below are brief descriptions of these features. More in-depth discussion -about each of them is provided later in the manual. - -## Menubar - -The completely customizable (and optional!) menubar typically provides access to -all of Textadept's features. - -## Editor View - -The editor view is where you will spend most of your time in Textadept. It -supports unlimited split views and is completely controllable by Lua. - -## Find/Replace Dialog - -This compact dialog is a great way to slice and dice through your document or -directory of files. You can even find and replace text using Lua patterns. It is -available when you need it and quickly gets out of your way when you do not, -minimizing distractions. - -## Command Entry - -The versitile command entry functions as both a place to execute Lua commands -with the internal Lua state and find text incrementally. You can extend it to do -even more if you would like. Like the find/replace dialog, the command entry -pops in and out as you wish. diff --git a/doc/manual/4_WorkingWithFiles.md b/doc/manual/4_WorkingWithFiles.md new file mode 100644 index 00000000..fc072d9e --- /dev/null +++ b/doc/manual/4_WorkingWithFiles.md @@ -0,0 +1,65 @@ +# Working with Files + +## Lack of Tabs + +One of the first things you will notice when opening multiple files in Textadept +is that there is no tab bar showing the files that are open. This was a design +decision. Textadept was built to support unlimited split views, so having a tab +bar with all open buffers would clutter the interface greatly. There is also the +question of where to place the bar (above, below, or to one side) and how many +to have (one for each split view or a single one under the menubar). + +You can see which buffer is active by looking at Textadept's titlebar. Pressing +`Ctrl+Tab` cycles to the next buffer and `Ctrl+Shift+Tab` cycles to the previous +one. + +## Buffer Browser + +To move quickly between buffers, press `Ctrl+B` (`Apple+B` on Mac OSX) to open +the buffer browser. + +![Buffer Browser](images/bufferbrowser.png) + +The buffer browser shows you a list of currently open buffers, the most recent +towards the bottom. Typing part of any filename filters the list. You can also +just use the arrow keys. Pressing `Enter` or clicking `OK` switches to the +selected buffer. + +![Buffer Browser Filtered](images/bufferbrowserfiltered.png) + +## Split Views + +Textadept allows you to split the editor window as many times as you like either +horizontally or vertically. `Ctrl+Alt+V, Shift+S` splits vertically +(side-by-side) and `Ctrl+Alt+V, S` splits horizontally (`Ctrl+V, Shift+S` and +`Ctrl+V, S` respectively on Mac OSX). You can resize the splitter bar by +clicking and dragging with the mouse. The same file can be worked with in +multiple split views. + +Pressing `Ctrl+Alt+V, N` (`Ctrl+V, N` on Mac OSX) goes to the next view and +`Ctrl+Alt+V, P` goes to the previous one. + +To unsplit a view, enter the view to keep open and press `Ctrl+Alt+V, W` +(`Ctrl+V, W` on Mac OSX). To unsplit all views, use `Ctrl+Alt+V, Shift+W`. + +## Sessions + +By default, Textadept saves the list of open buffers on exit so it can reload +them the next time it starts up. You can disable this by passing the `-n` or +`--no-session` switch to Textadept on startup. Sessions can be manually saved +and opened via the `File -> Save Session...` and `File -> Load Session...` +menus. + +Sessions save additional information such as current split views, caret and +scroll positions in each buffer, and Textadept's window size. + +## Snapopen + +A quicker, though slightly more limited alternative to the standard +`File -> Open` dialog is snapopen. It behaves like the buffer browser, but +displays a list of files to open, including files in subdirectories. You can +snapopen the current file's directory from the `Tools -> Snapopen -> Current +Directory` menu. Snapopen is pretty limited from the menu, but more versitile +in scripts. See its [LuaDoc](../modules/_m.textadept.snapopen.html). + +![Snapopen](images/snapopen.png) diff --git a/doc/manual/5_FileNavigation.md b/doc/manual/5_FileNavigation.md new file mode 100644 index 00000000..5c153740 --- /dev/null +++ b/doc/manual/5_FileNavigation.md @@ -0,0 +1,26 @@ +# File Navigation + +## Bookmarks + +You can place bookmarks on lines in buffers to jump back to them later. Use the +`Tools -> Bookmark` menu options to do so. + +## Goto Line + +To jump to a specific line in a file, press `Ctrl+G` and specify the line number +in the prompt and press `Enter` or click `OK`. + +## Goto Matching Brace + +By default, Textadept will highlight the matching brace characters under the +caret : `(`, `)`, `[`, `]`, `{`, `}`, `<`, and `>`. Pressing `Ctrl+E` (`Ctrl+M` +in Mac OSX) moves the caret to that matching brace. + +![Matching Braces](images/matchingbrace.png) + +## Mac OSX + +Textadept supports the keybindings you are accustomed to for nagivagating text +fields in Mac OSX. + +













diff --git a/doc/manual/5_FolderStructure.md b/doc/manual/5_FolderStructure.md deleted file mode 100644 index 10fc0d90..00000000 --- a/doc/manual/5_FolderStructure.md +++ /dev/null @@ -1,39 +0,0 @@ -# Folder Structure - -Because Textadept is mostly written in Lua, these Lua files have to be stored in -an organized folder structure. - -## Core - -Textadept's core Lua modules are contained in `core/`. These are absolutely -necessary in order for Textadept to run. They are responsible for Textadept's -Lua to C interface, event structure, file input/output, and localization. - -## Lexers - -Lexer Lua modules are responsible for the syntax highlighting of source code. -They are located in `lexers/`. - -## Modules - -Editor Lua modules are contained in `modules/`. These provide advanced text -editing capabilities and can be available for all programming languages or -targeted at specific ones. - -## Themes - -Built-in themes to customize the look and behavior of Textadept are located in -`themes/`. - -## User - -User Lua modules are contained in a `.textadept` folder in your home directory. -In Linux and Mac OSX, your home directory is the location specified by the -`HOME` environment variable (typically `/home/username` and `/Users/username` -respectively). In Windows, it is the `USERPROFILE` environment variable. This -directory will be denoted as `~/.textadept` from now on in the manual. - -## GTK - -The `etc/`, `lib/`, and `share/` directories are used by GTK and only appear in -the Win32 and Mac OSX packages. diff --git a/doc/manual/6_AdeptEditing.md b/doc/manual/6_AdeptEditing.md new file mode 100644 index 00000000..5e9aef34 --- /dev/null +++ b/doc/manual/6_AdeptEditing.md @@ -0,0 +1,151 @@ +# Adept Editing + +## Key Commands + +Textadept is entirely keyboard-driven. See the comprehensive list of key +commands in the [appendix](14_Appendix.html#key_bindings). Key commands can be +modified in your [preferences](9_Preferences.html#key_commands). + +## Character Autopairing + +Usually, quote (`'`, `"`) and brace (`(`, `[`, `{`) characters go together in +pairs. By default, Textadept automatically inserts the complement character when +the first is typed. Similarly, the complement is deleted when you press +`Backspace` over the first. See the +[preferences](9_Preferences.html#module_settings) page if you would like to +disable this. + +## Word Completion + +Textadept provides buffer-based word completion. Start typing a word, press +`Ctrl+Return` (`Esc` on Mac OSX), and a list of suggested completions based on +words in the current document is provided. Continuing to type changes the +suggestion. Press `Return` to complete the selected word. + +![Word Completion](images/wordcompletion.png) + +## Find and Replace + +`Ctrl+F` (`Apple+F` on Mac OSX) brings up the Find/Replace dialog. In addition +to offering the usual find and replace, Textadept allows you to find with [Lua +patterns](14_Appendix.html#lua_patterns) and replace with Lua captures and even +Lua code! For example: replacing all `(%w+)` with `%(string.upper('%1'))` +capitalizes all words in the buffer. Lua captures (`%n`) are only available from +a Lua pattern search, but embedded Lua code enclosed in `%()` is always allowed. + +#### Find in Files + +Find in Files (`Apple+Shift+F` on Mac OSX) will prompt for a directory to +search. The results are displayed in a new buffer. Double-clicking a search +result jumps to it in the file. Replace in Files is not supported. You will have +to `Find in Files` first, and then `Replace All` for each file a result is found +in. The `Match Case`, `Whole Word`, and `Lua pattern` flags still apply. + +![Find in Files](images/findinfiles.png) + +#### Find Incremental + +You can start an incremental search by pressing `Ctrl+Shift+F` (`Apple+I` on Mac +OSX). Incremental search searches the buffer as you type. Only the `Match Case` +option is recognized. + +#### Replace in Selection + +By default, `Replace All` replaces all text in the buffer. If you want to +replace all text in just a portion of the buffer, select a block of text and +then `Replace All`. + +## Indentation + +#### Increase or Decrease Indent Level + +The amount of indentation for a selected set of lines is increased by pressing +`Tab` and decreased by pressing `Shift+Tab`. Using these key sequences when no +selection is present does not have the same effect. + +#### Change Indent Size + +The indent size is usually set by a [language-specific +module](7_Modules.html#buffer_properties) or the [theme](8_Themes.html#buffer). +Textadept shows what it is using for indentation in the document statusbar. + +![Document Statusbar](images/docstatusbar.png) + +#### Using Tabs Instead of Spaces + +You can use tabs instead of the default spaces by pressing `Ctrl+T, V, Tab` +(Apple+T, V, Tab on Mac OSX) or using the `Buffer -> Toggle Use Tabs` menu. +Textadept shows what it is using for indentation in the document statusbar. + +The default option is usually set by a [language-specific +module](7_Modules.html#buffer_properties) or the [theme](8_Themes.html#buffer). + +#### Converting Between Tabs and Spaces + +Use the `Edit -> Convert Indentation` menu to convert indentation. If the buffer +is using tabs, all spaces are converted to tabs. If the buffer is using spaces, +all tabs are converted to spaces. + +## Selecting Text + +#### Rectangular Selection + +Holding `Alt+Shift` (`Apple+Shift` on Mac OSX) and pressing the arrow keys +enables rectangular selections to be made. Start typing to type on each line. + +![Rectangular Selection](images/rectangularselection.png) +     +![Rectangular Edit](images/rectangularselection2.png) + +#### Multiple Selection + +Clicking the mouse at a point in the buffer while holding `Control` places an +additional caret at that point. Clicking and dragging while holding `Control` +creates multiple selections. Start typing to enter text at each selection. + +#### Selecting Entities + +Textadept allows you to select many different entities from the caret. `Alt+S` +(`Ctrl+S` on Mac OSX) is the key prefix to entity selection. Typing `'`, `"`, +`(`, `[`, or `{` selects all text between the matching delimiters. Typing `W`, +`L`, `P`, `B`, or `S` (without holding `Shift`) selects the current word, line, +paragraph, indented block, or style respectively. Typing `T` selects the text +between `>` and `<`, useful for selecting within HTML tags. Typing `G` grows the +current selection by one character to each side, so `Alt+S, "` followed by +`Alt+S, G` selects an entire `""` sequence instead of just the text in-between +quotes. Finally, typing `C` followed by any other character selects all text +between a pair of those characters. `Alt+S, C, "` is identical to `Alt+S, "`. + +## Enclosing Text + +As a complement to selecting entities, you can enclose text as entities. The +key prefix is `Alt+C` (`Ctrl+C` on Mac OSX). Typing `'`, `"`, `(`, `[`, or `{` +encloses the text in the appropriate character pair. Typing `T` (without holding +`Shift`) creates an opening and closing HTML tag while `Shift+T` creates a +single HTML tag. Finally, typing `C` followed by any other character encloses +the text between a pair of those characters. `Alt+C, C, "` is identical to +`Alt+C, "`. + +If no text is selected, the word to the left of the caret is enclosed. + +## Word Highlight + +All occurances of a given word are highlighted by putting the caret over the +word and pressing `Ctrl+H` (`Ctrl+Apple+T` on Mac OSX). This is useful to show +occurances of a variable name in source code. + +![Word Highlight](images/wordhighlight.png) + +## Editing Modes + +#### Virtual Space + +Virtual space (freehand) mode is enabled and disabled with `Ctrl+T, V, V` +(`Apple+T, V, V` in Mac OSX). When enabled, caret movement is not restricted by +line endings. + +#### Overwrite + +Overwrite mode is enabled and disabled with the `Insert` key. When enabled, +characters in the buffer will be overwritten instead of inserted as you type. +The caret also changes to an underline when in overwrite mode. diff --git a/doc/manual/6_Startup.md b/doc/manual/6_Startup.md deleted file mode 100644 index aff0ac1d..00000000 --- a/doc/manual/6_Startup.md +++ /dev/null @@ -1,60 +0,0 @@ -# Startup Process - -Textadept starts up ridiculously fast. On most computers it starts up around as -fast as you can blink. - -## Core (`core/init.lua`) - -The key to Textadept's lightning fast start time is that it loads only its core -modules before showing the window. - -#### Themes - -Textadept loads its theme during the Core startup process. Each theme is its -own folder with three files: `buffer.lua`, `lexer.lua`, and `view.lua`. The -buffer theme sets default buffer properties like tabs and indentation. The view -theme sets default view properties like caret color and current line background -color. Lexer themes set the color and style definitions used by most lexers. By -default the `'light'` theme is used. A `'scite'` theme is provided for users -accustomed to SciTE. - -To use a different theme, create a `~/.textadept/theme` file containing the -name of the theme you would like. If you have a custom theme, place it in your -`~/.textadept/themes/` directory. Any errors are printed to standard out. - -## Post-Core (`init.lua`) - -After loading the core modules, Textadept begins loading additional modules. -It first checks for your `~/.textadept/init.lua`. If the file does not exist, -all default modules listed in `init.lua` are loaded. - -Your `~/.textadept/init.lua` is a great place to specify what modules you want -to use. They can be Textadept's default ones, or ones that you create. As an -example: - - -- In ~/.textadept/init.lua - - -- Do not load all of textadept's modules. - --require 'textadept' - - -- Instead, load a subset of them from 'modules/textadept/init.lua'. - --require 'textadept.bookmarks' - --require 'textadept.command_entry' - require 'textadept.editing' - require 'textadept.find' - require 'textadept.mime_types' - --require 'textadept.run' - require 'textadept.session' - require 'textadept.snippets' - - -- These need to be loaded last. - --require 'textadept.menu' - require 'textadept.keys' - -Please note Textadept does NOT load your `~/.textadept/init.lua`'s modules in -addition to its own. This defeats the purpose of maximum extensibility. If your -`init.lua` exists, Textadept assumes that file tells it exactly what to load. -If you have an empty `init.lua`, no modules are loaded. - -After loading the additional modules, Textadept parses command line arguments, -or if none are specified, reloads the last saved session. diff --git a/doc/manual/7_LuaInterface.md b/doc/manual/7_LuaInterface.md deleted file mode 100644 index 2b8c7693..00000000 --- a/doc/manual/7_LuaInterface.md +++ /dev/null @@ -1,10 +0,0 @@ -# Lua Interface - -After startup, Textadept relinquishes control to Lua. At this point, having a -Manual is pointless since all of Textadept's functionality is dynamic from here -on out. This is where the most important resource for help comes in: the -[LuaDoc][LuaDoc]. It contains not only documentation for Textadept's Lua API, -but documentation for all of its modules and features as well. It is more up to -date than a manual like this could ever be. - -[LuaDoc]: ../index.html diff --git a/doc/manual/7_Modules.md b/doc/manual/7_Modules.md new file mode 100644 index 00000000..88baf72d --- /dev/null +++ b/doc/manual/7_Modules.md @@ -0,0 +1,93 @@ +# Modules + +Most of Textadept's functionality comes from modules written in Lua. A module +consists of a single directory with an `init.lua` script to load any additional +Lua files (typically in the same location). Essentially there are two classes of +module: generic and language-specific. + +## Generic + +This class of modules is usually available globally for programming in all +languages or writing plain-text. An example is the +[textadept](../modules/_m.textadept.html) module which implements most of +Textadept's functionality (find/replace, key commands, menus, snippets, etc.). +These kinds of modules are generally loaded on startup. See the +[preferences](9_Preferences.html#user_init) page for instructions on how to load +generic modules when Textadept starts. + +## Language Specific + +Each module of this class of modules is named after a language lexer in the +`lexers/` directory and is only available only for editing code in that +particular programming language unless you specify otherwise. Examples are the +[cpp](../modules/_m.cpp.html) and [lua](../modules/_m.lua.html) modules which +provide special editing features for the C/C++ and Lua languages respectively. + +#### Lexer + +All languages have a [lexer](../modules/lexer.html) that performs syntax +highlighting on the source code. While the lexer itself is not part of the +module, its existence in `lexers/` is required. + +#### Activation + +Language-specific modules are automatically loaded when a file of that language +is loaded or a buffer's lexer is set to that language. + +#### Snippets + +Most language-specific modules have a set of +[snippets](../modules/_m.textadept.snippets.html). Press `Ctrl+Alt+Shift+I` +(`Ctrl+Apple+Shift+I` on Mac OSX) for a list of available snippets or see the +module's Lua code. To insert a snippet, type its trigger followed by the `Tab` +key. Subsequent presses of `Tab` causes the caret to enter tab stops in +sequential order, `Shift+Tab` goes back to the previous tab stop, and +`Ctrl+Alt+I` (`Ctrl+Apple+I` on Mac OSX) cancels the current snippet. Snippets +can be nested (inserted from within another snippet). + +![Snippet](images/snippet.png) +     +![Snippet Expanded](images/snippet2.png) + +#### Commands + +Most language-specific modules have a set of [key +commands](../modules/_m.textadept.keys.html). See the module's Lua code for +which key commands are available. + +##### Run + +Most language-specific modules have a command that runs the code in the current +file. Pressing `Ctrl+R` runs that command. + +##### Compile + +Most language-specific modules have a command that compiles the code in the +current file. Pressing `Ctrl+Shift+R` runs that command. + +##### Block Comments + +Pressing `Ctrl+Q` comments or uncomments the code on the selected lines. + +#### Buffer Properties + +Sometimes language-specific modules set default buffer properties like tabs and +indentation size. See the module's Lua code for these settings and change them +if you prefer something else. + +## Getting Modules + +For now, user-created modules are obtained from the +[wiki](http://caladbolg.net/textadeptwiki). + +## Installing Modules + +It is recommended to put all modules in your `~/.textadept/modules/` directory +so they will not be overwritten when you update Textadept. 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. + +## Developing Modules + +See the [LuaDoc](../modules/_m.html) for modules. diff --git a/doc/manual/8_Themes.md b/doc/manual/8_Themes.md new file mode 100644 index 00000000..c022bf7f --- /dev/null +++ b/doc/manual/8_Themes.md @@ -0,0 +1,62 @@ +# Themes + +Textadept's look and feel can be customized with themes. The themes that come +with Textadept are `'light'`, `'dark'`, and `'scite'`. By default the `'light'` +theme is used. The `'scite'` theme is recommended for users accustomed to SciTE. +To change the theme, create a `~/.textadept/theme` file whose first line of text +is the name of the theme you would like to use. + +![Light Theme](images/lighttheme.png) +     +![Dark Theme](images/darktheme.png) +     +![SciTE Theme](images/scitetheme.png) + +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). + +## Creating or Modifying a Theme + +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 +your `~/.textadept/themes/` directory so they will not be overwritten when you +update Textadept. Themes in that directory override any themes in Textadept's +`themes/` directory. This means that if you have your own `light` theme, it will +be loaded instead of the one that comes with Textadept. + +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 + +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. + +#### Buffer + +`buffer.lua` contains buffer-specific properties like indentation size and +whether or not to use tabs. See the [LuaDoc](../modules/buffer.html) for +documentation on the properties. + +#### View + +`view.lua` contains view-specific properties like caret and selection colors. +See the [LuaDoc](../modules/buffer.html) for documentation on the properties. + +## Theming Text Fields + +There is no way to theme text fields like the Find and Replace ones from within +Textadept. Instead, use [GTK Resource files][gtkrc]. The names of the text field +widgets are: + +* Find field: `textadept-find-entry`. +* Replace field: `textadept-replace-entry`. +* Command entry: `textadept-command-entry`. + +[gtkrc]: http://library.gnome.org/devel/gtk/stable/gtk-Resource-Files.html diff --git a/doc/manual/9_Preferences.md b/doc/manual/9_Preferences.md new file mode 100644 index 00000000..89abc852 --- /dev/null +++ b/doc/manual/9_Preferences.md @@ -0,0 +1,140 @@ +# Preferences + +At this point it is assumed you are at least familiar with the basics of +[Lua](http://www.lua.org). You do not have to know a lot of the language to +configure Textadept. + +## User Init + +Textadept loads modules from your `~/.textadept/init.lua` on startup. If this +file does not exist, Textadept creates it with a list of default modules to +load. You can then use the file to indicate what else you want Textadept to +load. For example if you created a generic module called `foo` that you wanted +to load alongside the default modules, your `~/.textadept/init.lua` would +contain + + require 'textadept' + require 'foo' + +If instead you wanted to load all Textadept's default modules except for the +menu, replace + + require 'textadept' + +with + + require 'textadept.bookmarks' + require 'textadept.command_entry' + require 'textadept.editing' + require 'textadept.find' + require 'textadept.mime_types' + require 'textadept.run' + require 'textadept.session' + require 'textadept.snapopen' + require 'textadept.snippets' + + --require 'textadept.menu' + require 'textadept.keys' + +Note that his list was obtained from the `textadept` module's `init.lua` which +is located in the `modules/textadept/` directory. + +It is important to realize that Textadept will not load anything you do not tell +it to. If your `~/.textadept/init.lua` exists and is empty, no modules are +loaded (pretty much rendering Textadept useless). + +#### Module Settings + +Many of Textadept's modules have settings you can change from your +`~/.textadept/init.lua`. These settings are viewed from module's +[LuaDoc](../index.html). For example, to disable character autopairing and +whitespace stripping on save, your `~/.textadept/init.lua` might look like: + + require 'textadept' + + _m.textadept.editing.AUTOPAIR = false + _m.textadept.editing.SAVE_STRIPS_WS = false + +#### Other + +Your `~/.textadept/init.lua` is not restricted to just loading modules or +setting preferences. It is just Lua code that is run when Textadept loads. For +more information, see the [scripting](11_Scripting.html) page. + +##### Snippets + +You can add global snippets to `_G.snippets` such as: + + _G.snippets['file'] = '%(buffer.filename)' + _G.snippets['path'] = "%((buffer.filename or ''):match('^.+[/\\]'))" + +So typing `file` or `path` and then pressing `Tab` will insert the snippet. + +##### Key Commands + +It is not recommended to edit Textadept's `modules/textadept/keys.lua` for +changing the key bindings since your changes could be overwritten when updating +Textadept. Instead, modify `_G.keys` from within your `~/.textadept/init.lua` or +from a file loaded by `~/.textadept/init.lua`. For example maybe you want +`Alt+N` to create a new buffer instead of `Ctrl+N`: + + _G.keys.an = { new_buffer } + _G.keys.cn = nil + +## Locale + +Most messages displayed by Textadept are localized. `core/locale.conf` contains +these messages. By default, Textadept is localized in English. To use a +different language, put a translated version of `core/locale.conf` in your +`~/.textadept/` folder. + +Feel free to translate Textadept and send your modified `locale.conf` files +to me. I will make them available to other users. + +## Mime Types + +Textadept recognizes a wide range of programming language files by any of the +following: + +* File extension. +* Keywords in the file's shebang (`#!/path/to/exe`) line. +* A pattern that matches the text of the file's first line. + +Built-in mime-types are located in `modules/textadept/mime_types.conf`. You +can override or add to them in your `~/.textadept/mime_types.conf`: + + % Recognize .luadoc files as Lua code. + luadoc lua + + % Change .html files to be recognized as XML files instead of HTML ones. + html xml + +It is not recommended to edit Textadept's `modules/textadept/mime_types.conf` +because your changes may be overwritten when updating Textadept. + +#### Detection by File Extension + + file_ext lexer + +Note: `file_ext` should not start with a `.` (period). + +#### Detection by Shebang Keywords + + #shebang_word lexer + +Examples of `shebang_word`'s are `lua`, `ruby`, `python`. + +#### Detection by Pattern + + /pattern lexer + +Only the last space, the one separating the pattern from the lexer, is +significant. No spaces in the pattern need to be escaped. + +## Default Run and Compile Commands and Block Quotes for Languages + +Textadept does not come with language-specific modules for all languages so you +can add run commands, compile commands, and block quotes manually: + +* [Run/Compile commands](http://caladbolg.net/textadeptwiki/index.php?n=Main.RunSupplemental) +* [Block Quotes](http://caladbolg.net/textadeptwiki/index.php?n=Main.CommentSupplemental) diff --git a/doc/manual/images/bufferbrowser.png b/doc/manual/images/bufferbrowser.png new file mode 100644 index 00000000..de7defe1 Binary files /dev/null and b/doc/manual/images/bufferbrowser.png differ diff --git a/doc/manual/images/bufferbrowserfiltered.png b/doc/manual/images/bufferbrowserfiltered.png new file mode 100644 index 00000000..c4c01486 Binary files /dev/null and b/doc/manual/images/bufferbrowserfiltered.png differ diff --git a/doc/manual/images/commandentry.png b/doc/manual/images/commandentry.png new file mode 100644 index 00000000..cbcd66a7 Binary files /dev/null and b/doc/manual/images/commandentry.png differ diff --git a/doc/manual/images/commandentrycompletion.png b/doc/manual/images/commandentrycompletion.png new file mode 100644 index 00000000..a4b83059 Binary files /dev/null and b/doc/manual/images/commandentrycompletion.png differ diff --git a/doc/manual/images/darktheme.png b/doc/manual/images/darktheme.png new file mode 100644 index 00000000..0c683dc7 Binary files /dev/null and b/doc/manual/images/darktheme.png differ diff --git a/doc/manual/images/docstatusbar.png b/doc/manual/images/docstatusbar.png new file mode 100644 index 00000000..5e709ab2 Binary files /dev/null and b/doc/manual/images/docstatusbar.png differ diff --git a/doc/manual/images/findinfiles.png b/doc/manual/images/findinfiles.png new file mode 100644 index 00000000..2f8783aa Binary files /dev/null and b/doc/manual/images/findinfiles.png differ diff --git a/doc/manual/images/icon.png b/doc/manual/images/icon.png new file mode 100644 index 00000000..bd796ec8 Binary files /dev/null and b/doc/manual/images/icon.png differ diff --git a/doc/manual/images/lighttheme.png b/doc/manual/images/lighttheme.png new file mode 100644 index 00000000..e5100912 Binary files /dev/null and b/doc/manual/images/lighttheme.png differ diff --git a/doc/manual/images/linux.png b/doc/manual/images/linux.png new file mode 100644 index 00000000..a8640022 Binary files /dev/null and b/doc/manual/images/linux.png differ diff --git a/doc/manual/images/macosx.png b/doc/manual/images/macosx.png new file mode 100644 index 00000000..2035a95b Binary files /dev/null and b/doc/manual/images/macosx.png differ diff --git a/doc/manual/images/matchingbrace.png b/doc/manual/images/matchingbrace.png new file mode 100644 index 00000000..22a99c19 Binary files /dev/null and b/doc/manual/images/matchingbrace.png differ diff --git a/doc/manual/images/rectangularselection.png b/doc/manual/images/rectangularselection.png new file mode 100644 index 00000000..3fe77a6a Binary files /dev/null and b/doc/manual/images/rectangularselection.png differ diff --git a/doc/manual/images/rectangularselection2.png b/doc/manual/images/rectangularselection2.png new file mode 100644 index 00000000..a4a84f61 Binary files /dev/null and b/doc/manual/images/rectangularselection2.png differ diff --git a/doc/manual/images/scitetheme.png b/doc/manual/images/scitetheme.png new file mode 100644 index 00000000..6161006b Binary files /dev/null and b/doc/manual/images/scitetheme.png differ diff --git a/doc/manual/images/snapopen.png b/doc/manual/images/snapopen.png new file mode 100644 index 00000000..8ae1bb74 Binary files /dev/null and b/doc/manual/images/snapopen.png differ diff --git a/doc/manual/images/snippet.png b/doc/manual/images/snippet.png new file mode 100644 index 00000000..d73c621a Binary files /dev/null and b/doc/manual/images/snippet.png differ diff --git a/doc/manual/images/snippet2.png b/doc/manual/images/snippet2.png new file mode 100644 index 00000000..cbafb98c Binary files /dev/null and b/doc/manual/images/snippet2.png differ diff --git a/doc/manual/images/splitviews.png b/doc/manual/images/splitviews.png new file mode 100644 index 00000000..bdb516ec Binary files /dev/null and b/doc/manual/images/splitviews.png differ diff --git a/doc/manual/images/textadept.png b/doc/manual/images/textadept.png new file mode 100644 index 00000000..8731e5cc Binary files /dev/null and b/doc/manual/images/textadept.png differ diff --git a/doc/manual/images/ui.png b/doc/manual/images/ui.png new file mode 100644 index 00000000..e9c97f4c Binary files /dev/null and b/doc/manual/images/ui.png differ diff --git a/doc/manual/images/win32.png b/doc/manual/images/win32.png new file mode 100644 index 00000000..996c2b5f Binary files /dev/null and b/doc/manual/images/win32.png differ diff --git a/doc/manual/images/wordcompletion.png b/doc/manual/images/wordcompletion.png new file mode 100644 index 00000000..e55280a9 Binary files /dev/null and b/doc/manual/images/wordcompletion.png differ diff --git a/doc/manual/images/wordhighlight.png b/doc/manual/images/wordhighlight.png new file mode 100644 index 00000000..61c8832b Binary files /dev/null and b/doc/manual/images/wordhighlight.png differ diff --git a/doc/sidebar.md b/doc/sidebar.md index bd61ea1a..d80271ad 100644 --- a/doc/sidebar.md +++ b/doc/sidebar.md @@ -1,33 +1,36 @@ -![Textadept](http://caladbolg.net/images/textadept/icon.png) +![Textadept](images/icon.png) # Manual * [Introduction](1_Introduction.html) * [Installation](2_Installation.html) -* [Compiling](3_Compiling.html) -* [User Interface](4_UserInterface.html) -* [Folder Structure](5_FolderStructure.html) -* [Startup](6_Startup.html) -* [Lua Interface](7_LuaInterface.html) +* [User Interface](3_UserInterface.html) +* [Working with Files](4_WorkingWithFiles.html) +* [File Navigation](5_FileNavigation.html) +* [Adept Editing](6_AdeptEditing.html) +* [Modules](7_Modules.html) +* [Themes](8_Themes.html) +* [Preferences](9_Preferences.html) +* [Advanced](10_Advanced.html) +* [Scripting](11_Scripting.html) +* [Compiling](12_Compiling.html) +* [Help](13_Help.html) +* [Appendix](14_Appendix.html) # Links * [Caladbolg.net](http://caladbolg.net) * [LuaDoc](../index.html) -* [Download](http://code.google.com/p/textadept/downloads/list) +* [Download](http://code.google.com/p/textadept/downloads/list) | + [Hg](http://code.google.com/p/textadept/source/browse) * [Mailing List](http://groups.google.com/group/textadept) -* [Mercurial Repository](http://code.google.com/p/textadept/source/browse) * [Wiki](http://caladbolg.net/textadeptwiki) * [Bug Tracker](http://code.google.com/p/textadept/issues/list) * [Ohloh](http://ohloh.net/projects/textadept) -# Donate - -
+
- -Do you like Textadept? Please consider a $5 or more donation. diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua index df088b44..1b79e9ae 100644 --- a/modules/textadept/keys.lua +++ b/modules/textadept/keys.lua @@ -106,15 +106,6 @@ module('_m.textadept.keys', package.seeall) -- Therefore, any module containing key commands should be loaded after all -- other modules, whose functions are being referenced, have been loaded. -- --- ## Configuration --- --- It is not recommended to edit Textadept's `modules/textadept/keys.lua`. --- Instead you can modify `_G.keys` from within your `~/.textadept/init.lua` or --- from a file `require`d by your `init.lua`. - --- Windows and Linux key commands are listed in the first block. --- Mac OSX key commands are listed in the second block. --- -- ## Events -- -- The following is a list of all key events generated in diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua index f94aad56..85835cfe 100644 --- a/modules/textadept/menu.lua +++ b/modules/textadept/menu.lua @@ -11,7 +11,6 @@ local gui = _G.gui module('_m.textadept.menu', package.seeall) -- Markdown: --- -- ## Events -- -- The following is a list of all menu events generated in diff --git a/modules/textadept/mime_types.lua b/modules/textadept/mime_types.lua index e6023995..b71fb514 100644 --- a/modules/textadept/mime_types.lua +++ b/modules/textadept/mime_types.lua @@ -10,45 +10,6 @@ module('_m.textadept.mime_types', package.seeall) -- Markdown: -- ## Overview -- --- Files can be recognized and associated with programming language lexers in --- three ways: --- --- * By file extension. --- * By keywords in the file's shebang (`#!/path/to/exe`) line. --- * By a pattern that matches the file's first line. --- --- If a lexer is not associated with a file you open, first make sure the lexer --- exists in `lexers/`. If it does not, you will need to write one. Consult the --- [lexer][lexer] module for a tutorial. --- --- [lexer]: ../modules/lexer.html --- --- ## Configuration Files --- --- Built-in mime-types are located in `modules/textadept/mime_types.conf`. You --- can override or add to them in your `~/.textadept/mime_types.conf`. --- --- #### Detection by File Extension --- --- file_ext lexer --- --- Note: `file_ext` should not start with a `.` (period). --- --- #### Detection by Shebang Keywords --- --- #shebang_word lexer --- --- Examples of `shebang_word`'s are `lua`, `ruby`, `python`. --- --- #### Detection by Pattern --- --- /pattern lexer --- --- Only the last space, the one separating the pattern from the lexer, is --- significant. No spaces in the pattern need to be escaped. --- --- ## Extras --- -- This module adds an extra function to `buffer`: -- -- * **buffer:set\_lexer** (language)
diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua index 95a80558..bcfc209c 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -7,15 +7,6 @@ local L = _G.locale.localize module('_m.textadept.snippets', package.seeall) -- Markdown: --- ## Settings --- --- * `MARK_SNIPPET`: The unique integer mark used to identify the line that --- marks the end of a snippet. --- * `MARK_SNIPPET_COLOR`: The [Scintilla color][scintilla_color] used for the --- line that marks the end of the snippet. --- --- [scintilla_color]: http://scintilla.org/ScintillaDoc.html#colour --- -- ## Overview -- -- Snippets are basically pieces of text inserted into a document, but can @@ -37,6 +28,15 @@ module('_m.textadept.snippets', package.seeall) -- Snippet text should contain spaces instead of tabs since Textadept -- automatically converts spaces to tabs depending on the current settings. -- +-- ## Settings +-- +-- * `MARK_SNIPPET`: The unique integer mark used to identify the line that +-- marks the end of a snippet. +-- * `MARK_SNIPPET_COLOR`: The [Scintilla color][scintilla_color] used for the +-- line that marks the end of the snippet. +-- +-- [scintilla_color]: http://scintilla.org/ScintillaDoc.html#colour +-- -- ## Snippet Precedence -- -- When searching for a snippet to expand in the `snippets` table, snippets in @@ -99,12 +99,9 @@ module('_m.textadept.snippets', package.seeall) -- %num(pattern|replacement) -- -- These act like mirrors, but transform the text that would be inserted using --- a given [Lua pattern][lua_pattern] and replacement. Like in placeholders, --- `replacement` can contain Lua code executed at run-time as well as the --- standard Lua capture sequences: `%n` where 1 <= `n` <= 9. --- --- [lua_pattern]: http://www.lua.org/manual/5.1/manual.html#5.4.1 --- +-- a given [Lua pattern](../manual/14_Appendix.html#lua_patterns) and +-- replacement. Like in placeholders, `replacement` can contain Lua code +-- executed at run-time as well as the standard Lua capture (`%n`) sequences. -- Any `|`'s after the first one do not need to be escaped. -- -- ## Example diff --git a/scripts/update_doc b/scripts/update_doc index 8f9ee6c0..b2fcfbdf 100755 --- a/scripts/update_doc +++ b/scripts/update_doc @@ -105,7 +105,13 @@ for mdfile in p:lines() do html = html:gsub('%%sidebar%%', sidebar_md:read('*all')) sidebar_md:close() local content_md = io.popen('../doc/Markdown.pl '..mdfile) - html = html:gsub('%%content%%', content_md:read('*all')) + local md = content_md:read('*all'):gsub('%%', '%%%%') + md = md:gsub('()([^<]+)()', + function(s, text, e) + return string.format('%s%s%s', s, + text:gsub(' ', '_'):lower(), text, e) + end) + html = html:gsub('%%content%%', md) content_md:close() local f = io.open(htmlfile, 'w') -- cgit v1.2.3