aboutsummaryrefslogtreecommitdiff
path: root/core/ext/key_commands.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2010-03-17 16:44:39 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2010-03-17 16:44:39 -0400
commit35bb1f0bb70a9eca352aacae9bb631c2c7490e8a (patch)
tree1cc49bec8fa119953feeac4d23eb5d43d22c36ad /core/ext/key_commands.lua
parentddcf1843cfa9ec9aabd056ad68f531927b035ae5 (diff)
downloadtextadept-35bb1f0bb70a9eca352aacae9bb631c2c7490e8a.tar.gz
textadept-35bb1f0bb70a9eca352aacae9bb631c2c7490e8a.zip
Added more LuaDoc for core/ext/key_commands.lua.
Diffstat (limited to 'core/ext/key_commands.lua')
-rw-r--r--core/ext/key_commands.lua30
1 files changed, 29 insertions, 1 deletions
diff --git a/core/ext/key_commands.lua b/core/ext/key_commands.lua
index b8dbb816..bebd850a 100644
--- a/core/ext/key_commands.lua
+++ b/core/ext/key_commands.lua
@@ -30,7 +30,7 @@ module('textadept.key_commands', package.seeall)
-- SHIFT = 'Shift'
-- ALT = 'Alt'
-- ADD = '+'
--- -- pressing control, shift, alt and 'a' yields: 'Ctrl+Shift+Alt+a'
+-- -- pressing control, shift, alt and 'a' yields: 'Ctrl+Shift+Alt+A'
--
-- For key values less than 255, Lua's [`string.char()`][string_char] is used to
-- determine the key's string representation. Otherwise, the `KEYSYMS` lookup
@@ -95,6 +95,34 @@ module('textadept.key_commands', package.seeall)
-- All Lua functions must be defined BEFORE they are reference in key commands.
-- 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 `core/ext/key_commands.lua`.
+-- Instead you have options:
+--
+-- 1. Copy it to your `~/.textadept/` directory, make your changes, and
+-- `require` it in your `~/.textadept/init.lua`.
+--
+-- 2. `require 'ext/key_commands'` in `~/.textadept/init.lua` and redefine the
+-- keys through the `_G.keys` table. For example:
+--
+-- -- ~/.textadept/init.lua
+-- require 'ext/keys'
+-- require 'ext/find'
+-- require 'ext/command_entry'
+-- require 'ext/mime_types'
+--
+-- require 'textadept'
+--
+-- require 'ext/menu'
+-- require 'ext/key_commands'
+--
+-- keys.cd = { 'clear', 'buffer' } -- delete char under caret
+-- keys.aq = nil -- do not quit Textadept with Alt+Q
+-- -- etc.
+--
+-- 3. The same as 2, but redefine the keys in a separate file you `require`.
-- Windows and Linux key commands are listed in the first block.
-- Mac OSX key commands are listed in the second block.