Mercurial > vim
comparison runtime/doc/terminal.txt @ 12254:8d76a56861ec
Update runtime files
commit https://github.com/vim/vim/commit/c572da5f67aa5cdbbc127fc6f1d0a42e38468325
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 27 16:52:01 2017 +0200
Update runtime files
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 27 Aug 2017 17:00:05 +0200 |
parents | 6947d5bcf57f |
children | e3bde71afff0 |
comparison
equal
deleted
inserted
replaced
12253:c081ba0b6e8d | 12254:8d76a56861ec |
---|---|
1 *terminal.txt* For Vim version 8.0. Last change: 2017 Aug 20 | 1 *terminal.txt* For Vim version 8.0. Last change: 2017 Aug 26 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
17 1. Basic use |terminal-use| | 17 1. Basic use |terminal-use| |
18 2. Remote testing |terminal-testing| | 18 2. Remote testing |terminal-testing| |
19 3. Debugging |terminal-debug| | 19 3. Debugging |terminal-debug| |
20 | 20 |
21 {Vi does not have any of these commands} | 21 {Vi does not have any of these commands} |
22 {only available when compiled with the |+terminal| feature} | |
23 | |
24 The terminal feature requires the |+multi_byte|, |+job| and |+channel| features. | |
22 | 25 |
23 ============================================================================== | 26 ============================================================================== |
24 1. Basic use *terminal-use* | 27 1. Basic use *terminal-use* |
25 | 28 |
26 This feature is for running a terminal emulator in a Vim window. A job can be | 29 This feature is for running a terminal emulator in a Vim window. A job can be |
93 Open a new terminal window. | 96 Open a new terminal window. |
94 | 97 |
95 If [command] is provided run it as a job and connect | 98 If [command] is provided run it as a job and connect |
96 the input and output to the terminal. | 99 the input and output to the terminal. |
97 If [command] is not given the 'shell' option is used. | 100 If [command] is not given the 'shell' option is used. |
101 if [command] is NONE no job is started, the pty of the | |
102 terminal can be used by a command like gdb. | |
98 | 103 |
99 A new buffer will be created, using [command] or | 104 A new buffer will be created, using [command] or |
100 'shell' as the name, prefixed with a "!". If a buffer | 105 'shell' as the name, prefixed with a "!". If a buffer |
101 by this name already exists a number is added in | 106 by this name already exists a number is added in |
102 parentheses. E.g. if "gdb" exists the second terminal | 107 parentheses. E.g. if "gdb" exists the second terminal |
205 "(Terminal-finished)". | 210 "(Terminal-finished)". |
206 | 211 |
207 It is not possible to enter Insert mode from Terminal-Job mode. | 212 It is not possible to enter Insert mode from Terminal-Job mode. |
208 | 213 |
209 | 214 |
215 Cursor style ~ | |
216 | |
217 By default the cursor in the terminal window uses a not blinking block. The | |
218 normal xterm escape sequences can be used to change the blinking state and the | |
219 shape. Once focus leaves the terminal window Vim will restore the original | |
220 cursor. | |
221 | |
222 An exception is when xterm is started with the "-bc" argument, or another way | |
223 that causes the cursor to blink. This actually means that the blinking flag | |
224 is inverted. Since Vim cannot detect this, the terminal window cursor | |
225 blinking will also be inverted. | |
226 | |
227 | |
210 Unix ~ | 228 Unix ~ |
211 | 229 |
212 On Unix a pty is used to make it possible to run all kinds of commands. You | 230 On Unix a pty is used to make it possible to run all kinds of commands. You |
213 can even run Vim in the terminal! That's used for debugging, see below. | 231 can even run Vim in the terminal! That's used for debugging, see below. |
214 | 232 |
267 | 285 |
268 ============================================================================== | 286 ============================================================================== |
269 3. Debugging *terminal-debug* | 287 3. Debugging *terminal-debug* |
270 | 288 |
271 The Terminal debugging plugin can be used to debug a program with gdb and view | 289 The Terminal debugging plugin can be used to debug a program with gdb and view |
272 the source code in a Vim window. For example: > | 290 the source code in a Vim window. |
273 | 291 |
292 Load the plugin with this command: > | |
293 packadd termdebug | |
294 | |
295 To start debugging use `:TermDebug` folowed by the command name, for example: > | |
274 :TermDebug vim | 296 :TermDebug vim |
275 | 297 |
276 This opens three windows: | 298 This opens two windows: |
277 - A terminal window in which "gdb vim" is executed. Here you can directly | 299 - A terminal window in which "gdb vim" is executed. Here you can directly |
278 interact with gdb. | 300 interact with gdb. |
279 - A terminal window for the executed program. When "run" is used in gdb the | 301 - A terminal window for the executed program. When "run" is used in gdb the |
280 program I/O will happen in this window, so that it does not interfere with | 302 program I/O will happen in this window, so that it does not interfere with |
281 controlling gdb. | 303 controlling gdb. |
282 - A normal Vim window used to show the source code. When gdb jumps to a | 304 The current window is used to show the source code. When gdb jumps to a |
283 source file location this window will display the code, if possible. Values | 305 source file location this window will display the code, if possible. Values |
284 of variables can be inspected, breakpoints set and cleared, etc. | 306 of variables can be inspected, breakpoints set and cleared, etc. |
285 | 307 |
286 This uses two terminal windows. To open the gdb window: > | 308 When the debugger ends the two opened windows are closed. |
287 :term gdb [arguments] | 309 |
288 To open the terminal to run the tested program |term_start()| is used. | 310 |
311 Customizing ~ | |
312 | |
313 g:debugger The debugger command. Default "gdb". | |
314 | |
289 | 315 |
290 TODO | 316 TODO |
291 | 317 |
292 | 318 |
293 vim:tw=78:ts=8:ft=help:norl: | 319 vim:tw=78:ts=8:ft=help:norl: |