From 8ecc8aa21bf61063a8e2d0ef29a78d4a62616d29 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 13 Jul 2011 20:51:17 -0400 Subject: Refactored key commands and added menu accelerators. Key commands are now in keys.conf and keys.osx.conf which are loaded by the _m.textadept.menu module. --- doc/manual/10_Advanced.md | 18 +-- doc/manual/14_Appendix.md | 311 +++++++++++++++++++++------------------ doc/manual/1_Introduction.md | 5 + doc/manual/3_UserInterface.md | 4 +- doc/manual/4_WorkingWithFiles.md | 34 +++-- doc/manual/5_FileNavigation.md | 11 +- doc/manual/6_AdeptEditing.md | 86 +++++------ doc/manual/7_Modules.md | 24 +-- doc/manual/9_Preferences.md | 21 ++- 9 files changed, 283 insertions(+), 231 deletions(-) (limited to 'doc/manual') diff --git a/doc/manual/10_Advanced.md b/doc/manual/10_Advanced.md index a24c0bdf..274f6293 100644 --- a/doc/manual/10_Advanced.md +++ b/doc/manual/10_Advanced.md @@ -2,11 +2,11 @@ ## 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 to 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. +Access to the Lua state is available through the command entry. Press `Ctrl+E` +(`⌘E` on Mac OSX) to access it. It is useful for debugging, inspecting, and +entering buffer or view commands. If you try to 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()` @@ -18,8 +18,8 @@ Lua's `print()`. #### 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. +`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) @@ -39,8 +39,8 @@ buffer (or a selection). You could do the following from the command entry: ls={}; for l in buffer:get_text():gmatch('[^\n]+') do ls[#ls+1]=l end; table.sort(ls); buffer:set_text(table.concat(ls, '\n')) -A simpler way would be to press `Alt+R` (`Ctrl+Apple+R` on Mac OSX), enter the -shell command `sort`, and hit `Enter`. +A simpler way would be to press `Ctrl+|` (`⌘|` on Mac OSX), enter the shell +command `sort`, and hit `Enter` (`↩`). The standard input (stdin) for shell commands is determined as follows: diff --git a/doc/manual/14_Appendix.md b/doc/manual/14_Appendix.md index 82ab7d69..83dab56c 100644 --- a/doc/manual/14_Appendix.md +++ b/doc/manual/14_Appendix.md @@ -2,146 +2,177 @@ ## 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+ICtrl+EscapeAutocomplete symbol for supported languages
Ctrl+HCtrl+HShow symbol apidoc for supported languages
Ctrl+QCtrl+QBlock comment/uncomment
NoneNoneDelete word
Ctrl+Shift+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
Ctrl+Alt+Shift+ICtrl+Apple+Shift+IShow style
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
Alt+RCtrl+Apple+RFilter through shell command
TabTabExpand snippet or next placeholder or indent text
Alt+ICtrl+ISelect snippet to insert
Shift+TabShift+TabPrevious snippet placeholder or dedent text
Ctrl+Alt+ICtrl+Apple+ICancel current snippet
Buffers
Ctrl+BApple+BSwitch buffers
Ctrl+TabCtrl+TabNext buffer
Ctrl+Shift+TabCtrl+Shift+TabPrev buffer
Ctrl+Shift+B, EApple+Shift+B, EToggle show end of line
Ctrl+Shift+B, WApple+Shift+B, WToggle show whitespace
Ctrl+Shift+B, IApple+Shift+B, IToggle show indentation guides
Ctrl+Shift+B, TabApple+Shift+B, TabToggle use tabs or spaces
Ctrl+Shift+B, SpaceApple+Shift+B, SpaceToggle show whitespace
Ctrl+Shift+B, VApple+Shift+B, 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
+Linux / Win32 | Mac OSX | Command | +--------------|---------|---------| +**File** ||| +Ctrl+N |⌘N |New file +Ctrl+O |⌘O |Open file +Ctrl+Alt+O |⌘⌥O |Open recent file... +Ctrl+Shift+O|⌘⇧O |Reload file +Ctrl+S |⌘S |Save file +Ctrl+Shift+S|⌘⇧S |Save file as.. +Ctrl+W |⌘W |Close file +Ctrl+Shift+W|⌘⇧W |Close all files +None |None|Load session... +None |None|Load session... +Alt+Q |⌘Q |Quit + +**Edit** ||| +Ctrl+Z
Alt+Backspace|⌘Z |Undo +Ctrl+Y
Ctrl+Shift+Z |⌘⇧Z |Redo +Ctrl+X
Shift+Del |⌘X
⇧⌦|Cut +Ctrl+C
Ctrl+Ins |⌘C |Copy +Ctrl+V
Shift+Ins |⌘V |Paste +Ctrl+D |⌘D |Duplicate line +Del |⌦
^D |Delete +Ctrl+A |⌘A |Select all +Ctrl+M |^M |Match brace +Ctrl+Shift+M |^⇧M |Select to brace +Ctrl+Enter |^⎋ |Complete word +None |None |Delete word +Ctrl+Shift+H |⌘⇧H |Highlight word +Ctrl+Space |⌥⎋ |Complete symbol +Ctrl+H |^H |Show documentation +Ctrl+/ |^/ |Toggle block comment +Ctrl+T |^T |Transpose characters +Ctrl+Shift+J |^J |Join lines +None |None |Convert indentation +Alt+< |^< |Enclose in XML tags +Alt+> |^> |Enclose in single XML tag +Alt+" |^" |Enclose in double quotes +Alt+' |^' |Enclose in single quotes +Alt+( |^( |Enclose in parentheses +Alt+[ |^[ |Enclose in brackets +Alt+{ |^{ |Enclose in braces +Ctrl++ |⌘+ |Grow selection by 1 on either side +Ctrl+\_ |⌘\_ |Shrink selection by 1 on either side +Ctrl+< |⌘< |Select between XML tags +Ctrl+> |⌘> |Select in XML tag +Ctrl+" |⌘" |Select in double quotes +Ctrl+' |⌘' |Select in single quotes +Ctrl+( |⌘( |Select in parentheses +Ctrl+[ |⌘[ |Select in brackets +Ctrl+{ |⌘{ |Select in braces +None |None |Select word +Ctrl+Shift+L |⌘⇧L |Select line +Ctrl+Shift+P |⌘⇧P |Select paragraph +Ctrl+Shift+I |⌘⇧I |Select indented block +None |None |Select style + +**Search** ||| +Ctrl+F |⌘F |Find +Ctrl+G
F3 |⌘G |Find next +Ctrl+Shift+G
Shift+F3|⌘⇧G |Find previous +Ctrl+R |⌘R |Replace +Ctrl+Shift+R |⌘⇧R |Replace all +Ctrl+Alt+F |⌘⌥F |Find incremental +Ctrl+Shift+F |⌘⇧F |Find in files +Ctrl+Alt+G |⌘⌥G |Goto next file found +Ctrl+Alt+Shift+G |⌘⌥⇧G|Goto previous file found +Ctrl+J |⌘J |Jump to line + +**Tools** ||| +Ctrl+E |⌘E |Command entry +Ctrl+Alt+R |^R |Run +Ctrl+Alt+Shift+R|^⇧R |Compile +Ctrl+| |⌘||Filter text through +Tab |⇥ |Expand snippet or next placeholder +Ctrl+K |⌥⇥ |Insert snippet... +Shift+Tab |⇧⇥ |Previous snippet placeholder +Ctrl+Shift+K |⌥⇧⇥ |Cancel snippet +Ctrl+F2 |⌘F2 |Toggle bookmark +Ctrl+Shift+F2 |⌘⇧F2 |Clear bookmarks +F2 |F2 |Next bookark +Shift+F2 |⇧F2 |Previous bookmark +Alt+F2 |⌥F2 |Goto bookmark... +Ctrl+U |⌘U |Snapopen `_USERHOME` +Ctrl+Alt+U |⌘⌥U |Snapopen `_HOME` +Ctrl+Alt+Shift+O|⌘⌥⇧O |Snapopen current directory +Ctrl+I |⌘I |Show style + +**Buffer** ||| +Ctrl+Tab
Ctrl+PageDown |^\` |Next buffer +Ctrl+Shift+Tab
Ctrl+PageUp|^~ |Previous buffer +Ctrl+B |⌘B |Switch buffer +Ctrl+Alt+Enter |^↩ |Toggle view EOL +Ctrl+Alt+\\ |^\\ |Toggle wrap mode +Ctrl+Alt+Shift+I |^⇧I |Toggle show indent guides +Ctrl+Alt+Shift+T |^⇧T |Toggle use tabs +Ctrl+Alt+Space |^Space|Toggle view whitespace +Ctrl+Alt+Shift+V |^⇧V |Toggle virtual space +None |None |`CRLF` EOL mode +None |None |`CR` EOL mode +None |None |`LF` EOL mode +None |None |`UTF-8` encoding +None |None |`ASCII` encoding +None |None |`ISO-8859-1` encoding +None |None |`UTF-16` encoding +Ctrl+Alt+L |⌘⌥L |Select lexer... +F5 |F5 |Refresh syntax highlighting + +**View** ||| +Ctrl+Alt+Tab |^⇥ |Next view +Ctrl+Alt+Shift+Tab |^⇧⇥ |Previous view +Ctrl+Alt+Shift+S |^⇧S |Split vertical +Ctrl+Alt+S |^S |Split horizontal +Ctrl+Alt+W |^W |Unsplit view +Ctrl+Alt+Shift+W |^⇧W |Unsplit all views +Ctrl+Alt++
Ctrl+Alt+=|^+
^=|Grow view +Ctrl+Alt+- |^- |Shrink view +Ctrl+= |⌘= |Zoom in +Ctrl+- |⌘- |Zoom out +Ctrl+0 |⌘0 |Reset zoom + +**Help** ||| +F1 |F1 |Open manual +Shift+F1|⇧F1 |Open LuaDoc +None |None|About + +**Movement** ||| +Down |⇣
^N |Line down +Shift+Down |⇧⇣
^⇧N |Line down extend selection +Ctrl+Down |⌘↘ |Scroll line down +Alt+Shift+Down |⌥⇧⇣ |Line down extend rect. selection +Up |⇡
^P |Line up +Shift+Up |⇧⇡
^⇧P |Line up extend selection +Ctrl+Up |⌘↖ |Scroll line up +Alt+Shift+Up |⌥⇧⇡ |Line up extend rect. selection +Left |⇠
^B |Char left +Shift+Left |⇧⇠
^⇧B |Char left extend selection +Ctrl+Left |^⇠
^⌥B |Word left +Ctrl+Shift+Left |^⇧⇠
^⌥⇧B|Word left extend selection +Alt+Shift+Left |⌥⇧⇠ |Char left extend rect. selection +Right |⇢
^F |Char right +Shift+Right |⇧⇢
^⇧F |Char right extend selection +Ctrl+Right |^⇢
^⌥F |Word right +Ctrl+Shift+Right |^⇧⇢
^⌥⇧F|Word right extend selection +Alt+Shift+Right |⌥⇧⇢ |Char right extend rect. selection +Home |⌘⇠
^A |Line start +Shift+Home |⌘⇧⇠
^⇧A |Line start extend selection +Ctrl+Home |⌘⇡
↖ |Document start +Ctrl+Shift+Home |⌘⇧⇡
⇧↖ |Document start extend selection +Alt+Shift+Home |⌥⇧↖ |Line start extend rect. selection +End |⌘⇢
^E |Line end +Shift+End |⌘⇧⇢
^⇧E |Line end extend selection +Ctrl+End |⌘⇣
↘ |Document end +Ctrl+Shift+End |⌘⇧⇣
⇧↘ |Document end extend selection +Alt+Shift+End |⌥⇧↘ |Line end extend rect. selection +PageUp |⇞ |Page up +Shift+PageUp |⇧⇞ |Page up extend selection +Alt+Shift+PageUp |⌥⇧⇞ |Page up extend rect. selection +PageDown |⇟ |Page down +Shift+PageDown |⇧⇟ |Page down extend selection +Alt+Shift+PageDown |⌥⇧⇟ |Page down extend rect. selection +Ctrl+Del |⌥⌦ |Delete word right +Ctrl+Shift+Del |⌘⌦ |Delete line right +Ins |Ins |Toggle overtype +Backspace
Shift+Backspace|⌫
⇧⌫ |Delete back +Ctrl+Backspace |⌥⌫ |Delete word left +Ctrl+Shift+Backspace |⌘⌫ |Delete line left +Tab |⇥ |Insert tab or indent +Shift+Tab |⇧⇥ |Dedent +None |^K |Cut to line end +None |^L |Center line vertically ## Lua Patterns diff --git a/doc/manual/1_Introduction.md b/doc/manual/1_Introduction.md index 610a8e81..4e0b17dd 100644 --- a/doc/manual/1_Introduction.md +++ b/doc/manual/1_Introduction.md @@ -58,6 +58,11 @@ customization and extensibility from the start; the features come after that. `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`. +* When mentioning key commands, the Mac OSX equivalent will often be shown in + parenthesis. It may be tempting to assume that some Windows/Linux keys map to + Mac OSX's (e.g `Ctrl` to `⌘`), but this is not always the case. Please do not + view the key equivalents as translations of one another, but rather as + separate entities. This will minimize confusion. ## Features at a Glance diff --git a/doc/manual/3_UserInterface.md b/doc/manual/3_UserInterface.md index 14a6169b..e71eecce 100644 --- a/doc/manual/3_UserInterface.md +++ b/doc/manual/3_UserInterface.md @@ -11,8 +11,8 @@ 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. +The completely customizable (and optional!) menubar provides access to all of +Textadept's features. ## Editor View diff --git a/doc/manual/4_WorkingWithFiles.md b/doc/manual/4_WorkingWithFiles.md index a8afd25b..095dba55 100644 --- a/doc/manual/4_WorkingWithFiles.md +++ b/doc/manual/4_WorkingWithFiles.md @@ -10,13 +10,13 @@ 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. +`Ctrl+Tab` (``^` `` on Mac OSX) 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. +To move quickly between buffers, press `Ctrl+B` (`⌘B` on Mac OSX) to open the +buffer browser. ![Buffer Browser](images/bufferbrowser.png) @@ -30,17 +30,17 @@ wildcards. You can also just use the arrow keys. Pressing `Enter` or clicking ## 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. +horizontally or vertically. `Ctrl+Alt+Shift+S` splits vertically (side-by-side) +and `Ctrl+Alt+S` splits horizontally (`^⇧S` and `^S` respectively on Mac OSX). +You can resize the splitter bar by clicking and dragging with the mouse or +using `Ctrl+Alt++` and `Ctrl+Alt+-` (`^+` and `^-`). 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. +Pressing `Ctrl+Alt+Tab` (`^⇥` on Mac OSX) goes to the next view and +`Ctrl+Alt+Shift+Tab` (`^⇧⇥`) 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`. +To unsplit a view, enter the view to keep open and press `Ctrl+Alt+W` (`^W` on +Mac OSX). To unsplit all views, use `Ctrl+Alt+Shift+W` (`^⇧W`). ## Sessions @@ -58,8 +58,10 @@ scroll positions in each buffer, and Textadept's window size. 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 versatile -in scripts. See its [LuaDoc](../modules/_m.textadept.snapopen.html). +snapopen the current file's directory with `Ctrl+Alt+Shift+O` (`⌘⌥⇧O` on Mac +OSX) or from the `Tools -> Snapopen -> Current Directory` menu. Snapopen is +pretty limited from the menu, but more versatile in scripts. See its +[LuaDoc](../modules/_m.textadept.snapopen.html). `Ctrl+U` (`⌘U`) snaps open +`~/.textadept/` and `Ctrl+Alt+U` (`⌘⌥U`) snaps open Textadept's home directory. ![Snapopen](images/snapopen.png) diff --git a/doc/manual/5_FileNavigation.md b/doc/manual/5_FileNavigation.md index 6b88af8d..ed0e5539 100644 --- a/doc/manual/5_FileNavigation.md +++ b/doc/manual/5_FileNavigation.md @@ -3,18 +3,19 @@ ## Bookmarks You can place bookmarks on lines in buffers to jump back to them later. Use the -`Tools -> Bookmark` menu options to do so. +`Tools -> Bookmark` menu options or key commands 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`. +To jump to a specific line in a file, press `Ctrl+J` (`⌘J` on Mac OSX) 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. +caret : `(`, `)`, `[`, `]`, `{`, `}`, `<`, and `>`. Pressing `Ctrl+M` (`^M` on +Mac OSX) moves the caret to that matching brace and `Ctrl+Shift+M` (`^⇧M`) +extends the selection. ![Matching Braces](images/matchingbrace.png) diff --git a/doc/manual/6_AdeptEditing.md b/doc/manual/6_AdeptEditing.md index 49f16e74..9b05ce28 100644 --- a/doc/manual/6_AdeptEditing.md +++ b/doc/manual/6_AdeptEditing.md @@ -11,16 +11,16 @@ modified in your [preferences](9_Preferences.html#key_commands). 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 +`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 +`Ctrl+Return` (`^⎋` 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. +suggestion. Press `Return` (`↩`) to complete the selected word. ![Word Completion](images/wordcompletion.png) @@ -30,8 +30,8 @@ Textadept has the capability to autocomplete symbols for programming languages and display API documentation. Lua is of course supported extremely well and other languages have basic support with the help of [ctags](http://ctags.sf.net). Symbol completion is available by pressing -`Ctrl+I` (`Ctrl+Esc` on Mac OSX). Documentation for symbols is available with -`Ctrl+H`. +`Ctrl+Space` (`⌥⎋` on Mac OSX). Documentation for symbols is available with +`Ctrl+H` (`^H`). ![Adeptsense Lua](images/adeptsense_lua.png)      @@ -44,28 +44,36 @@ the [LuaDoc](../modules/_m.textadept.adeptsense.html). ## 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 +`Ctrl+F` (`⌘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. +Note the `Ctrl+G`, `Ctrl+Shift+G`, `Ctrl+R`, `Ctrl+Shift+R` key commands for +find next, find previous, replace, and replace all (`⌘G`, `⌘⇧G`, `⌘R`, `⌘⇧R` +respectively on Mac OSX) only work when the Find/Replace dialog is hidden. When +it is visible, use the button mnemonics: `Alt+N`, `Alt+P`, `Alt+R`, and `Alt+A` +(`⌘N`, `⌘P`, `⌘R`, `⌘A`) for English locale. + #### 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. +`Ctrl+Shift+F` brings up Find in Files (`⌘⇧F` on Mac OSX) and 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. You can also use the `Ctrl+Alt+G` and +`Ctrl+Alt+Shift+G` (`⌘⌥G` and `⌘⌥⇧G` on Mac OSX) key commands. 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. +You can start an incremental search by pressing `Ctrl+Alt+F` (`⌘⌥F` on Mac OSX). +Incremental search searches the buffer as you type. Only the `Match Case` option +is recognized. #### Replace in Selection @@ -78,8 +86,8 @@ then `Replace All`. #### 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. +`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 @@ -91,9 +99,9 @@ Textadept shows what it is using for indentation in the document statusbar. #### 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. +You can use tabs instead of the default spaces by pressing `Ctrl+Alt+Shift+T` +(`^⇧T` 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). @@ -108,8 +116,8 @@ all tabs are converted to spaces. #### 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. +Holding `Alt+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)      @@ -121,36 +129,28 @@ 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. +This is currently unavailable on Mac OSX. + #### 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, "`. +Textadept allows you to select many different entities from the caret. For +example, `Ctrl+"` (`^"` on Mac OSX) selects all characters in a `""` sequence. +Typing `Ctrl++` (`^+`) as a follow-up selects the double-quotes too. See the +`Edit -> Select In...` menu for available entities and their key commands. ## 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, "`. +`Edit -> Selection -> Enclose In...` menu contains all available entities and +their key commands. If no text is selected, the word to the left of the caret is enclosed. ## Word Highlight All occurrences of a given word are highlighted by putting the caret over the -word and pressing `Ctrl+Shift+H` (`Ctrl+Apple+T` on Mac OSX). This is useful to -show occurrences of a variable name in source code. +word and pressing `Ctrl+Shift+H` (`⌘⇧H` on Mac OSX). This is useful to show +occurrences of a variable name in source code. ![Word Highlight](images/wordhighlight.png) @@ -158,9 +158,9 @@ show occurrences of a variable name in source code. #### 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. +Virtual space (freehand) mode is enabled and disabled with `Ctrl+Alt+Shift+V` +(`^⇧V` in Mac OSX). When enabled, caret movement is not restricted by line +endings. #### Overwrite diff --git a/doc/manual/7_Modules.md b/doc/manual/7_Modules.md index 72880974..917a0b33 100644 --- a/doc/manual/7_Modules.md +++ b/doc/manual/7_Modules.md @@ -37,13 +37,13 @@ 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). +[snippets](../modules/_m.textadept.snippets.html). Press `Ctrl+K` (`⌥⇥` 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+Shift+K` (`⌥⇧⇥` on Mac OSX) +cancels the current snippet. Snippets can be nested (inserted from within +another snippet). ![Snippet](images/snippet.png)      @@ -53,21 +53,23 @@ can be nested (inserted from within another snippet). 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. +which key commands are available. They are typically stored in the `Ctrl+L` +(`⌘L` on Mac OSX) key prefix. ##### Run Most language-specific modules have a command that runs the code in the current -file. Pressing `Ctrl+R` runs that command. +file. Pressing `Ctrl+Alt+R` (`^R` on Mac OSX) 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. +current file. Pressing `Ctrl+Alt+Shift+R` (`^⇧R` on Mac OSX) runs that command. ##### Block Comments -Pressing `Ctrl+Q` comments or uncomments the code on the selected lines. +Pressing `Ctrl+/` (`⌘/` on Mac OSX) comments or uncomments the code on the +selected lines. #### Buffer Properties diff --git a/doc/manual/9_Preferences.md b/doc/manual/9_Preferences.md index 579874c6..e917a55c 100644 --- a/doc/manual/9_Preferences.md +++ b/doc/manual/9_Preferences.md @@ -70,19 +70,30 @@ You can add global snippets to `snippets` such as: snippets['file'] = '%' snippets['path'] = "%<(buffer.filename or ''):match('^.+[/\\]')>" -So typing `file` or `path` and then pressing `Tab` will insert the snippet. +So typing `file` or `path` and then pressing `Tab` (`⇥` on Mac OSX) 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 `keys` from within your `~/.textadept/init.lua` or -from a file loaded by `~/.textadept/init.lua`. For example maybe you want +The default set of key commands is located in `modules/textadept/keys.conf` +(`modules/textadept/keys.osx.conf` on Mac OSX) and is loaded by the +`_m.textadept.menu` module. It is not recommended to edit Textadept's +`keys.conf` or `keys.osx.conf` for changing the key bindings since your changes +could be overwritten when updating Textadept. Instead, make a copy in your +`~/.textadept/modules/textadept/` folder and modify that. + +You can also modify key commands from within your 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`: keys.an = new_buffer keys.cn = nil +If you choose to exclude loading the menu like in the example above, you will +have to specify your own set of key commands! I happen to do this and keep a +copy of `~/.textadept/modules/textadept/keys.lua` that is loaded by my +`~/.textadept/init.lua`. + ## Locale Most messages displayed by Textadept are localized. `core/locale.conf` contains -- cgit v1.2.3