Commit Graph

132 Commits

Author SHA1 Message Date
Jonathan de Boyne Pollard
533f5c38c4 doco: Note some common $TERM mistakes and how to fix them.
Also explain more clearly the difference between Vim and Nvim
when it comes to built-in terminfo entries.
2017-06-03 18:53:28 +01:00
Jonathan de Boyne Pollard
d65cff9de8 doc: Document some more terminal behaviours.
This documents 256-colour and true colour handling, cursor shapes,
and scrolling regions.

Almost all of these headings are taken from the Vim doco, so that
the :help commands that people learn are a transferable skill.
2017-06-03 18:53:27 +01:00
Jonathan de Boyne Pollard
6be921b71c doc: Relegate xterm-8bit to a removed feature. 2017-06-03 18:53:27 +01:00
Justin M. Keyes
872465cf1d doc 2017-05-21 00:01:52 +02:00
Justin M. Keyes
8e052f677e Merge #6737 "options: make 'highlight' read-only" 2017-05-15 14:53:31 +02:00
Björn Linse
8d8b6224d9 options: make 'highlight' read-only 2017-05-15 07:22:31 +02:00
Justin M. Keyes
17531ed082 Merge #6480 from ZyX-I/colored-cmdline'/input-dict 2017-05-13 21:17:33 +02:00
ZyX
d01f140bb3 doc: Add a note to vim_diff.txt 2017-05-13 18:16:41 +03:00
Justin M. Keyes
edfe0980f1 doc: Lua (#6722)
Closes #6705
2017-05-11 17:45:11 +02:00
ZyX
09f849b600 Merge branch 'master' into luaviml'/lua 2017-05-08 15:43:45 +03:00
Justin M. Keyes
45ef3d9d0c doc: Replace hardcoded TOCs with <M-]> advice. 2017-05-01 17:48:06 +02:00
Justin M. Keyes
fa1ee0ac73 doc: bracketed-paste-mode 2017-05-01 14:55:26 +02:00
Justin M. Keyes
0df1b6655b doc: Removed t_XX options/keycodes. (#6616)
Closes #4482

TODO: revisit find_key_option_len()
2017-04-29 16:56:40 +02:00
ZyX
043d8ff9f2 Merge branch 'master' into luaviml'/lua 2017-04-08 01:54:58 +03:00
Yichao Zhou
bc6d868d00 'listchars': Whitespace highlight group #6367 2017-04-03 14:10:40 +02:00
Justin M. Keyes
c2826a7830 'guicursor': Empty means "block cursor in all modes".
Also: update default 'guicursor' to match the documentation.
2017-04-01 23:14:05 +02:00
Justin M. Keyes
33ff29fc74 Merge #6344 'vim-patch:7.4.2236,7.4.2306' 2017-04-01 17:42:15 +02:00
ZyX
ebad046220 doc: Update vim_diff data regarding ShaDa 2017-03-27 00:13:16 +03:00
ZyX
279e3410cf doc: Update vim_diff.txt 2017-03-27 00:13:16 +03:00
Justin M. Keyes
82c67768fa doc: Replace "For Vim ... Last change ..." headers (#6328) 2017-03-21 17:08:19 +01:00
Justin M. Keyes
a90beeadbb defaults: 'showcmd', 'belloff', 'ruler'
- Vim "unix default" of 'noshowcmd' is serving few users. And it's
  inconsistent.
- 'ruler' and 'belloff=all' improve the out-of-the-box experience.
- Continue to use 'noshowcmd' and 'noruler' by default in the functional
  tests to keep them fast.

TODO: Add a "disable slow stuff" command or mapping to address the
use-case of a very slow terminal connection.
2017-03-16 18:44:10 +01:00
Justin M. Keyes
36fd879b25 doc: eval.txt fixup, README.md 2017-03-13 15:50:50 +01:00
raichoo
1743df82f9 'cpoptions': "_" flag to toggle cw behaviour #6235
`cw` and `cW` behave like `ce` and `cE` respectively. This is
inconsistent compared to `dw` and `dW`.
Introduce a new cpoptions flag "_" to toggle the Vi behavior.

Closes #6234
Patch-by: Christian Brabandt <cblists@256bit.org>

References:
https://github.com/chrisbra/vim-mq-patches/blob/master/cpo_changeword
https://groups.google.com/d/msg/vim_use/aaBqT6ECkA4/ALf4odKzEDgJ
https://groups.google.com/d/msg/vim_dev/Dpn3xtUF16I/T6JcOPKN6usJ
http://www.reddit.com/r/vim/comments/26nut8/why_does_cw_work_like_ce/
2017-03-10 19:24:04 +01:00
Justin M. Keyes
22337b1c01 Merge #6137 from justinmk/cmdline-ctrl-r
cmdline: CTRL-R: Omit trailing ^M character
2017-02-19 14:20:52 +01:00
Justin M. Keyes
baab49ee89 cmdline: CTRL-R: Omit trailing <CR>.
The "technically correct" interpretation is to execute the first line
that is seen (and this is what happens on middle-click paste in Vim).
^M is only intended to "defuse" the newline, so the user can review it.

The parent commit changed the behavior to insert <Space> between lines,
but that's a higher-risk change: it is arguably possible that some user
*wants* the literal ^M chars when e.g. assigning to a register:
    :let @a='<C-R>b'

To avoid that risk, keep the old behavior and only omit the last ^M.
This makes `yy:<C-R>0` nicer at no cost.
2017-02-18 23:24:35 +01:00
Justin M. Keyes
308ccb6f5e cmdline: CTRL-R: <Space> instead of CR between lines.
^M isn't any more "correct" than space: the "technically correct"
interpretation is to execute the first line that is seen (and this is
what happens on middle-click paste in Vim). ^M is only intended to
defuse the newline, so that the user can review the command. We can do
that with a space instead, and then the command can be executed without
having to fix it up first.
2017-02-18 14:49:05 +01:00
Justin M. Keyes
158ea52854 options: Remove 'esckeys' (#6138)
This was never supported and it does not make sense for Nvim.
2017-02-18 14:01:20 +01:00
Nikolai Aleksandrovich Pavlov
abdbfd26bc eval: Add id() function and make printf("%p") return something useful (#6095) 2017-02-11 19:47:02 +01:00
Justin M. Keyes
224f99b85d win: Append process dir to $PATH
This allows executables to be found by :!, system(), and executable() if
they live next to ("sibling" to) nvim.exe. This is what gvim on Windows
does, and also matches the behavior of Win32 SearchPath().

c4a249a736/src/os_win32.c (L354-L370)
2017-02-04 11:07:49 +01:00
Justin M. Keyes
81525dc5c3 defaults: Revert 'mouse=a' (#6022)
This default causes too much confusion for terminal users. Until
a better approach is implemented, revert to the traditional default.

Better solution would be:
- Implement a right-click menu for TUI
- Set 'mouse=a' *only* if clipboard is working.

Closes #5938
2017-01-28 14:30:57 +01:00
Marco Hinz
20867e6319
Document DirChanged 2017-01-13 15:30:01 +01:00
Justin M. Keyes
e43f7425ee refactor: Remove VimL function test()
vim-patch:7.4.1838
2017-01-04 07:23:13 +01:00
Michael Ennen
2c4e92abea vim-patch:7.4.1731 Mark as NA
Leave a note in vim_diff.txt about it.
2016-12-12 10:17:35 -05:00
Justin M. Keyes
cb58999007 os/shell: do_os_system(): Always show last chunk.
This ameliorates use-cases like:
    :!cat foo.txt
    :make
where the user is interested in the last few lines of output.

Try these shell-based ex-commands before/after this commit:
    :grep -r '' *
    :make
    :!yes
    :!grep -r '' *
    :!git grep ''
    :!cat foo
    :!echo foo
    :!while true; do date; done
    :!for i in `seq 1 20000`; do echo XXXXXXXXXX $i; done

In all cases the last few lines of the command should always be shown,
regardless of where throttling was triggered.
2016-12-10 01:26:34 +01:00
Justin M. Keyes
97204e1cef os/shell: Throttle :! output, pulse "..." message.
Periodically skip :! spam. This is a "cheat" that works for all UIs and greatly
improves responsiveness when :! spams MB or GB of output:
    :!yes
    :!while true; do date; done
    :!git grep ''
    :grep -r '' *

After ~10KB of data is seen from a single :! invocation, output will be skipped
for ~1s and three dots "..." will pulse in the bottom-left. Thereafter the
behavior alternates at every:
    * 10KB received
    * ~1s throttled

This also avoids out-of-memory which could happen with large :! outputs.

Note: This commit does not change the behavior of execute(':!foo').
      execute(':!foo') returns the string ':!foo^M', it captures *only* Vim
      messages, *not* shell command output. Vim behaves the same way.
      Use system('foo') for capturing shell command output.

Closes #1234

Helped-by: oni-link <knil.ino@gmail.com>
2016-12-09 18:51:17 +01:00
Justin M. Keyes
0213e99aaf Merge #5561 'inccommand'
Initial work by:
  Robin Elrharbi-Fleury (Robinhola)
  Audrey Rayé (Adrey06)
  Philémon Hullot (DesbyP)
  Aymeric Collange (aym7)
  Clément Guyomard (Clement0)

Major revisions by:
  KillTheMule
  Björn Linse <bjorn.linse@gmail.com>
  Justin M. Keyes <justinkz@gmail.com>
2016-11-09 03:19:22 +01:00
Justin M. Keyes
6a3f8d48d0 'inccommand': rename 'incsubstitute'
'inccommand' allows us to expand the feature to other commands, such as:
    :cdo
    :cfdo
    :global

Also rename "IncSubstitute" highlight group to "Substitute".
2016-11-08 21:22:13 +01:00
Justin M. Keyes
d0689eb0b2 'inccommand': disable 'cursorline', 'spell' in preview 2016-11-08 21:21:43 +01:00
Justin M. Keyes
c04ffe866d 'inccommand': rework
- Eliminate/isolate static/global variables
- Remove special-case parameter from buflist_new()
- Remove special-case ECMD_RESERVED_BUFNR
- To determine when u_undo_and_forget() should be done, check
  b_changedtick instead of a heuristic.
- use mb_string2cells() instead of strlen() to measure the :sub patterns
- call ml_close() before buf_clear_file(). Avoids leaks caught by ASan.

Original patch by:
  Robin Elrharbi-Fleury (Robinhola)
  Audrey Rayé (Adrey06)
  Philémon Hullot (DesbyP)
  Aymeric Collange (aym7)
  Clément Guyomard (Clement0)
2016-11-08 21:20:08 +01:00
Björn Linse
4ab3fe8eaa encoding: update documentation 2016-11-05 14:49:24 +01:00
James McCoy
d37c2e5dc2 doc: Remove features from vim_diff which have been merged upstream (#5554)
- TabNew/TabClosed: Introduced in 7.4.2075 and 7.4.2077
- hl-EndOfBuffer: Introduced in 7.4.2213
2016-10-31 17:26:32 +01:00
Justin M. Keyes
fb4d5b0516 CheckHealth: check for sensible.vim 2016-10-28 13:54:08 +02:00
Justin M. Keyes
f96dfae52f doc; vim-patch.sh
Also include missing changes from:
06d2d38ab7
26852128a2
2016-10-24 13:26:55 +02:00
Justin M. Keyes
9706664b88 system('foo &', 'bar'): Show error, don't crash.
Closes #3529
Closes #5241

In Vim,
    :echo system('cat - &', 'foo')
works because for both system() and :! Vim writes input to a temp file and uses
shell syntax to redirect the file to the backgrounded `cat` (get_cmd_output()
.. make_filter_cmd()).

In Nvim,
    :echo system('cat - &', 'foo')
fails because we write the input directly via pipes (shell.c:do_os_system()),
but (per POSIX[1]) backgrounded process input stream is redirected from
/dev/null (unless overridden by shell redirection; supported only by some shells
[2]), so our writes are ignored, the process exits quickly, and if we are
writing data larger than the buffer size we'll see EPIPE.

This still works:
    :%w !tee > foo1358.txt &
but this does not:
    :%w !tee foo1358.txt &
though it *should* (why doesn't it?) because we still do the temp file dance
in do_bang() .. do_filter().

[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03_02
[2] http://unix.stackexchange.com/a/71218
2016-10-19 01:39:05 +02:00
Justin M. Keyes
16da3a6fe0 test: system(): backgrounded shell command
These tests are essentially affirming a regression vs Vim. In Vim,
    :echo system('cat - &', 'foo')
returns "foo", because Vim internally wraps the command with shell-specific
syntax to redirect the streams from /dev/null[1].

That can't work in Nvim because we use pipes directly (instead of temp files)
and don't wrap the command with shell-specific redirection syntax.

References #3529
References #5241

[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03_02
2016-10-19 01:01:27 +02:00
Justin M. Keyes
6fc122e600 doc 2016-10-16 18:08:53 +02:00
Justin M. Keyes
d57f25e5ef doc/vim_diff.txt (#5432) 2016-10-06 09:45:24 +02:00
Justin M. Keyes
e65895941c doc/deprecated.txt (#5338)
`deprecated.txt` is a place for deprecated tags to live.
- Encourages aggressive documentation of deprecations without cluttering
  the main help files.
- Provides a single browsable reference of all deprecations.

Other changes:
- Move tags to doc/vim_diff.txt.
- Remove doc/quotes.txt. It has little historical value, except maybe the
  Larry Wall quote.
2016-09-24 15:07:49 +02:00
Justin M. Keyes
46475a1021 release.sh: Touch NVIM_VERSION_PATCH, show obnoxious message.
git-log-pretty-since.sh: fix bug
2016-08-22 15:39:14 -04:00
Justin M. Keyes
ed49d9d866 CheckHealth: Accept [plugin1 [, plugin2 [, ...]]] args.
To healthcheck the "foo" plugin:
    :CheckHealth foo
To healthcheck the "foo" and "bar" plugins:
    :CheckHealth foo bar
To run all auto-discovered healthchecks:
    :CheckHealth
2016-08-21 22:03:28 -04:00