comparison runtime/doc/terminal.txt @ 23047:29c5f168c6fd

Update runtime files Commit: https://github.com/vim/vim/commit/23515b4ef7580af8b9d3b964a558ab2007cacda5 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 29 14:36:24 2020 +0100 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Sun, 29 Nov 2020 14:45:04 +0100
parents e7c125224b1a
children 15fa3923cc49
comparison
equal deleted inserted replaced
23046:9a30b28b8154 23047:29c5f168c6fd
1 *terminal.txt* For Vim version 8.2. Last change: 2020 Nov 15 1 *terminal.txt* For Vim version 8.2. Last change: 2020 Nov 25
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
121 You can also create menus similar to terminal mode mappings, but you have to 121 You can also create menus similar to terminal mode mappings, but you have to
122 use |:tlmenu| instead of |:tmenu|. 122 use |:tlmenu| instead of |:tmenu|.
123 123
124 *options-in-terminal* 124 *options-in-terminal*
125 After opening the terminal window and setting 'buftype' to "terminal" the 125 After opening the terminal window and setting 'buftype' to "terminal" the
126 TerminalOpen autocommand event is triggered. This makes it possible to set 126 |TerminalWinOpen| autocommand event is triggered. This makes it possible to set
127 options specifically for the window and buffer. Example: > 127 options specifically for the terminal window and buffer. Example: >
128 au TerminalOpen * if &buftype == 'terminal' | setlocal bufhidden=hide | endif 128 au TerminalWinOpen * setlocal bufhidden=hide
129 The <abuf> is set to the terminal buffer, but if there is no window (hidden 129
130 terminal) then setting options will happen in the wrong buffer, therefore the 130 There is also the |TerminalOpen| event, but this may be triggered for a hidden
131 check for &buftype in the example. 131 terminal, and the current window and buffer may not be for the new terminal.
132 You need to use <abuf>, which is set to the terminal buffer. Example: >
133 au TerminalOpen * call setbufvar(+expand('<abuf>'), '&colorcolumn', 123)
132 134
133 Mouse events (click and drag) are passed to the terminal. Mouse move events 135 Mouse events (click and drag) are passed to the terminal. Mouse move events
134 are only passed when Vim itself is receiving them. For a terminal that is 136 are only passed when Vim itself is receiving them. For a terminal that is
135 when 'balloonevalterm' is enabled. 137 when 'balloonevalterm' is enabled.
136 138
502 b different background color 504 b different background color
503 a different attribute 505 a different attribute
504 + missing position in first file 506 + missing position in first file
505 - missing position in second file 507 - missing position in second file
506 > cursor position in first file, not in second 508 > cursor position in first file, not in second
507 < cursor position in secone file, not in first 509 < cursor position in second file, not in first
508 510
509 Using the "s" key the top and bottom parts are swapped. This 511 Using the "s" key the top and bottom parts are swapped. This
510 makes it easy to spot a difference. 512 makes it easy to spot a difference.
511 513
512 Can also be used as a |method|: > 514 Can also be used as a |method|: >