aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2020-10-05 16:07:34 -0400
committerGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2020-10-05 16:07:34 -0400
commitd88a65ae78190eb6a2a94938c93c87c2148c60fc (patch)
tree1af5bae41c770b5af529ee0773cf8cfe491dd84b
parent9cbb496e497865077e39eda1f26ae9dbec2ac06b (diff)
Various manual and documentation updates.
-rw-r--r--LICENSE2
-rw-r--r--core/.os.luadoc4
-rw-r--r--docs/api.md4
-rw-r--r--docs/changelog.md2
-rw-r--r--docs/manual.md42
-rw-r--r--modules/lua/ta_api2
-rw-r--r--modules/lua/ta_tags2
7 files changed, 30 insertions, 28 deletions
diff --git a/LICENSE b/LICENSE
index bd8d7398..e83a18e1 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License
-Copyright (c) 2007-2019 Mitchell
+Copyright (c) 2007-2020 Mitchell
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/core/.os.luadoc b/core/.os.luadoc
index 33d95aa2..4405c4d1 100644
--- a/core/.os.luadoc
+++ b/core/.os.luadoc
@@ -15,7 +15,7 @@ module('os')
-- arguments to pass to it. `PATH` is searched for program names.
-- @param cwd Optional current working directory (cwd) for the child
-- process. When omitted, the parent's cwd is used.
--- @param env Optional table of environment variables for the child process.
+-- @param env Optional map of environment variables for the child process.
-- When omitted, the parent's environment is used.
-- @param stdout_cb Optional Lua function that accepts a string parameter for a
-- block of standard output read from the child. Stdout is read asynchronously
@@ -32,7 +32,7 @@ module('os')
-- @return proc or nil plus an error message on failure
-- @usage os.spawn('lua ' .. buffer.filename, print)
-- @usage proc = os.spawn('lua -e "print(io.read())"', print)
--- proc:write('foo\n')
+-- proc:write('foo\n')
-- @class function
-- @name os.spawn
local spawn
diff --git a/docs/api.md b/docs/api.md
index 5748da17..57808bb4 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -6304,7 +6304,7 @@ Parameters:
arguments to pass to it. `PATH` is searched for program names.
* *`cwd`*: Optional current working directory (cwd) for the child
process. When omitted, the parent's cwd is used.
-* *`env`*: Optional table of environment variables for the child process.
+* *`env`*: Optional map of environment variables for the child process.
When omitted, the parent's environment is used.
* *`stdout_cb`*: Optional Lua function that accepts a string parameter for a
block of standard output read from the child. Stdout is read asynchronously
@@ -6323,7 +6323,7 @@ Usage:
* `os.spawn('lua ' .. buffer.filename, print)`
* `proc = os.spawn('lua -e "print(io.read())"', print)
- proc:write('foo\n')`
+ proc:write('foo\n')`
Return:
diff --git a/docs/changelog.md b/docs/changelog.md
index c2ce58a7..ac3dfb59 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -48,7 +48,7 @@ Bugfixes:
Changes:
-* Rewrote manual and updated lots of other documentation and documentation
+* Rewrote manual and updated lots of other documentation and the documentation
generation pipeline.
* Prefer passing an environment table to `os.spawn()`.
* Updated find & replace key bindings.
diff --git a/docs/manual.md b/docs/manual.md
index d090f323..ceb57973 100644
--- a/docs/manual.md
+++ b/docs/manual.md
@@ -3,7 +3,7 @@
**Contents**
1. [Introduction](#introduction)
-2. [Installation](#installation)
+2. [Getting Started](#getting-started)
3. [User Interface](#user-interface)
4. [Working with Files and Projects](#working-with-files-and-projects)
5. [Adept Editing](#adept-editing)
@@ -161,7 +161,7 @@ assigned to keys, associated with menu items, or connected to events.
[Lua API]: api.html
--------------------------------------------------------------------------------
-### Installation
+### Getting Started
--------------------------------------------------------------------------------
#### Requirements
@@ -230,8 +230,24 @@ your *~/.textadept/init.lua*:
require('file_diff')
require('spellcheck')
+#### Updating
+
+Textadept releases typically occur on the first day of the month every 1-2
+months. There is no auto-update process. (Textadept does not connect to the
+internet; it's just a text editor.) Simply download the new version and copy its
+contents into your current installation, overwriting any existing files and
+directories.
+
#### Running
+![Linux](images/linux.png)
+&nbsp;&nbsp;
+![macOS](images/macosx.png)
+&nbsp;&nbsp;
+![Win32](images/win32.png)
+&nbsp;&nbsp;
+![curses](images/ncurses.png)
+
Run Textadept on Windows by double-clicking *textadept.exe* or
*textadept-curses.exe*. On macOS, double-click *Textadept.app* or invoke the
*ta* script from the command line. On Linux and BSD, invoke *textadept* or
@@ -251,12 +267,14 @@ Switch |Arguments|Description
-------------------|:-------:|-----------
`-e`, `--execute` | 1 |Run the given Lua code
`-f`, `--force` | 0 |Forces unique instance
-`-h`, `--help` | 0 |Shows this (except in the terminal version)
+`-h`, `--help` | 0 |Shows this<sup>a</sup>
`-l`, `--line` | 1 |Jumps to a line in the previously opened file
`-n`, `--nosession`| 0 |No state saving/restoring functionality
`-s`, `--session` | 1 |Loads the given session on startup
`-u`, `--userhome` | 1 |Sets alternate user data directory
-`-v`, `--version` | 0 |Prints Textadept version and copyright information
+`-v`, `--version` | 0 |Prints version and copyright info<sup>a</sup>
+
+<sup>a</sup>The terminal version does not support these.
You can add your own command line arguments using [`args.register()`][]. For
example, in your *~/.textadept/init.lua*:
@@ -346,22 +364,6 @@ distribution to distribution. If you get errors like:
you will need to [compile](#compiling) Textadept manually for your system, which
is a very straightforward and easy process.
-![Linux](images/linux.png)
-&nbsp;&nbsp;
-![macOS](images/macosx.png)
-&nbsp;&nbsp;
-![Win32](images/win32.png)
-&nbsp;&nbsp;
-![curses](images/ncurses.png)
-
-#### Updating
-
-Textadept releases typically occur on the first day of the month every 1-2
-months. There is no auto-update process. (Textadept does not connect to the
-internet; it's just a text editor.) Simply download the new version and copy its
-contents into your current installation, overwriting any existing files and
-directories.
-
--------------------------------------------------------------------------------
### User Interface
--------------------------------------------------------------------------------
diff --git a/modules/lua/ta_api b/modules/lua/ta_api
index a2fbe09a..dd8632a6 100644
--- a/modules/lua/ta_api
+++ b/modules/lua/ta_api
@@ -879,7 +879,7 @@ snippet textadept.editing.autocompleters.snippet (function)\nAutocompleter funct
snippets _G.snippets (table)\nMap of snippet triggers with their snippet text or functions that return such\ntext, with language-specific snippets tables assigned to a lexer name key.
snippets textadept.snippets (module)\nSnippets for Textadept.
space lexer.space (pattern)\nA pattern that matches any whitespace character ('\t', '\v', '\f', '\\n',\n'\r', space).
-spawn os.spawn(cmd, cwd, env, stdout_cb, stderr_cb, exit_cb)\nSpawns an interactive child process *cmd* in a separate thread, returning\na handle to that process.\nOn Windows, *cmd* is passed to `cmd.exe`: `%COMSPEC% /c [cmd]`.\nAt the moment, only the Windows terminal version spawns processes in the same\nthread.\n@param cmd A command line string that contains the program's name followed by\n arguments to pass to it. `PATH` is searched for program names.\n@param cwd Optional current working directory (cwd) for the child\n process. When omitted, the parent's cwd is used.\n@param env Optional table of environment variables for the child process.\n When omitted, the parent's environment is used.\n@param stdout_cb Optional Lua function that accepts a string parameter for a\n block of standard output read from the child. Stdout is read asynchronously\n in 1KB or 0.5KB blocks (depending on the platform), or however much data is\n available at the time.\n At the moment, only the Win32 terminal version sends all output, whether it\n be stdout or stderr, to this callback after the process finishes.\n@param stderr_cb Optional Lua function that accepts a string parameter for a\n block of standard error read from the child. Stderr is read asynchronously\n in 1KB or 0.5kB blocks (depending on the platform), or however much data is\n available at the time.\n@param exit_cb Optional Lua function that is called when the child process\n finishes. The child's exit status is passed.\n@usage os.spawn('lua ' .. buffer.filename, print)\n@usage proc = os.spawn('lua -e "print(io.read())"', print)\n proc:write('foo\\n')\n@return proc or nil plus an error message on failure
+spawn os.spawn(cmd, cwd, env, stdout_cb, stderr_cb, exit_cb)\nSpawns an interactive child process *cmd* in a separate thread, returning\na handle to that process.\nOn Windows, *cmd* is passed to `cmd.exe`: `%COMSPEC% /c [cmd]`.\nAt the moment, only the Windows terminal version spawns processes in the same\nthread.\n@param cmd A command line string that contains the program's name followed by\n arguments to pass to it. `PATH` is searched for program names.\n@param cwd Optional current working directory (cwd) for the child\n process. When omitted, the parent's cwd is used.\n@param env Optional map of environment variables for the child process.\n When omitted, the parent's environment is used.\n@param stdout_cb Optional Lua function that accepts a string parameter for a\n block of standard output read from the child. Stdout is read asynchronously\n in 1KB or 0.5KB blocks (depending on the platform), or however much data is\n available at the time.\n At the moment, only the Win32 terminal version sends all output, whether it\n be stdout or stderr, to this callback after the process finishes.\n@param stderr_cb Optional Lua function that accepts a string parameter for a\n block of standard error read from the child. Stderr is read asynchronously\n in 1KB or 0.5kB blocks (depending on the platform), or however much data is\n available at the time.\n@param exit_cb Optional Lua function that is called when the child process\n finishes. The child's exit status is passed.\n@usage os.spawn('lua ' .. buffer.filename, print)\n@usage proc = os.spawn('lua -e "print(io.read())"', print)\n proc:write('foo\\n')\n@return proc or nil plus an error message on failure
split view.split(view, vertical)\nSplits the view into top and bottom views (unless *vertical* is `true`),\nfocuses the new view, and returns both the old and new views.\nIf *vertical* is `false`, splits the view vertically into left and\nright views.\nEmits a `VIEW_NEW` event.\n@param view The view to split.\n@param vertical Optional flag indicating whether or not to split the view\n vertically. The default value is `false`, for horizontal.\n@return old view and new view.\n@see events.VIEW_NEW
standard_dropdown ui.dialogs.standard_dropdown(options)\nPrompts the user with a drop-down item selection dialog defined by dialog\noptions table *options* and with localized "Ok" and "Cancel" buttons,\nreturning the selected button's index along with the selected item's index.\nIf *options*.`string_output` is `true`, returns the selected button's label\nalong with the selected item's text.\nIf the dialog closed due to *options*.`exit_onchange`, returns `4` along with\neither the selected item's index or its text. If the dialog timed out,\nreturns `0` or `"timeout"`. If the user canceled the dialog, returns `-1` or\n`"delete"`.\n@param options Table of key-value option pairs for the drop-down dialog.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `items`: The list of string items to show in the drop-down.\n * `no_cancel`: Do not display the "Cancel" button. The default value is\n `false`.\n * `exit_onchange`: Close the dialog after selecting a new item. The default\n value is `false`.\n * `select`: The index of the initially selected list item. The default\n value is `1`.\n * `string_output`: Return the selected button's label (instead of its\n index) and the selected item's text (instead of its index). If no item\n was selected, returns the dialog's exit status (instead of its exit\n code). The default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@return selected button or exit code, selected item
standard_inputbox ui.dialogs.standard_inputbox(options)\nPrompts the user with an inputbox dialog defined by dialog options table\n*options* and with localized "Ok" and "Cancel" buttons, returning the\nselected button's index along with the user's input text (the latter as a\nstring or table, depending on the type of *options*.`informative_text`).\nIf *options*.`string_output` is `true`, returns the selected button's label\nalong with the user's input text.\nIf the dialog timed out, returns `0` or `"timeout"`. If the user canceled the\ndialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the inputbox.\n\n * `title`: The dialog's title text.\n * `informative_text`: The dialog's main message text. If the value is a\n table, the first table value is the main message text and any subsequent\n values are used as the labels for multiple entry boxes. Providing a\n single label has no effect.\n * `text`: The dialog's initial input text. If the value is a table, the\n table values are used to populate the multiple entry boxes defined by\n `informative_text`.\n * `no_cancel`: Do not display the "Cancel" button. The default value is\n `false`.\n * `string_output`: Return the selected button's label (instead of its\n index) or the dialog's exit status instead of the button's index (instead\n of its exit code). The default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@return selected button or exit code, input text
diff --git a/modules/lua/ta_tags b/modules/lua/ta_tags
index 556d3278..1102149a 100644
--- a/modules/lua/ta_tags
+++ b/modules/lua/ta_tags
@@ -804,7 +804,7 @@ rotate_selection _HOME/core/.buffer.luadoc /^function rotate_selection(buffer) e
run _HOME/modules/textadept/command_entry.lua /^function M.run(f, keys, lang, height)$/;" f class:ui.command_entry
run _HOME/modules/textadept/run.lua /^function M.run(filename)$/;" f class:textadept.run
run _HOME/modules/textadept/run.lua /^module('textadept.run')]]$/;" m class:textadept
-run_commands _HOME/modules/textadept/run.lua /^M.run_commands = {actionscript=WIN32 and 'start "" "%e.swf"' or OSX and 'open "file://%e.swf"' or 'xdg-open "%e.swf"',ada=WIN32 and '"%e"' or './"%e"',ansi_c=WIN32 and '"%e"' or './"%e"',applescript='osascript "%f"',asm='./"%e"',awk='awk -f "%f"',batch='"%f"',boo='booi "%f"',caml='ocamlrun "%e"',csharp=WIN32 and '"%e"' or 'mono "%e.exe"',chuck='chuck "%f"',cmake='cmake -P "%f"',coffeescript='coffee "%f"',context=WIN32 and 'start "" "%e.pdf"' or OSX and 'open "%e.pdf"' or 'xdg-open "%e.pdf"',cpp=WIN32 and '"%e"' or './"%e"',crystal='crystal "%f"',cuda=WIN32 and '"%e"' or './"%e"',dart='dart "%f"',dmd=WIN32 and '"%e"' or './"%e"',eiffel="./a.out",elixir='elixir "%f"',fsharp=WIN32 and '"%e"' or 'mono "%e.exe"',fennel='fennel "%f"',forth='gforth "%f" -e bye',fortran=WIN32 and '"%e"' or './"%e"',gnuplot='gnuplot "%f"',go='go run "%f"',groovy='groovy "%f"',haskell=WIN32 and '"%e"' or './"%e"',html=WIN32 and 'start "" "%f"' or OSX and 'open "file://%f"' or 'xdg-open "%f"',icon='icont "%e" -x',idl='idl -batch "%f"',Io='io "%f"',java='java "%e"',javascript='node "%f"',jq='jq -f "%f"',ltx=WIN32 and 'start "" "%e.pdf"' or OSX and 'open "%e.pdf"' or 'xdg-open "%e.pdf"',less='lessc --no-color "%f"',lilypond=WIN32 and 'start "" "%e.pdf"' or OSX and 'open "%e.pdf"' or 'xdg-open "%e.pdf"',lisp='clisp "%f"',litcoffee='coffee "%f"',lua='lua -e "io.stdout:setvbuf(\'no\')" "%f"',makefile=WIN32 and 'nmake -f "%f"' or 'make -f "%f"',markdown='markdown "%f"',moon='moon "%f"',myr=WIN32 and '"%e"' or './"%e"',nemerle=WIN32 and '"%e"' or 'mono "%e.exe"',nim='nim c -r "%f"',objective_c=WIN32 and '"%e"' or './"%e"',pascal=WIN32 and '"%e"' or './"%e"',perl='perl "%f"',php='php "%f"',pike='pike "%f"',pkgbuild='makepkg -p "%f"',prolog=WIN32 and '"%e"' or './"%e"',pure='pure "%f"',python=function() return buffer:get_line(0):find('^#!.-python3') and 'python3 -u "%f"' or 'python -u "%f"' end,rstats=WIN32 and 'Rterm -f "%f"' or 'R -f "%f"',rebol='REBOL "%f"',rexx=WIN32 and 'rexx "%f"' or 'regina "%f"',ruby='ruby "%f"',rust=WIN32 and '"%e"' or './"%e"',sass='sass "%f"',scala='scala "%e"',bash='bash "%f"',csh='tcsh "%f"',ksh='ksh "%f"',mksh='mksh "%f"',sh='sh "%f"',zsh='zsh "%f"',rc='rc "%f"',smalltalk='gst "%f"',sml=WIN32 and '"%e"' or './"%e"',snobol4='snobol4 -b "%f"',tcl='tclsh "%f"',tex=WIN32 and 'start "" "%e.pdf"' or OSX and 'open "%e.pdf"' or 'xdg-open "%e.pdf"',vala=WIN32 and '"%e"' or './"%e"',vb=WIN32 and '"%e"' or 'mono "%e.exe"',}$/;" t class:textadept.run
+run_commands _HOME/modules/textadept/run.lua /^M.run_commands = {actionscript=WIN32 and 'start "" "%e.swf"' or OSX and 'open "file://%e.swf"' or 'xdg-open "%e.swf"',ada=WIN32 and '"%e"' or './"%e"',ansi_c=WIN32 and '"%e"' or './"%e"',applescript='osascript "%f"',asm='./"%e"',awk='awk -f "%f"',batch='"%f"',boo='booi "%f"',caml='ocamlrun "%e"',csharp=WIN32 and '"%e"' or 'mono "%e.exe"',chuck='chuck "%f"',cmake='cmake -P "%f"',coffeescript='coffee "%f"',context=WIN32 and 'start "" "%e.pdf"' or OSX and 'open "%e.pdf"' or 'xdg-open "%e.pdf"',cpp=WIN32 and '"%e"' or './"%e"',crystal='crystal "%f"',cuda=WIN32 and '"%e"' or './"%e"',dart='dart "%f"',dmd=WIN32 and '"%e"' or './"%e"',eiffel="./a.out",elixir='elixir "%f"',fsharp=WIN32 and '"%e"' or 'mono "%e.exe"',fennel='fennel "%f"',forth='gforth "%f" -e bye',fortran=WIN32 and '"%e"' or './"%e"',gnuplot='gnuplot "%f"',go='go run "%f"',groovy='groovy "%f"',haskell=WIN32 and '"%e"' or './"%e"',html=WIN32 and 'start "" "%f"' or OSX and 'open "file://%f"' or 'xdg-open "%f"',icon='icont "%e" -x',idl='idl -batch "%f"',Io='io "%f"',java='java "%e"',javascript='node "%f"',jq='jq -f "%f"',ltx=WIN32 and 'start "" "%e.pdf"' or OSX and 'open "%e.pdf"' or 'xdg-open "%e.pdf"',less='lessc --no-color "%f"',lilypond=WIN32 and 'start "" "%e.pdf"' or OSX and 'open "%e.pdf"' or 'xdg-open "%e.pdf"',lisp='clisp "%f"',litcoffee='coffee "%f"',lua='lua -e "io.stdout:setvbuf(\'no\')" "%f"',makefile=WIN32 and 'nmake -f "%f"' or 'make -f "%f"',markdown='markdown "%f"',moon='moon "%f"',myr=WIN32 and '"%e"' or './"%e"',nemerle=WIN32 and '"%e"' or 'mono "%e.exe"',nim='nim c -r "%f"',objective_c=WIN32 and '"%e"' or './"%e"',pascal=WIN32 and '"%e"' or './"%e"',perl='perl "%f"',php='php "%f"',pike='pike "%f"',pkgbuild='makepkg -p "%f"',prolog=WIN32 and '"%e"' or './"%e"',pure='pure "%f"',python=function() return buffer:get_line(1):find('^#!.-python3') and 'python3 -u "%f"' or 'python -u "%f"' end,rstats=WIN32 and 'Rterm -f "%f"' or 'R -f "%f"',rebol='REBOL "%f"',rexx=WIN32 and 'rexx "%f"' or 'regina "%f"',ruby='ruby "%f"',rust=WIN32 and '"%e"' or './"%e"',sass='sass "%f"',scala='scala "%e"',bash='bash "%f"',csh='tcsh "%f"',ksh='ksh "%f"',mksh='mksh "%f"',sh='sh "%f"',zsh='zsh "%f"',rc='rc "%f"',smalltalk='gst "%f"',sml=WIN32 and '"%e"' or './"%e"',snobol4='snobol4 -b "%f"',tcl='tclsh "%f"',tex=WIN32 and 'start "" "%e.pdf"' or OSX and 'open "%e.pdf"' or 'xdg-open "%e.pdf"',vala=WIN32 and '"%e"' or './"%e"',vb=WIN32 and '"%e"' or 'mono "%e.exe"',}$/;" t class:textadept.run
run_in_background _HOME/modules/textadept/run.lua /^module('textadept.run')]]$/;" F class:textadept.run
save _HOME/core/.buffer.luadoc /^function save(buffer) end$/;" f class:buffer
save _HOME/modules/textadept/macros.lua /^function M.save(filename)$/;" f class:textadept.macros