diff options
author | 2013-09-27 21:12:05 -0400 | |
---|---|---|
committer | 2013-09-27 21:12:05 -0400 | |
commit | ef23e13ac57cf6a8bcb04ccce10d2e5b34feec06 (patch) | |
tree | 558d22791c4461fc5b765ce9ef57dd2273df73e0 /doc | |
parent | 235a3a04d8cf7f80823d59a8ff6ec77fbf8e61d5 (diff) |
Integrated compile and run commands for most languages.
Compile and run should work out of the box for most languages. Also added a
warning marker, renamed `compile_command` and `run_command` tables to
`compile_commands` and `run_commands`, respectively, and renamed `error_details`
to `error_patterns`, changing its structure to just hold patterns.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/06_AdeptEditing.md | 22 | ||||
-rw-r--r-- | doc/07_Modules.md | 26 | ||||
-rw-r--r-- | doc/08_Preferences.md | 2 | ||||
-rw-r--r-- | doc/14_Appendix.md | 14 | ||||
-rw-r--r-- | doc/images/runerror.png | bin | 42673 -> 39951 bytes |
5 files changed, 37 insertions, 27 deletions
diff --git a/doc/06_AdeptEditing.md b/doc/06_AdeptEditing.md index 38f824a9..f27df547 100644 --- a/doc/06_AdeptEditing.md +++ b/doc/06_AdeptEditing.md @@ -212,7 +212,8 @@ search. Being a programmer's editor, Textadept excels at editing source code. It understands the syntax and structure of more than 80 different programming languages and recognizes hundreds of file types. Textadept uses this knowledge -to make viewing and editing code faster and easier. +to make viewing and editing code faster and easier. It can also compile and run +simple source files. ### Lexers @@ -296,3 +297,22 @@ can define some too. Pressing `Ctrl+/` (`⌘/` on Mac OSX | `M-/` in curses) comments or uncomments the code on the selected lines. Selecting any part of a line renders the entire line eligible for commenting or uncommenting. + +### Compile and Run + +Textadept knows most of the commands that compile and/or run code in source +files. Pressing `Ctrl+Shift+R` (`⌘⇧R` on Mac OSX | `M-^R` in curses) executes +the command for compiling code in the current file and `Ctrl+R` (`⌘R` | `^R`) +executes the command for running code. A new buffer shows the output from the +command and marks any recognized warnings and errors. Pressing `Ctrl+Alt+E` +(`^⌘E` | `M-X`) attempts to jump to the source of the next recognized warning or +error and `Ctrl+Alt+Shift+E` (`^⌘⇧E` | `M-S-X`) attempts to jump to the previous +one. Double-clicking on warnings and errors also jumps to their sources. If +Textadept does not know the correct commands for compiling and/or running your +language's source code, or if it does not detect warning or error messages +properly, you can [make changes][] in your [user-init file][]. + +![Runtime Error](images/runerror.png) + +[make changes]: api/_M.html#Compile.and.Run +[user-init file]: 08_Preferences.html#User.Init diff --git a/doc/07_Modules.md b/doc/07_Modules.md index 9af18ab5..3f929ec9 100644 --- a/doc/07_Modules.md +++ b/doc/07_Modules.md @@ -19,29 +19,9 @@ Language modules have a scope limited to a single programming language. The module's name matches the language's lexer in the *lexers/* directory. Textadept automatically loads the module when editing source code in that particular language. In addition to the source code editing features discussed previously, -these kinds of modules typically also define shell commands for running and -compiling code, indentation settings, custom key bindings, and perhaps a custom -context menu. The manual discusses these features below. - -### Compile and Run - -Most language modules specify commands that compile and/or run the code in the -current file. Pressing `Ctrl+Shift+R` (`⌘⇧R` on Mac OSX | `M-^R` in curses) -executes the command for compiling code and `Ctrl+R` (`⌘R` | `^R`) executes the -command for running code. A new buffer shows the output from the command and -marks any recognized errors. Pressing `Ctrl+Alt+E` (`^⌘E` | `M-X`) attempts to -jump to the source of the next recognized error and `Ctrl+Alt+Shift+E` (`^⌘⇧E` | -`M-S-X`) attempts to jump to the previous one. Double-clicking on errors also -jumps to their sources. Note: In order for these features to work, the language -you are working with must have its compile and run commands and error format -defined. If the language module does not exist or does not [define][] commands -or an error format, you can do so [manually][] in your [user-init file][]. - -![Runtime Error](images/runerror.png) - -[define]: api/_M.html#Compile.and.Run -[manually]: http://foicica.com/wiki/run-supplemental -[user-init file]: 08_Preferences.html#User.Init +these kinds of modules typically also define indentation settings, custom key +bindings, and perhaps a custom context menu. The manual discusses these features +below. ### Buffer Properties diff --git a/doc/08_Preferences.md b/doc/08_Preferences.md index 9495a747..a6e0a09f 100644 --- a/doc/08_Preferences.md +++ b/doc/08_Preferences.md @@ -80,7 +80,7 @@ commands, load more [Adeptsense tags][], and add additional [key bindings](#Key.Bindings) and [snippets](#Snippets) (instead of in *~/.textadept/init.lua*). For example: - textadept.run.run_command.lua = 'lua5.2' + textadept.run.run_commands.lua = 'lua5.2' _M.lua.sense:load_ctags('/path/to/my/projects/tags') keys.lua['c\n'] = function() buffer:line_end() buffer:add_text('end') buffer:new_line() diff --git a/doc/14_Appendix.md b/doc/14_Appendix.md index f4834dc7..d5a83c1d 100644 --- a/doc/14_Appendix.md +++ b/doc/14_Appendix.md @@ -175,10 +175,14 @@ grow\_selection() |Replaced|[select\_enclosed()][] menubar |Removed |N/A contextmenu |Removed |N/A **_M.textadept.run** | | +N/A |New |[MARK\_WARNING][] N/A |New |[MARK\_ERROR][] MARK\_ERROR\_BACK |Removed |N/A<sup>c</sup> +compile\_command |Renamed |[compile\_commands][] +run\_command |Renamed |[run\_commands][] +error\_detail |Renamed |[error\_patterns][]<sup>e</sup> **_M.textadept.snapopen** |Removed |N/A -open |Changed |\_G.[io.snapopen()][]<sup>e</sup> +open |Changed |\_G.[io.snapopen()][]<sup>f</sup> **_SCINTILLA.constants** | | SC\_\* |Renamed |Removed "SC\_" prefix. SC(FIND\|MOD\|VS\|WS) |Renamed |Removed "SC" prefix. @@ -211,7 +215,9 @@ close\_all() |Renamed |[close\_all\_buffers()][] <sup>d</sup>Set [`buffer.indic_fore`][] in [`events.VIEW_NEW`][]. -<sup>e</sup>Changed arguments too. +<sup>e</sup>Changed structure too. + +<sup>f</sup>Changed arguments too. [buffer.new()]: api/buffer.html#new [textadept]: api/textadept.html @@ -222,7 +228,11 @@ close\_all() |Renamed |[close\_all\_buffers()][] [INDIC\_HIGHLIGHT]: api/textadept.editing.html#INDIC_HIGHLIGHT [autocomplete\_word]: api/textadept.editing.html#autocomplete_word [select\_enclosed()]: api/textadept.editing.html#select_enclosed +[MARK\_WARNING]: api/textadept.run.html#MARK_WARNING [MARK\_ERROR]: api/textadept.run.html#MARK_ERROR +[compile\_commands]: api/textadept.run.html#compile_commands +[run\_commands]: api/textadept.run.html#run_commands +[error\_patterns]: api/textadept.run.html#error_patterns [io.snapopen()]: api/io.html#snapopen [style\_name]: api/buffer.html#style_name [io.reload\_file()]: api/io.html#reload_file diff --git a/doc/images/runerror.png b/doc/images/runerror.png Binary files differindex 65d272f9..4fe89b53 100644 --- a/doc/images/runerror.png +++ b/doc/images/runerror.png |