aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/vim_diff.txt
blob: 27c953a46098ac6a42254b65d29b803b40639c7f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
*vim_diff.txt*    Nvim


			    NVIM REFERENCE MANUAL


Differences between Nvim and Vim			       *vim-differences*

Nvim differs from Vim in many ways, although editor and Vimscript (not
Vim9script) features are mostly identical.  This document is a complete and
centralized reference of the differences.

				      Type |gO| to see the table of contents.

==============================================================================
1. Configuration					    *nvim-config*

- Use `$XDG_CONFIG_HOME/nvim/init.vim` instead of `.vimrc` for your |config|.
- Use `$XDG_CONFIG_HOME/nvim` instead of `.vim` to store configuration files.
- Use `$XDG_STATE_HOME/nvim/shada/main.shada` instead of `.viminfo` for persistent
  session information.  |shada|

==============================================================================
2. Defaults					            *nvim-defaults*

- Filetype detection is enabled by default. This can be disabled by adding
  ":filetype off" to |init.vim|.
- Syntax highlighting is enabled by default. This can be disabled by adding
  ":syntax off" to |init.vim|.

- 'autoindent' is enabled
- 'autoread' is enabled
- 'background' defaults to "dark" (unless set automatically by the terminal/UI)
- 'backspace' defaults to "indent,eol,start"
- 'backupdir' defaults to .,~/.local/state/nvim/backup// (|xdg|), auto-created
- 'belloff' defaults to "all"
- 'compatible' is always disabled
- 'complete' excludes "i"
- 'cscopeverbose' is enabled
- 'directory' defaults to ~/.local/state/nvim/swap// (|xdg|), auto-created
- 'display' defaults to "lastline,msgsep"
- 'encoding' is UTF-8 (cf. 'fileencoding' for file-content encoding)
- 'fillchars' defaults (in effect) to "vert:│,fold:·,sep:│"
- 'formatoptions' defaults to "tcqj"
- 'fsync' is disabled
- 'hidden' is enabled
- 'history' defaults to 10000 (the maximum)
- 'hlsearch' is enabled
- 'incsearch' is enabled
- 'joinspaces' is disabled
- 'langnoremap' is enabled
- 'langremap' is disabled
- 'laststatus' defaults to 2 (statusline is always shown)
- 'listchars' defaults to "tab:> ,trail:-,nbsp:+"
- 'mouse' defaults to "nvi"
- 'mousemodel' defaults to "popup_setpos"
- 'nrformats' defaults to "bin,hex"
- 'ruler' is enabled
- 'sessionoptions' includes "unix,slash", excludes "options"
- 'shortmess' includes "F", excludes "S"
- 'showcmd' is enabled
- 'sidescroll' defaults to 1
- 'smarttab' is enabled
- 'startofline' is disabled
- 'switchbuf' defaults to "uselast"
- 'tabpagemax' defaults to 50
- 'tags' defaults to "./tags;,tags"
- 'ttimeoutlen' defaults to 50
- 'ttyfast' is always set
- 'undodir' defaults to ~/.local/state/nvim/undo// (|xdg|), auto-created
- 'viewoptions' includes "unix,slash", excludes "options"
- 'viminfo' includes "!"
- 'wildmenu' is enabled
- 'wildoptions' defaults to "pum,tagfile"

- |man.vim| plugin is enabled, so |:Man| is available by default.
- |matchit| plugin is enabled. To disable it in your config: >
    :let loaded_matchit = 1

- |g:vimsyn_embed| defaults to "l" to enable Lua highlighting


Default Mouse ~
						*default-mouse* *disable-mouse*
By default the mouse is enabled.  The right button click opens |popup-menu|
with standard actions, such as "Cut", "Copy" and "Paste".

If you don't like this you can add to your |config| any of the following:

- ignore mouse completely >
  set mouse=
<
- no |popup-menu| but the right button extends selection >
  set mousemodel=extend
>
- pressing ALT+LeftMouse releases mouse until main cursor moves  >
  nnoremap <M-LeftMouse> <Cmd>
    \ set mouse=<Bar>
    \ echo 'mouse OFF until next cursor-move'<Bar>
    \ autocmd CursorMoved * ++once set mouse&<Bar>
    \ echo 'mouse ON'<CR>
<
Also, mouse is not in use in |command-mode| or at |more-prompt|.  So if you
need to copy/paste with your terminal then just pressing ':' makes Nvim to
release the mouse cursor temporarily.

Default Mappings ~
							*default-mappings*
Nvim creates the following default mappings at |startup|. You can disable any
of these in your config by simply removing the mapping, e.g. ":unmap Y".
>
	nnoremap Y y$
	nnoremap <C-L> <Cmd>nohlsearch<Bar>diffupdate<Bar>normal! <C-L><CR>
	inoremap <C-U> <C-G>u<C-U>
	inoremap <C-W> <C-G>u<C-W>
	xnoremap * y/\V<C-R>"<CR>
	xnoremap # y?\V<C-R>"<CR>
	nnoremap & :&&<CR>
<
Default Autocommands ~
							*default-autocmds*
Default autocommands exist in the following groups. Use ":autocmd! {group}" to
remove them and ":autocmd {group}" to see how they're defined.

nvim_terminal:
- BufReadCmd: Treats "term://" buffers as |terminal| buffers. |terminal-start|

nvim_cmdwin:
- CmdwinEnter: Limits syntax sync to maxlines=1 in the |cmdwin|.

==============================================================================
3. New Features						       *nvim-features*

MAJOR COMPONENTS ~

API				|API|
Job control			|job-control|
LSP framework			|lsp|
Lua scripting			|lua|
Parsing engine			|treesitter|
Providers
  Clipboard			|provider-clipboard|
  Node.js plugins		|provider-nodejs|
  Python plugins		|provider-python|
  Ruby plugins			|provider-ruby|
Remote plugins			|remote-plugin|
Shared data			|shada|
Terminal emulator		|terminal|
Vimscript parser		|nvim_parse_expression()|
XDG base directories		|xdg|

USER EXPERIENCE  ~

Working intuitively and consistently is a major goal of Nvim.

							*feature-compile*
- Nvim always includes ALL features, in contrast to Vim (which ships with
  various combinations of 100+ optional features). Think of it as a leaner
  version of Vim's "HUGE" build. This reduces surface area for bugs, and
  removes a common source of confusion and friction for users.

- Nvim avoids features that cannot be provided on all platforms; instead that
  is delegated to external plugins/extensions. E.g. the `-X` platform-specific
  option is "sometimes" available in Vim (with potential surprises:
  http://stackoverflow.com/q/14635295).

- Vim's internal test functions (test_autochdir(), test_settime(), etc.) are
  not exposed (nor implemented); instead Nvim has a robust API.

- Behaviors, options, documentation are removed if they cost users more time
  than they save.

Usability details have been improved where the benefit outweighs any
backwards-compatibility cost. Some examples:

- Directories for 'directory' and 'undodir' are auto-created.
- Terminal features such as 'guicursor' are enabled where possible.

Some features are built in that otherwise required external plugins:

- Highlighting the yanked region, see |lua-highlight|.

ARCHITECTURE ~

External plugins run in separate processes. |remote-plugin| This improves
stability and allows those plugins to work without blocking the editor. Even
"legacy" Python and Ruby plugins which use the old Vim interfaces (|if_pyth|,
|if_ruby|) run out-of-process.

Platform and I/O facilities are built upon libuv. Nvim benefits from libuv
features and bug fixes, and other projects benefit from improvements to libuv
by Nvim developers.

FEATURES ~

Command-line highlighting:
  The expression prompt (|@=|, |c_CTRL-R_=|, |i_CTRL-R_=|) is highlighted
  using a built-in Vimscript expression parser. |expr-highlight|
					*E5408* *E5409*
  |input()|, |inputdialog()| support custom highlighting. |input()-highlight|
					*g:Nvim_color_cmdline*
  (Experimental) Command-line (|:|) is colored by callback defined in
  `g:Nvim_color_cmdline` (this callback is for testing only, and will be
  removed in the future).

Commands:
  |:checkhealth|
  |:drop| is always available
  |:Man| is available by default, with many improvements such as completion
  |:sign-define| accepts a `numhl` argument, to highlight the line number
  |:match| can be invoked before highlight group is defined
  |:source| works with Lua and anonymous (no file) scripts
  User commands can support |:command-preview| to show results as you type

Events:
  |RecordingEnter|
  |RecordingLeave|
  |SearchWrapped|
  |Signal|
  |TabNewEntered|
  |TermClose|
  |TermOpen|
  |UIEnter|
  |UILeave|

Functions:
  |dictwatcheradd()| notifies a callback whenever a |Dict| is modified
  |dictwatcherdel()|
  |menu_get()|
  |msgpackdump()|, |msgpackparse()| provide msgpack de/serialization
  |stdpath()|
  |system()|, |systemlist()| can run {cmd} directly (without 'shell')
  |matchadd()| can be called before highlight group is defined

Highlight groups:
  |highlight-blend| controls blend level for a highlight group
  |expr-highlight| highlight groups (prefixed with "Nvim")
  |hl-NormalFloat| highlights floating window
  |hl-NormalNC| highlights non-current windows
  |hl-MsgArea| highlights messages/cmdline area
  |hl-MsgSeparator| highlights separator for scrolled messages
  |hl-Substitute|
  |hl-TermCursor|
  |hl-TermCursorNC|
  |hl-WinSeparator| highlights window separators
  |hl-Whitespace| highlights 'listchars' whitespace

Input/Mappings:
  ALT (|META|) chords always work (even in the |TUI|). Map |<M-| with any key:
  <M-1>, <M-BS>, <M-Del>, <M-Ins>, <M-/>, <M-\>, <M-Space>, <M-Enter>, etc.
  Case-sensitive: <M-a> and <M-A> are two different keycodes.

  ALT may behave like <Esc> if not mapped. |i_ALT| |v_ALT| |c_ALT|

Normal commands:
  |gO| shows a filetype-defined "outline" of the current buffer.

Options:
  'cpoptions'   flags: |cpo-_|
  'display'     flags: "msgsep" minimizes scrolling when showing messages
  'guicursor'   works in the terminal
  'fillchars'   flags: "msgsep" (see 'display'), "horiz", "horizup",
                "horizdown", "vertleft", "vertright", "verthoriz"
  'foldcolumn'  supports up to 9 dynamic/fixed columns
  'inccommand'  shows interactive results for |:substitute|-like commands
                and |:command-preview| commands
  'laststatus'  global statusline support
  'mousescroll' amount to scroll by when scrolling with a mouse
  'pumblend'    pseudo-transparent popupmenu
  'scrollback'
  'signcolumn'  supports up to 9 dynamic/fixed columns
  'statusline'  supports unlimited alignment sections
  'tabline'     %@Func@foo%X can call any function on mouse-click
  'wildoptions' "pum" flag to use popupmenu for wildmode completion
  'winblend'    pseudo-transparency in floating windows |api-floatwin|
  'winhighlight' window-local highlights

Signs:
  Signs are removed if the associated line is deleted.

Variables:
  |v:progpath| is always absolute ("full")
  |v:windowid| is always available (for use by external UIs)

==============================================================================
4. Changed features					 *nvim-features-changed*

Nvim always builds with all features, in contrast to Vim which may have
certain features removed/added at compile-time. |feature-compile|

Some Vim features were changed in Nvim, and vice versa.

If a Python interpreter is available on your `$PATH`, |:python| and |:python3|
are always available and may be used simultaneously. See |provider-python|.

|:redir| nested in |execute()| works.

|mkdir()| behaviour changed:
1. Assuming /tmp/foo does not exist and /tmp can be written to
   mkdir('/tmp/foo/bar', 'p', 0700) will create both /tmp/foo and /tmp/foo/bar 
   with 0700 permissions. Vim mkdir will create /tmp/foo with 0755.
2. If you try to create an existing directory with `'p'` (e.g. mkdir('/',
   'p')) mkdir() will silently exit. In Vim this was an error.
3. mkdir() error messages now include strerror() text when mkdir fails.

|string()| and |:echo| behaviour changed:
1. No maximum recursion depth limit is applied to nested container
   structures.
2. |string()| fails immediately on nested containers, not when recursion limit
   was exceeded.
2. When |:echo| encounters duplicate containers like >

       let l = []
       echo [l, l]
<
   it does not use "[...]" (was: "[[], [...]]", now: "[[], []]"). "..." is
   only used for recursive containers.
3. |:echo| printing nested containers adds "@level" after "..." designating
   the level at which recursive container was printed: |:echo-self-refer|.
   Same thing applies to |string()| (though it uses construct like
   "{E724@level}"), but this is not reliable because |string()| continues to
   error out.
4. Stringifyed infinite and NaN values now use |str2float()| and can be evaled
   back.
5. (internal) Trying to print or stringify VAR_UNKNOWN in Vim results in 
   nothing, E908, in Nvim it is internal error.

|json_decode()| behaviour changed:
1. It may output |msgpack-special-dict|.
2. |msgpack-special-dict| is emitted also in case of duplicate keys, while in 
   Vim it errors out.
3. It accepts only valid JSON.  Trailing commas are not accepted.

|json_encode()| behaviour slightly changed: now |msgpack-special-dict| values 
are accepted, but |v:none| is not.

Viminfo text files were replaced with binary (messagepack) ShaDa files.
Additional differences:

- |shada-c| has no effect.
- |shada-s| now limits size of every item and not just registers.
- 'viminfo' option got renamed to 'shada'. Old option is kept as an alias for
  compatibility reasons.
- |:wviminfo| was renamed to |:wshada|, |:rviminfo| to |:rshada|.  Old
  commands are still kept.
- ShaDa file format was designed with forward and backward compatibility in
  mind. |shada-compatibility|
- Some errors make ShaDa code keep temporary file in-place for user to decide
  what to do with it.  Vim deletes temporary file in these cases.
  |shada-error-handling|
- ShaDa file keeps search direction (|v:searchforward|), viminfo does not.

|printf()| returns something meaningful when used with `%p` argument: in Vim 
it used to return useless address of the string (strings are copied to the 
newly allocated memory all over the place) and fail on types which cannot be 
coerced to strings. See |id()| for more details, currently it uses 
`printf("%p", {expr})` internally.

|c_CTRL-R| pasting a non-special register into |cmdline| omits the last <CR>.

|CursorMoved| always triggers when moving between windows.

Lua interface (|lua.txt|):

- `:lua print("a\0b")` will print `a^@b`, like with `:echomsg "a\nb"` . In Vim
  that prints `a` and `b` on separate lines, exactly like
  `:lua print("a\nb")` .
- `:lua error('TEST')` emits the error “E5105: Error while calling lua chunk:
  [string "<VimL compiled string>"]:1: TEST”, whereas Vim emits only “TEST”.
- Lua has direct access to Nvim |API| via `vim.api`.
- Lua package.path and package.cpath are automatically updated according to
  'runtimepath': |lua-require|.

Commands:
  |:doautocmd| does not warn about "No matching autocommands".

Functions:
  |input()| and |inputdialog()| support for each other’s features (return on
  cancel and completion respectively) via dictionary argument (replaces all
  other arguments if used), and "cancelreturn" can have any type if passed in
  a dictionary.
  |input()| and |inputdialog()| support user-defined cmdline highlighting.

Highlight groups:
  |hl-ColorColumn|, |hl-CursorColumn| are lower priority than most other
  groups
  |hl-CurSearch| highlights match under cursor instead of last match found
  using |n| or |N|
  |hl-CursorLine| is low-priority unless foreground color is set
  |hl-VertSplit| superseded by |hl-WinSeparator|

Macro/|recording| behavior
  Replay of a macro recorded during :lmap produces the same actions as when it
  was recorded. In Vim if a macro is recorded while using :lmap'ped keys then
  the behaviour during record and replay differs.

  'keymap' is implemented via :lmap instead of :lnoremap so that you can use
  macros and 'keymap' at the same time. This also means you can use |:imap| on
  the results of keys from 'keymap'.

Mappings:
  Creating a mapping for a simplifiable key (e.g. <C-I>) doesn't replace an
  existing mapping for its simplified form (e.g. <Tab>).

Motion:
  The |jumplist| avoids useless/phantom jumps.

Normal commands:
  |Q| replays the last recorded macro instead of switching to Ex mode.
  Instead |gQ| can be used to enter Ex mode.

Options:
  'ttimeout', 'ttimeoutlen' behavior was simplified
  |jumpoptions| "stack" behavior
  |jumpoptions| "view" tries to restore the |mark-view| when moving through
  the |jumplist|, |changelist|, |alternate-file| or using |mark-motions|.
  'shortmess' the "F" flag does not affect output from autocommands

Shell:
  Shell output (|:!|, |:make|, …) is always routed through the UI, so it
  cannot "mess up" the screen. (You can still use "chansend(v:stderr,…)" if
  you want to mess up the screen :)

  Nvim throttles (skips) messages from shell commands (|:!|, |:grep|, |:make|)
  if there is too much output. No data is lost, this only affects display and
  improves performance. |:terminal| output is never throttled.

  |:!| does not support "interactive" commands. Use |:terminal| instead.
  (GUI Vim has a similar limitation, see ":help gui-pty" in Vim.)

  :!start is not special-cased on Windows.

  |system()| does not support writing/reading "backgrounded" commands. |E5677|

Startup:
  |-e| and |-es| invoke the same "improved Ex mode" as -E and -Es.
  |-E| and |-Es| read stdin as text (into buffer 1).
  |-es| and |-Es| have improved behavior:
    - Quits automatically, don't need "-c qa!".
    - Skips swap-file dialog.
  |-s| reads Normal commands from stdin if the script name is "-".
  Reading text (instead of commands) from stdin |--|:
    - works by default: "-" file is optional
    - works in more cases: |-Es|, file args

Syntax highlighting:
  syncolor.vim has been removed. Nvim now sets up default highlighting groups
  automatically for both light and dark backgrounds, regardless of whether or
  not syntax highlighting is enabled. This means that |:syntax-on| and
  |:syntax-enable| are now identical. Users who previously used an
  after/syntax/syncolor.vim file should transition that file into a
  colorscheme. |:colorscheme|

TUI:
			*:set-termcap*
  Start Nvim with 'verbose' level 3 to show terminal capabilities: >
	nvim -V3
<
			*'term'* *E529* *E530* *E531*
  'term' reflects the terminal type derived from |$TERM| and other environment
  checks.  For debugging only; not reliable during startup. >
	  :echo &term
<  "builtin_x" means one of the |builtin-terms| was chosen, because the expected
  terminfo file was not found on the system.

  Nvim will use 256-colour capability on Linux virtual terminals.  Vim uses
  only 8 colours plus bright foreground on Linux VTs.

  Vim combines what is in its |builtin-terms| with what it reads from terminfo,
  and has a 'ttybuiltin' setting to control how that combination works.  Nvim
  uses one or the other, it does not attempt to merge the two.

UI/Display:
  |Visual| selection highlights the character at cursor. |visual-use|

Vimscript compatibility:
  `count` does not alias to |v:count|
  `errmsg` does not alias to |v:errmsg|
  `shell_error` does not alias to |v:shell_error|
  `this_session` does not alias to |v:this_session|

Working directory (Vim implemented some of these later than Nvim):
- |DirChanged| and |DirChangedPre| can be triggered when switching to another
  window or tab.
- |getcwd()| and |haslocaldir()| may throw errors if the tab page or window
  cannot be found.  *E5000* *E5001* *E5002*
- |haslocaldir()| checks for tab-local directory if and only if -1 is passed as
  window number, and its only possible returns values are 0 and 1.
- `getcwd(-1)` is equivalent to `getcwd(-1, 0)` instead of returning the global
  working directory. Use `getcwd(-1, -1)` to get the global working directory.

==============================================================================
5. Missing legacy features				 *nvim-features-missing*

Some legacy Vim features are not implemented:

- |if_lua|: Nvim Lua API is not compatible with Vim's "if_lua"
- *if_mzscheme*
- |if_py|: *python-bindeval* *python-Function* are not supported
- *if_tcl*

==============================================================================
6. Removed features					 *nvim-features-removed*

These Vim features were intentionally removed from Nvim.

Aliases:
  ex        (alias for "nvim -e")
  exim      (alias for "nvim -E")
  gex       (GUI)
  gview     (GUI)
  gvim      (GUI)
  gvimdiff  (GUI)
  rgview    (GUI)
  rgvim     (GUI)
  rview
  rvim
  view      (alias for "nvim -R")
  vimdiff   (alias for "nvim -d" |diff-mode|)

Commands:
  :fixdel
  :helpfind
  :mode (no longer accepts an argument)
  :open
  :Print
  :promptfind
  :promptrepl
  :scriptversion (always version 1)
  :shell
  :sleep! (does not hide the cursor; same as :sleep)
  :smile
  :tearoff

Compile-time features:
  Emacs tags support
  X11 integration (see |x11-selection|)

Eval:
  Vim9script
  *js_encode()*
  *js_decode()*
  *v:none* (used by Vim to represent JavaScript "undefined"); use |v:null| instead.
  *v:sizeofint*
  *v:sizeoflong*
  *v:sizeofpointer*

Events:
  *SigUSR1* Use |Signal| to detect `SIGUSR1` signal instead.

Highlight groups:
  *hl-StatusLineTerm* *hl-StatusLineTermNC* are unnecessary because Nvim
    supports 'winhighlight' window-local highlights.
    For example, to mimic Vim's StatusLineTerm:  >
      hi StatusLineTerm ctermfg=black ctermbg=green
      hi StatusLineTermNC ctermfg=green
      autocmd TermOpen,WinEnter * if &buftype=='terminal'
        \|setlocal winhighlight=StatusLine:StatusLineTerm,StatusLineNC:StatusLineTermNC
        \|else|setlocal winhighlight=|endif
<

Options:
  'antialias'
  *'balloondelay'* *'bdlay'*
  *'ballooneval'* *'beval'* *'noballooneval'* *'nobeval'*
  *'balloonexpr'* *'bexpr'*
  'bioskey' (MS-DOS)
  'conskey' (MS-DOS)
  *'cp'* *'nocompatible'* *'nocp'* *'compatible'* (Nvim is always "nocompatible".)
  'cpoptions' (gjkHw<*- and all POSIX flags were removed)
  *'cryptmethod'* *'cm'* *'key'* (Vim encryption implementation)
  *'ed'* *'edcompatible'* *'noed'* *'noedcompatible'*
  'encoding' ("utf-8" is always used)
  'esckeys'
  'guioptions' "t" flag was removed
  *'guifontset'* *'gfs'* (Use 'guifont' instead.)
  *'guipty'* (Nvim uses pipes and PTYs consistently on all platforms.)
  'highlight' (Names of builtin |highlight-groups| cannot be changed.)
  *'imactivatefunc'* *'imaf'*
  *'imactivatekey'* *'imak'*
  *'imstatusfunc'* *'imsf'*
  *'insertmode'* *'im'* Use the following script to emulate 'insertmode':
>
    autocmd BufWinEnter * startinsert
    inoremap <Esc> <C-X><C-Z><C-]>
    inoremap <C-C> <C-X><C-Z>
    inoremap <C-L> <C-X><C-Z><C-]><Esc>
    inoremap <C-Z> <C-X><C-Z><Cmd>suspend<CR>
    noremap <C-C> <Esc>
    snoremap <C-C> <Esc>
    noremap <C-\><C-G> <C-\><C-N><Cmd>startinsert<CR>
    cnoremap <C-\><C-G> <C-\><C-N><Cmd>startinsert<CR>
    inoremap <C-\><C-G> <C-X><C-Z>
    autocmd CmdWinEnter * noremap <buffer> <C-C> <C-C>
    autocmd CmdWinEnter * inoremap <buffer> <C-C> <C-C>

    lua << EOF
      vim.on_key(function(c)
        if c == '\27' then
          local mode = vim.api.nvim_get_mode().mode
          if mode:find('^[nvV\22sS\19]') and vim.fn.getcmdtype() == '' then
            vim.schedule(function()
              vim.cmd('startinsert')
            end)
          end
        end
      end)
    EOF
<
  *'macatsui'*
  *'maxcombine'* *'mco'*
    Nvim always displays up to 6 combining characters.  You can still edit
    text with more than 6 combining characters, you just can't see them.
    Use |g8| or |ga|.  See |mbyte-combining|.
  'maxmem' Nvim delegates memory-management to the OS.
  'maxmemtot' Nvim delegates memory-management to the OS.
  *'prompt'* *'noprompt'*
  *'remap'* *'noremap'*
  *'restorescreen'* *'rs'* *'norestorescreen'* *'nors'*
  'shelltype'
  *'shortname'* *'sn'* *'noshortname'* *'nosn'*
  *'swapsync'* *'sws'*
  *'termencoding'* *'tenc'* (Vim 7.4.852 also removed this for Windows)
  *'terse'* *'noterse'* (Add "s" to 'shortmess' instead)
  'textauto'
  'textmode'
  *'toolbar'* *'tb'*
  *'toolbariconsize'* *'tbis'*
  *'ttybuiltin'* *'tbi'* *'nottybuiltin'* *'notbi'*
  *'ttyfast'* *'tf'* *'nottyfast'* *'notf'*
  *'ttymouse'* *'ttym'*
  *'ttyscroll'* *'tsl'*
  *'ttytype'* *'tty'*
  'weirdinvert'

Startup:
  --literal (file args are always literal; to expand wildcards on Windows, use
    |:n| e.g. `nvim +"n *"`)
  Easy mode: eview, evim, nvim -y
  Restricted mode: rview, rvim, nvim -Z
  Vi mode: nvim -v

Test functions:
  test_alloc_fail()
  test_autochdir()
  test_disable_char_avail()
  test_feedinput()
  test_garbagecollect_soon
  test_getvalue()
  test_ignore_error()
  test_null_blob()
  test_null_channel()
  test_null_dict()
  test_null_function()
  test_null_job()
  test_null_list()
  test_null_partial()
  test_null_string()
  test_option_not_set()
  test_override()
  test_refcount()
  test_scrollbar()
  test_setmouse()
  test_settime()
  test_srand_seed()

TUI:
			  *t_xx* *termcap-options* *t_AB* *t_Sb* *t_vb* *t_SI*
  Nvim does not have special `t_XX` options nor <t_XX> keycodes to configure
  terminal capabilities. Instead Nvim treats the terminal as any other UI,
  e.g. 'guicursor' sets the terminal cursor style if possible.

			  *termcap*
  Nvim never uses the termcap database, only |terminfo| and |builtin-terms|.

			  *xterm-8bit* *xterm-8-bit*
  Xterm can be run in a mode where it uses true 8-bit CSI.  Supporting this
  requires autodetection of whether the terminal is in UTF-8 mode or non-UTF-8
  mode, as the 8-bit CSI character has to be written differently in each case.
  Vim issues a "request version" sequence to the terminal at startup and looks
  at how the terminal is sending CSI.  Nvim does not issue such a sequence and
  always uses 7-bit control sequences.

==============================================================================
 vim:tw=78:ts=8:sw=2:et:ft=help:norl: