comparison runtime/doc/terminal.txt @ 13575:4df23d9bad47 v8.0.1660

patch 8.0.1660: the terminal API "drop" command doesn't support options commit https://github.com/vim/vim/commit/333b80acf3a44e462456e6d5730e47ffa449c83d Author: Bram Moolenaar <Bram@vim.org> Date: Wed Apr 4 22:57:29 2018 +0200 patch 8.0.1660: the terminal API "drop" command doesn't support options Problem: The terminal API "drop" command doesn't support options. Solution: Implement the options.
author Christian Brabandt <cb@256bit.org>
date Wed, 04 Apr 2018 23:00:07 +0200
parents 5923f64c8f5b
children 03224283bafc
comparison
equal deleted inserted replaced
13574:73c69063091f 13575:4df23d9bad47
23 Session |terminal-session| 23 Session |terminal-session|
24 Unix |terminal-unix| 24 Unix |terminal-unix|
25 MS-Windows |terminal-ms-windows| 25 MS-Windows |terminal-ms-windows|
26 2. Terminal communication |terminal-communication| 26 2. Terminal communication |terminal-communication|
27 Vim to job: term_sendkeys() |terminal-to-job| 27 Vim to job: term_sendkeys() |terminal-to-job|
28 Job to Vim: JSON API |terminal-api| 28 Job to Vim: JSON API |terminal-api|
29 Using the client-server feature |terminal-client-server| 29 Using the client-server feature |terminal-client-server|
30 3. Remote testing |terminal-testing| 30 3. Remote testing |terminal-testing|
31 4. Diffing screen dumps |terminal-diff| 31 4. Diffing screen dumps |terminal-diff|
32 Writing a screen dump test for Vim |terminal-dumptest| 32 Writing a screen dump test for Vim |terminal-dumptest|
33 Creating a screen dump |terminal-screendump| 33 Creating a screen dump |terminal-screendump|
350 *terminal-unix* 350 *terminal-unix*
351 On Unix a pty is used to make it possible to run all kinds of commands. You 351 On Unix a pty is used to make it possible to run all kinds of commands. You
352 can even run Vim in the terminal! That's used for debugging, see below. 352 can even run Vim in the terminal! That's used for debugging, see below.
353 353
354 Environment variables are used to pass information to the running job: 354 Environment variables are used to pass information to the running job:
355 TERM name of the terminal, 'term' 355 TERM name of the terminal, from the 'term' option
356 ROWS number of rows in the terminal initially 356 ROWS number of rows in the terminal initially
357 LINES same as ROWS 357 LINES same as ROWS
358 COLUMNS number of columns in the terminal initially 358 COLUMNS number of columns in the terminal initially
359 COLORS number of colors, 't_Co' (256*256*256 in the GUI) 359 COLORS number of colors, 't_Co' (256*256*256 in the GUI)
360 VIM_SERVERNAME v:servername 360 VIM_SERVERNAME v:servername
441 endif 441 endif
442 endfunc 442 endfunc
443 < Output from `:echo` may be erased by a redraw, use `:echomsg` 443 < Output from `:echo` may be erased by a redraw, use `:echomsg`
444 to be able to see it with `:messages`. 444 to be able to see it with `:messages`.
445 445
446 drop {filename} 446 drop {filename} [options]
447 447
448 Let Vim open a file, like the `:drop` command. If {filename} 448 Let Vim open a file, like the `:drop` command. If {filename}
449 is already open in a window, switch to that window. Otherwise 449 is already open in a window, switch to that window. Otherwise
450 open a new window to edit {filename}. 450 open a new window to edit {filename}.
451
452 [options] is only used when opening a new window. If present,
453 it must be a Dict. Similarly to |++opt|, These entries are recognized:
454 "ff" file format: "dos", "mac" or "unix"
455 "fileformat" idem
456 "enc" overrides 'fileencoding'
457 "encoding" idem
458 "bin" sets 'binary'
459 "binary" idem
460 "nobin" resets 'binary'
461 "nobinary" idem
462 "bad" specifies behavior for bad characters, see
463 |++bad|
464
451 Example in JSON: > 465 Example in JSON: >
452 ["drop", "path/file.txt", {"ff": "dos"}] 466 ["drop", "path/file.txt", {"ff": "dos"}]
453 467
454 A trick to have Vim send this escape sequence: > 468 A trick to have Vim send this escape sequence: >
455 exe "set t_ts=\<Esc>]51; t_fs=\x07" 469 exe "set t_ts=\<Esc>]51; t_fs=\x07"