Commit Graph

1007 Commits

Author SHA1 Message Date
Anmol Sethi
cf52b881d9
man.vim: no guarantee that the first line contains anything useful
Fixes #5628
2016-11-18 14:06:42 -05:00
Björn Linse
1d4563771b jobs: ensure calling jobclose() on a pty job sends SIGHUP. Closes #5619 2016-11-17 15:13:45 +01:00
James McCoy
108d54bbd4 Merge pull request #5600 from jamessan/vim-7.4.1640
vim-patch:7.4.1640,7.4.1647,7.4.1650,7.4.1664
2016-11-16 06:52:19 -05:00
James McCoy
c66ca17ca1
Merge pull request #5614 from Shougo/vim-7.4.2251
vim-patch:7.4.2251
2016-11-15 23:45:20 -05:00
James McCoy
c0fd830be4
Bump all nvim-specific error codes above E5000
In order to not conflict with new error codes that Vim adds, all Neovim
error codes should be above 5000.  The three existing sub-5000 error
codes (E926, E951, and E952) are now E50003, E5004, and E5005
respectively.

E953 was removed in 6167ce6df2, so just
remove it from the help.
2016-11-15 23:16:08 -05:00
James McCoy
7231438f12
vim-patch:7.4.1640
Problem:    Crash when an autocommand changes a quickfix list. (Dominique)
Solution:   Check wether an entry is still valid. (Yegappan Lakshmanan,
            Hirohito Higashi)

ffec3c5349
2016-11-15 23:16:08 -05:00
James McCoy
49f73e5275
vim-patch:7.4.1894
Problem:    Cannot get the window ID for a mouse click.
Solution:   Add v:mouse_winid.

511972d810
2016-11-15 22:00:25 -05:00
Shougo Matsushita
458b1fc0e7 vim-patch:7.4.2251
Problem:    In rare cases diffing 4 buffers is not enough.
Solution:   Raise the limit to 8. (closes vim/vim#1000)

015efc32c1
2016-11-16 08:55:17 +09:00
Justin M. Keyes
d28d108648 CheckHealth: Fix version comparison.
Compare numbers instead of strings.
2016-11-15 13:15:40 +01:00
Justin M. Keyes
01ef6fc3d2 Merge #5607 from justinmk/icm
'inccommand': auto-disable if too slow; fix other behaviors
2016-11-15 09:12:47 +01:00
Justin M. Keyes
91507c271e 'inccommand': Detect "non-interactive", "too slow".
command_line_changed:
  - Check (current_SID == 0) instead of KeyTyped
    - We want to update during mappings (KeyTyped is false then).
  - Check vpeekc_any()
    - Avoids unnecessary work.
    - Avoids triggering live preview during macros.
    - Caveat: This makes the redraw "stutter" if user spams (holds a key)
      in the replace pattern. But that scenario is not important.
  - Update screen if the command is changed to a non-live command.
    (`s->live` goes from true => false) => clears the preview
command_line_execute:
  - Let CTRL-C cancel live preview
do_sub:
  - Enforce a time limit ('redrawtime').
  - Unset 'inccommand' if time limit is reached.

Closes #5602
Closes #5585
2016-11-15 04:22:24 +01:00
James McCoy
9d2985ecba vim-patch:7.4.1658
Problem:    A plugin does not know when VimEnter autocommands were already
            triggered.
Solution:   Add the v:vim_did_enter variable.

1473551a44
2016-11-14 14:16:40 -05:00
Justin M. Keyes
598f5af58b Merge #5582 from justinmk/icm
'inccommand': Support :smagic/:snomagic. Less jumping around.
2016-11-12 13:32:48 +01:00
Tommy Allen
84eed76b55 CheckHealth: Include v:throwpoint in error message (#5575)
* health.vim: Include v:throwpoint in error message

* health/provider.vim: Check for ruby executable

* health/provider.vim: Combine subprocess stdout and stderr

* test: Updated CheckHealth test
2016-11-12 11:59:15 +01:00
Justin M. Keyes
2e1217da46 'inccommand': buftype=nofile, restore cursor/view
- Use a standard scratch buffer instead of a new 'buftype', functions
  like curbufIsChanged() already have special handling for scratch bufs.
- Cleanup some stuff from the previous merge.
- Add support for :smagic, :snomagic. Closes #5578
2016-11-10 15:48:00 +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
Marco Hinz
bd33f1165b CheckHealth: ignore non-existing markdownCodeBlock group (#5570)
People using [1] would experience an error, because their markdown syntax
doesn't define the markdownCodeBlock group.

[1]: https://github.com/plasticboy/vim-markdown

Closes #5569
2016-11-08 19:01:15 +01:00
Tommy Allen
3089c86f4e CheckHealth: timeout system() calls (#5565) 2016-11-08 14:34:03 +01:00
Björn Linse
4ab3fe8eaa encoding: update documentation 2016-11-05 14:49:24 +01:00
Marco Hinz
32d9c19e29 Health: introduce help links (#5557)
We can now use help links like in normal help pages. The bars around them will
be concealed as well.

* Health: link string "SUCCESS" to ModeMsg

So far we linked "SUCCESS" to the Function highlight group.

The newly introduced healthHelp group links to Idenfifier as it does for links
in normal help pages.

Now the problem is that the Function group links again to Identifier as well, so
both, "SUCCESS" and help links, would use the same colors.

* Health: don't use Markdown code blocks

Every line indented by more than 4 spaces would lose its highlighting otherwise.

* Health: add helper health#help_to_link()
2016-11-04 11:03:05 +01:00
Marco Hinz
3a802e3c16 provider/clipboard.vim: never show a warning on sourcing
Never throw an error when provider/clipboard.vim is sourced for the first time.
Save the error instead and expose it via `provider#clipboard#Error()`, mimicking
provider/python.vim.
2016-11-02 12:06:57 +01:00
Marco Hinz
797d72a997 health/provider.vim: add clipboard check 2016-11-02 12:06:54 +01:00
Marco Hinz
0a1b852cd1 provider/clipboard.vim: refactor 2016-11-02 12:04:43 +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
e427cdf2d4 doc/api: Closes #1842 2016-10-31 16:16:37 +01:00
KillTheMule
13841a56b4 Incsubsitution feature
Originally implemented by

* Clement0
* DesbyP
* aym7
* Adrey06
* Robinhola

in #4811. Major reworkings and bug
fixes by

* bfredl

Most tests suggested by ZyX-l, suggestions for improvements by oni-link.
2016-10-30 10:21:18 +01:00
J Phani Mahesh
3d49fc1f50 CheckHealth: fix check for tmux escape-time (#5545) 2016-10-29 14:48:19 +02:00
Justin M. Keyes
5b514b5988 Merge #5535 from justinmk/api_level
api: Nvim version + API level
2016-10-28 14:53:09 +02:00
Justin M. Keyes
c5f5f427c6 api: api_info()['version']
API level is disconnected from NVIM version. The API metadata holds the
current API level, and the lowest backwards-compatible level supported
by this instance.

Release 0.1.6 is the first release that reports the Nvim version and API
level.

    metadata['version'] = {
      major: 0,
      minor: 1,
      patch: 6,
      api_level: 1,
      api_compatible: 0,
      api_prerelease: false,
    }

The API level may remain unchanged across Nvim releases if the API has
not changed.

When changing the API,
    - set NVIM_API_PRERELEASE to true
    - increment NVIM_API_LEVEL (at most once per Nvim version)
    - adjust NVIM_API_LEVEL_COMPAT if backwards-compatibility was broken

api_level_0.mpack was generated from Nvim 0.1.5 with:
    nvim --api-info
2016-10-28 14:33:13 +02:00
Justin M. Keyes
fb4d5b0516 CheckHealth: check for sensible.vim 2016-10-28 13:54:08 +02:00
Rui Abreu Ferreira
f25797f869 api: Nvim version, API level #5386
The API level is disconnected from the NVIM version. The API metadata
holds the current API level, and the lowest backwards-compatible level
supported by this instance.

Release 0.1.6 will be the first release reporting the Nvim version and
API level.

    metadata['version'] = {
      major: 0,
      minor: 1,
      patch: 6,
      prerelease: true,
      api_level: 1,
      api_compatible: 0,
    }

The API level may remain unchanged across Neovim releases if the API has
not changed.

When changing the API the CMake variable NVIM_API_PRERELEASE is set to
true, and  NVIM_API_CURRENT/NVIM_API_COMPATIBILITY are incremented
accordingly.

The functional tests check the API table against fixtures of past
versions of Neovim. It compares all the functions in the old table with
the new one, it does ignore some metadata attributes that do not alter
the function signature or were removed since 0.1.5.  Currently the only
fixture is 0.mpack, generated from Neovim 0.1.5 with nvim --api-info.
2016-10-26 14:23:50 +02:00
Justin M. Keyes
90bf31c742 Merge #5500
Closes #5246
2016-10-26 14:01:49 +02:00
Florian Larysch
2a6c5bb0c4 modeline: Handle version number overflow. #5450
Closes #5449

A file containing the string "vim" followed by a very large number in a modeline
location will trigger an overflow in getdigits() which is called by
chk_modeline() when trying to parse the version number.

Add getdigits_safe(), which does not assert overflows, but reports them to the
caller.
2016-10-26 13:05:25 +02:00
Michael Ennen
0f32088ea2 vim-patch:7.4.2109 (#5518)
vim-patch:7.4.2109

Problem:    Setting 'display' to "lastline" is a drastic change, while
            omitting it results in lots of "@" lines.
Solution:   Add "truncate" to show "@@@" for a truncated line.

ad9c2a08f0
2016-10-25 21:15:43 +02:00
Justin M. Keyes
c853fd6fab CheckHealth: more checks 2016-10-25 15:55:29 +02:00
Justin M. Keyes
e7e2844d46 version: has("nvim-1.2.3")
Helped-by: Daniel Hahler <git@thequod.de>
2016-10-25 11:40:37 +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
fb503d73da Merge #5483 from Shougo/vim-0648142
vim-patch 0648142, 91c4937, 06d2d38, 2685212, 269f595
2016-10-24 13:17:41 +02:00
Grzegorz Milka
d7b942b54e vim-patch:7.4.2237
Problem:    Can't use "." and "$" with ":tab".
Solution:   Support a range for ":tab". (Hirohito Higashi)

9b7f8ce9eb
2016-10-23 00:37:13 +02:00
Colin Caine
e19234f391 man.vim: silence file call (#5509)
When a file is opened by nvim with ft=man already set, and
"has('vim_starting')", ftplugin/man.vim calls
'execute 'file man://'.ref', this causes nvim to display something like
this:

````
"<name of original file>" 977, 41017C
"man://foo(1)" [Not edited] 977 lines --0%--
Press ENTER or type command to continue
````

This is annoying, because nothing of note has actually happened.

Use cases why you might want to read a man page from a file:

`MANPAGER='bash -c "nvim -c \"set ft=man\" </dev/tty <(col -bx)"' man git`
`nvim -c 'set ft=man' <(man -P cat git)`
2016-10-20 08:35:48 +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
Marco Hinz
657ba62a84 rplugin: resolve paths in manifest file (#5501)
`:CheckHealth nvim` would always report an outdated manifest if symlinks were
used, because the manifest file contains unresolved paths that get compared
against resolved paths.

Now we resolve paths before they get written to the manifest file.
2016-10-18 23:16:13 +02:00
Marco Hinz
869a9078e1 Doc: Ruby omni-completion works (#5497) 2016-10-17 19:49:57 +02:00
Justin M. Keyes
acdc0b1955 CheckHealth: check terminfo 2016-10-16 18:14:24 +02:00
Justin M. Keyes
c40b3b680d CheckHealth: check tmux configuration 2016-10-16 18:08:53 +02:00
Justin M. Keyes
6fc122e600 doc 2016-10-16 18:08:53 +02:00
Shougo Matsushita
c91a0dca02 vim-patch:269f595
Updated runtime files.

269f595f9e
2016-10-15 12:21:13 +09:00
Shougo Matsushita
f3efb724af vim-patch:2685212
Update runtime files.

26852128a2
2016-10-15 12:15:36 +09:00
Shougo Matsushita
40f853398e vim-patch:06d2d38
Updated runtime files.

06d2d38ab7
2016-10-15 12:12:20 +09:00
Shougo Matsushita
59aa2eb501 vim-patch:91c4937
Updated runtime files.

91c4937be1
2016-10-15 12:03:57 +09:00
Shougo Matsushita
9d087206ab vim-patch:0648142
Update runtime files.

0648142700
2016-10-15 11:51:46 +09:00
Justin M. Keyes
819b79dbc5 health/provider.vim: Pass errors through. Give more feedback. 2016-10-13 17:55:15 +02:00
Justin M. Keyes
294c0ba014 health/provider.vim: Fix system([]) invocations.
Closes #5435
2016-10-13 15:17:24 +02:00
Justin M. Keyes
5a61ff188c Merge #5257 from jbradaric/vim-7.4.1893
vim-patch:7.4.{1893,1895}
2016-10-13 01:19:09 +02:00
Justin M. Keyes
22fe76aec4 Merge #5418 from Shougo/vim-7.4.2158
vim-patch: 7.4.2158, 2162, 2205
2016-10-13 00:44:18 +02:00
Justin M. Keyes
6a2d40497a Merge #5427 from Shougo/vim-7.4.1714
vim-patch: 7.4.1765, 7.4.1714
2016-10-13 00:22:23 +02:00
Justin M. Keyes
8fb7972517 doc 2016-10-12 23:52:41 +02:00
Shougo
1dde512498 UpdateRemotePlugins: Discard duplicate paths. (#5464) 2016-10-12 01:04:59 +02:00
Justin M. Keyes
1984072822 Merge #5428 'vim-patch: 0c1ff16, 939a1ab, 8067a64'. 2016-10-08 17:17:43 +02:00
Marco Hinz
31f6334aa8 CheckHealth: choose correct path for the latest version (#5446)
If multiple versions of a package are installed, the provider health check could
choose a wrong path:

  /usr/local/lib/python3.5/site-packages/neovim-0.1.10-py3.5.egg-info/PKG-INFO
  /usr/local/lib/python3.5/site-packages/neovim-0.1.9-py3.5.egg-info/PKG-INFO

Prior to this change :CheckHealth could falsely show 0.1.9 as the installed
version, since glob() doesn't enforce any predictable order.

Now we sort all potential paths numerically in descending order and just look at
the first path instead.
2016-10-08 16:34:54 +02:00
Jurica Bradaric
50bd8297e6 vim-patch:7.4.1895
Problem:    Cannot use a window ID where a window number is expected.
Solution:   Add LOWEST_WIN_ID, so that the window ID can be used where a
            number is expected.

888ccac890
2016-10-07 17:07:16 +02:00
Jurica Bradaric
d8079e5ab7 vim-patch:7.4.1893
Problem:    Cannot easily get the window ID for a buffer.
Solution:   Add bufwinid().

b3619a90ea
2016-10-07 17:07:16 +02:00
Mark Lee
a8f9d56796 health: fix Python 2 variable names 2016-10-06 22:09:36 -07:00
Mark Lee
153e6835f1 health: remove duplicate nvim_path declaration
It's the same as the declaration above it, but hardcoded to use python3
and does not redirect stderr.
2016-10-06 22:09:10 -07:00
Justin M. Keyes
d57f25e5ef doc/vim_diff.txt (#5432) 2016-10-06 09:45:24 +02:00
Shougo Matsushita
7bc86b2bbc vim-patch:0c1ff16
updated runtime files.  Add avra syntax.

0c1ff16b54
2016-10-04 23:34:28 +09:00
Shougo Matsushita
d4f32d0789 vim-patch:939a1ab
Updated runtime files.

939a1abe93
2016-10-04 23:33:28 +09:00
Shougo Matsushita
fdb0a5e24e vim-patch:7.4.1765
Problem:    Undo options are not together in the options window.
Solution:   Put them together.  (Gary Johnson)

4694a17d1e
2016-10-04 23:18:24 +09:00
Shougo Matsushita
c3990ba0e6 vim-patch:7.4.1714
Problem:    Non-GUI specific settings in the gvimrc_example file.
Solution:   Move some settings to the vimrc_example file.  Remove setting
            'hlsearch' again. (suggested by Hirohito Higashi)

54f1b7abf8
2016-10-04 23:14:47 +09:00
Shougo Matsushita
db324879d2 vim-patch:7.4.2205
Problem:    'wildignore' always applies to getcompletion().
Solution:   Add an option to use 'wildignore' or not. (Yegappan Lakshmanan)

e9d58a6459
2016-10-01 20:07:27 +09:00
Justin M. Keyes
9c2f4ce20d doc: minor comment tweaks 2016-09-28 03:01:57 +02:00
James McCoy
d533edf61e
vim-patch:7.4.1604
Problem:    Although emoji characters are ambiguous width, best is to treat
            them as full width.
Solution:   Update the Unicode character tables. Add the 'emoji' options.
            (Yasuhiro Matsumoto)

3848e00e01
2016-09-24 14:03:14 -04: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
c12801986c Merge #5254 from KillTheMule/vim-7.4.1952
vim-patch:7.4.{1952, 1990, 2033, 2284}
2016-09-18 13:49:39 +02:00
Justin M. Keyes
dc6cc4787c api: Establish API naming convention. (#5344)
old name:                   new name:
  --------------------------------------------------
  nvim_name_to_color          nvim_get_color_by_name
  nvim_get_current_buffer     nvim_get_current_buf
  nvim_get_current_window     nvim_get_current_win
  nvim_get_buffers            nvim_list_bufs
  nvim_get_tabpages           nvim_list_tabpages
  nvim_get_windows            nvim_list_wins
  nvim_set_current_buffer     nvim_set_current_buf
  nvim_set_current_window     nvim_set_current_win
  nvim_change_directory       nvim_set_current_dir
  nvim_tabpage_get_window     nvim_tabpage_get_win
  nvim_tabpage_get_windows    nvim_tabpage_list_wins
  nvim_win_get_buffer         nvim_win_get_buf
  nvim_report_error           nvim_err_writeln

Helped-by: Björn Linse <bjorn.linse@gmail.com>
Helped-by: ZyX <kp-pav@yandex.ru>
Helped-by: James McCoy <jamessan@jamessan.com>
2016-09-17 06:30:36 +02:00
Justin M. Keyes
7eb4d2f79d vim-patch:7.4.1558 (#5333)
Problem:    It is not easy to find out what windows display a buffer.
Solution:   Add win_findbuf().

9cdf86b86f
2016-09-13 14:05:34 +02:00
Anmol Sethi
4ceacb37d5 man.vim: prevent bell in ':wincmd w' when only one window (#5328) 2016-09-11 20:58:51 +02:00
Justin M. Keyes
fe06e2a4a0 doc 2016-09-06 03:43:13 -04:00
Justin M. Keyes
d9d2c2fcc0 doc: clarify reltime()
Closes #5301
2016-09-05 20:15:31 -04:00
Justin M. Keyes
df99c6493d health.vim: "No healthchecks found" also needs the buffer. 2016-09-05 19:42:28 -04:00
Justin M. Keyes
522b885a0d Merge #5295 'health.vim' 2016-09-05 19:34:00 -04:00
Justin M. Keyes
3c24704ac8 health.vim: Show results incrementally.
Also:

- improve precision of "No healthcheck found"
- fix SUGGESTIONS syntax group definition
- fix indentation of SUGGESTIONS
2016-09-05 19:22:01 -04:00
Justin M. Keyes
31257b450b health.vim: Factor out health#provider#check() 2016-09-05 18:29:47 -04:00
Alex Genco
d61a50758c Improve Ruby version check in CheckHealth command
Compare current version number to that of the latest released neovim
rubygem, rather than a hard-coded version.

Note: The `gem list` command introduced here adds about 4 seconds to the
execution time of the CheckHealth command.
2016-09-04 21:26:21 -07:00
Jurica Bradarić
0f381f26cb vim-patch:7.4.1971 (#5262)
Problem:    It is not easy to see unrecognized error lines below the current
            error position.
Solution:   Add ":clist +count".

e8fea0728a
2016-09-04 23:40:12 +02:00
Anmol Sethi
9bba8ba372 [RFC] man.vim: remove <Plug> mappings (#5290)
- :Man with no arguments opens the manapage for the
  <cWORD> (man buffers) or <cword> (non-man buffers).
- remove now irrelevent comment about -P flag
2016-09-04 03:53:58 +02:00
Justin M. Keyes
c9e39f8227 man.vim: Avoid hard redraw.
Use system() instead of :read to avoid a hard redraw.
2016-09-03 13:59:37 -04:00
Anmol Sethi
f8fc8f51c0 man.vim #5249
- fix synopsis highlighting in other locales. Cannot always rely on the first
  line for the section in some locales; instead, use the file path and
  explicitly set b:man_sect to the actual section.
- eliminate separate s:man_args function
- simplify logic: do not reuse buffer content
- introduce b:man_default_sects Fixes #5233
- introduce <Plug>(man_vsplit), <Plug>(man_tab)
- simplify regexps
2016-09-03 12:57:41 -04:00
Björn Linse
1c22cab2fd api: consistently use nvim_ prefix and update documentation 2016-08-31 21:57:06 +02:00
Björn Linse
7e2348f2b1 eval: use gperf to generate the hash of builtin functions
make api functions highlighted as builtins in vim.vim
2016-08-31 21:57:04 +02:00
Björn Linse
8d6e3f2b88 api/ui: add documentation for remote ui redraw events 2016-08-29 10:17:31 +02:00
KillTheMule
0b3ec84840 Add if_cscope documentation for querytype 'a'
From 802a0d902fca423acb15f835d7b09183883d79a0.
2016-08-26 22:13:56 +02:00
Justin M. Keyes
7bc627b3c8 Merge #5210 'vim-patch:7.4.1898 + :Man modifiers support'. 2016-08-25 21:54:00 -04:00
Anmol Sethi
db2aa27df1
man.vim: if reusing a buffer, do not use noautocmd
The commit that added support for modifiers regressed #5168
causing #5172. This commit fixes it again.
2016-08-24 15:41:51 -04:00
Anmol Sethi
470883d705
man.vim: slight refactoring
Addresses problem one in #5240
2016-08-24 11:51:59 -04:00
Anmol Sethi
10b014ca7b
man.vim: set window local options when reusing buffer
This is necessary incase the buffer was previously opened in a different
tab, in which the window options there do not carry over. It is not
explicitly documented in ':help local-options' but that is how it works.
2016-08-24 11:51:59 -04:00
Anmol Sethi
728d582333
man.vim: support for command modifiers
Closes #5235
2016-08-24 11:51:59 -04:00
Anmol Sethi
8a7b15cf35
vim-patch:7.4.1898
Problem:    User commands don't support modifiers.
Solution:   Add the <mods> item. (Yegappan Lakshmanan, closes vim/vim#829)

63a60ded3f
2016-08-24 11:51:59 -04: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
2f2e729899 Merge commit 'refs/pull/upstream/5156' 2016-08-22 02:47:10 -04:00
Justin M. Keyes
ad43480952 version bump 2016-08-22 00:28:47 -04:00
Justin M. Keyes
297677ecf4 remote/host.vim: Avoid "No matching autocommands".
:silent does not silence this message, even :redir does not consume it.
But execute() _does_ consume it, which interferes with the current
implementation of health.vim. It's prudent to avoid it in any case, even
if the implementation of health.vim changes in the future.
2016-08-21 22:03:28 -04:00
Justin M. Keyes
45cc14d9a5 CheckHealth: Remove "disable"/"enable" concept
We can add this later if it is proven necessary, but it should not be
because:

1. User can run a subset of checkers via `:CheckHealth plugin1, ...,`
2. Healthcheck is a very rare operation. Optimizing it is not worth the
   code/API complexity.
2016-08-21 22:03:28 -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
Justin M. Keyes
545e7a4163 CheckHealth
- Overlay markdown syntax/filetype, don't invent new filetypes/syntaxes.
- migrate s:check_ruby()
- s:indent_after_line1
- Less-verbose output
2016-08-21 21:25:33 -04:00
TJ DeVries
2cc523c3af CheckHealth
- Use execute() instead of redir
- Fixed logic on suboptimal pyenv/virtualenv checks.
- Move system calls from strings to lists. Fixes #5218
- Add highlighting
- Automatically discover health checkers
- Add tests

Helped-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Helped-by: Tommy Allen <tommy@esdf.io>

Closes #4932
2016-08-21 21:25:33 -04:00
Björn Linse
2d60a15e25 job control: reuse common job code for rpc jobs
This makes stderr and exit callbacks work for rpc jobs
2016-08-20 12:55:35 +02:00
Justin M. Keyes
1b825a9ada man.vim: Avoid error in legacy vimrcs.
The old man.vim ftplugin advises users to add this to vimrc:

    runtime ftplugin/man.vim

Make this a no-op to avoid sending users on a debugging quest.
2016-08-19 22:57:24 -04:00
Justin M. Keyes
f9aa029a8b host.vim: s:GetManifestPath(): octal permissions 2016-08-17 18:30:09 -04:00
Justin M. Keyes
acaf480bdc host.vim: s:GetManifestPath(): Create base directory if needed.
If the base directory does not exist, let mkdir(...,'p') create it.
2016-08-17 18:29:45 -04:00
Tommy Allen
605e74327a highlight: Added QuickFixLine highlight group
- Links to Search by default

screen.c: Combine CursorLine with QuickFixLine

- HLF_QFL takes priority over HLF_CUL

docs: Updated to mention QuickFixLine
runtime: Added QuickFixLine to nvimHLGroup
tests: QuickFixLine highlight
2016-08-17 17:48:15 -04:00
Justin M. Keyes
4b0b391f9f host.vim: s:GetManifestPath(): Remove for-loop.
Without the for-loop it is easier to follow, more explicit, and fewer
lines.
2016-08-17 17:43:26 -04:00
Tommy Allen
01e33e1c74 runtime: rplugin manifest written to $XDG_DATA_HOME
Uses $NVIM_RPLUGIN_MANIFEST if available
2016-08-17 16:22:15 -04:00
Anmol Sethi
79ef4b72d7 man.vim: doc fixes #5171
- Weird tab+space combination used for alignment. All spaces now
- Added back <C-T> mapping (somehow we missed that completely)
- Fixed mistake that <Plug>(Man) opens in a new tab. Also added note at
  top on how the window is chosen/opened.
- Clarified q local mapping
- Removed section that shows an example autocmd to add desired folding
  style.
- Removed random line in `usr_12.txt` about `<Leader>` and backslash.
- :Man supports completion, not auto-completion.

Closes #5171
2016-08-13 08:58:21 -04:00
James McCoy
d0c0930acf Restore ":browse oldfiles" behavior from Vim
In 3b12bb225a, ":oldfiles" was taught to
behave like Vim's ":browse oldfiles" if ":oldfiles!" was used.  However,
this conflates the use of ! for abandoning a modified buffer with
choosing one file out of a list of oldfiles.

Now that ":browse" is supported again, ":browse oldfiles" will allow the
user to select an old file, while still complaining if that would cause
a modified buffer to be abandoned.  ":browse oldfiles!" will just
abandon the buffer, as expected.
2016-08-11 13:37:42 -04:00
Justin M. Keyes
db375102ea doc 2016-08-10 00:47:17 -04:00
Anmol Sethi
3ff252ca86 man.vim: use -range instead of -count (#5203)
With -count, if the first argument is a number, it is made available
with <count>. Problem is, there is always a default count it is impossible
to tell whether the user set it.

Since v:count and v:count1 still work with 'keywordprg', -count is
unnecessary. But 'keywordprg' still calls ':Man' with a count prefixed.
So it must still accept a count in the line number position, but not consume
the first argument. This is done with -range.

Fixes #5202.
2016-08-09 20:18:04 -04:00
Anmol Sethi
abb0928dfb man.vim: handle empty identifier from mapping (#5187)
Regression from #5168. Also changed the Man command's nargs to '+' so
that man#open_page does not need to handle 0 arguments, because that
will never occur.
2016-08-08 01:23:12 -04:00
Justin M. Keyes
6da7d6890c Merge #5025 'input.c: Restore double click' 2016-08-07 23:52:27 -04:00
Justin M. Keyes
d69194ca8c test: mouse_spec
- Use the default buffer text provided by before_each (avoids extra steps and
  makes the tests more consistent with each other)
- Indent
- Adjust help doc
2016-08-07 23:50:40 -04:00
Alex Genco
5dc28a826e doc: Add if_ruby.txt to doc/help.txt (#5186) 2016-08-07 20:42:13 -04:00
Anmol Sethi
6050d3f15d man.vim: handle 'gdefault' (#5182)
Fixes #5181
2016-08-07 17:30:05 -04:00
Anmol Sethi
e8a3477dc7
man.vim: buffers are now listed
- Since the names are set and ':vsplit printf(3)' work, there is no need
to unlist them.
2016-08-07 15:53:31 -04:00
Anmol Sethi
e89eb5d21b
man.vim: refactoring and autocmd fix
- man#open_page_command and man#open_page_mapping are now a single
  function
- New autocmd to fix #5172
2016-08-07 15:53:07 -04:00
Anmol Sethi
f665bde183 man.vim: default K mapping
- Also some small improvements in other parts.
2016-08-06 19:49:29 -04:00
Anmol Sethi
64013a5deb man.vim: small syntax improvements (#5170) 2016-08-06 16:17:31 -04:00
Justin M. Keyes
66ceb5a487 man.vim: doc, UX tweaks
s:error: Convention is to highlight the entire message, so stick to that.
2016-08-04 23:52:52 -04:00
Anmol Sethi
42e9606c23 man.vim: rewrite
- Smart autocomplete. It's automatically sorted, filtered for duplicates
  and even formats the candidates based on what is needed. For example,
  `:Man 1 printf<TAB>` will show the pages that are in section 1m as
  'page(sect)' to let you know they are in a more specific section.
- Instead of trying to unset $MANPAGER we use the -P flag to set the
  pager to cat
- Always use the section arg '-s', it makes the code much simpler
  (see comment in s:man-args).
- A manpage name starting with '-' is invalid. It's fine for sections
  because of the use of '-s'.

- The tagstack is an actual stack now, makes it much simpler.
- By using v:count and v:count1, the plugin can explicitly check whether
  the user set a count, instead of relying on a default value (0) that
  is actually a real manpage section.
- Extraction of a manpage reference is much more simple. No giant long
  complicated regexes. Now, the plugin lets `man` handle the actual
  validation. We merely extract the section and page. Syntax regexes are
  a bit more specific though to prevent highlighting everything.
- Multilingual support in the syntax file. Removed the cruft that was only
  relevent to vim. Also simplified and improved many of the regexes.

- Using shellescape when sending the page and sect as arguments
- In general, the code flow is much more obvious.
- man#get_page has been split up into smaller functions with explicit
  responsibilties
- ':help' behavior in opening splits and manpages
- Comments explaining anything that needs explaining and isn't
  immediately obvious.
- If a manpage has already been loaded but if it were to reloaded at the
  current width which is the same as the width at which it was loaded at
  previously, it is not reloaded.

- Use substitute to remove the backspaced instead of `col -b`, as the
  latter doesn't work with other languages.
- Open paths to manpages
- It uses cWORD instead of cword to get the manpage under the cursor, this
  helps with files that do not have (,) in iskeyword. It also means the
  plugin does not set iskeyword locally anymore.
- <Plug>(Man) mapping for easy remapping
- Switched to single quotes wherever possible.
- Updated docs in $VIMRUNTIME/doc/filetype.txt (still need to update
  user-manual)

- Always call tolower on section name. See comment in
  s:extract_page_and_sect_fpage
- Formatting/consistency cleanup
- Automatically map q to ':q<CR>' when invoked as $MANPAGER
- It also fully supports being used as $MANPAGER. Setting the name and
  stuff automatically.
- Split up the setlocals into multiple lines for easier readability
- Better detection of errors by redirecting stderr to /dev/null. If an
  error occured, stdout will be empty.

- Functions return [sect, page] not [page, sect]. Makes more sense with
  how man takes the arguments as sect and then page.
- Pretty prints errors on a single line.
- If no section is given, automatically finds the correct section for
  the buffer name. It also gets the correct page. See the comment in
  s:get_page
- If $MANWIDTH is not set, do not assign directly to $MANWIDTH because
  then $MANWIDTH will always stay set to the same value as we only use
  winwidth(0) when the global $MANWIDTH is empty. Instead we set it
  locally for the command.
- Maintainer notes on all files.
2016-08-04 22:46:53 -04:00
prollings
0d93cd6c46 vim-patch:7.4.1557 (#5117)
Problem:    Windows cannot be identified.
Solution:   Add a unique window number to each window and functions to use it.

86edef664e
2016-08-04 00:22:45 -04:00
Panashe Fundira
08d11bd42f vim-patch:7.4.1673 (#5141)
Problem:    The justify plugin has to be copied or sourced to be used.
Solution:   Turn it into a package.

2946d0236d

Justification for changes that do not carry over

- `Filelist` does not exist in neovim
- neovim does not have a `README.txt` in `runtime/macros`
2016-08-03 08:07:28 -04:00
Justin M. Keyes
d1d9ac5a3c doc: mention tnoremap
Closes #5097
2016-08-01 04:58:40 -04:00
Shougo Matsushita
23f591dba0 [RFC] vim-patch:7.4.2011, vim-patch:7.4.2012, vim-patch:7.4.2066 #5106
vim-patch:7.4.2011

Problem:    It is not easy to get a list of command arguments.
Solution:   Add getcompletion(). (Yegappan Lakshmanan)

aa4d73235b

vim-patch:7.4.2012

Problem:    Test for getcompletion() does not pass on all systems.
Solution:   Only test what is supported.

0d3e24be56

vim-patch:7.4.2066

Problem:    getcompletion() not well tested.
Solution:   Add more testing.

c1fb763184
2016-08-01 03:33:38 -04:00
Panashe M. Fundira
70ae6ac344 vim-patch:7.4.1676 #5143
Problem:    The shellmenu plugin has to be copied or sourced to be used.
Solution:   Turn it into a package.

fead3ac9a3

Justification for changes that do not carry over

- `Filelist` does not exist in neovim
- neovim does not have a `README.txt` in `runtime/macros`
2016-08-01 03:25:03 -04:00
Panashe M. Fundira
247d1cec06 vim-patch:7.4.1675 #5142
Problem:    The swapmous plugin has to be copied or sourced to be used.
Solution:   Turn it into the swapmouse package.

e101204906

Justification for changes that do not carry over

- `Filelist` does not exist in neovim
- neovim does not have a `README.txt` in `runtime/macros`
2016-08-01 03:23:21 -04:00
Justin M. Keyes
aa2c439940 eval.c: rename capture() to execute() (#5132) 2016-07-31 13:23:29 -04:00
Tommy Allen
faca814116 matchit.vim: preserve jumplist (#5124) 2016-07-30 12:48:40 -04:00
Justin M. Keyes
149518c6b3 doc: gentle transition steps; stub XDG section
Closes #4951
2016-07-29 00:51:02 -04:00
James McCoy
452707e0b0 vim-patch:7.4.1703
Problem:    Can't assert for not equal and not matching.
Solution:   Add assert_notmatch() and assert_notequal().

b50e5f5686
2016-07-23 20:42:46 -04:00
James McCoy
aece3ffa7d vim-patch:7.4.1663
Problem:    In tests it's often useful to check if a pattern matches.
Solution:   Add assert_match().

ea6553bec3
2016-07-23 20:42:46 -04:00
Justin M. Keyes
77937c4edd Merge #5058 2016-07-18 11:22:43 -04:00
Björn Linse
be531aba77 Merge pull request #5042 from bfredl/unnamedunnamedplus
clipboard: make v:register=='+' when clipboard=unnamed,unnamedplus
2016-07-13 10:11:30 +02:00
Justin M. Keyes
5ea4d58a1b Merge #5026 from joshtriplett/term-title-statusline
Please support setting terminal title in :terminal
2016-07-13 04:04:30 -04:00
Patrick
a3dc7ef445 vim-patch:7.4.1546
Problem:    Sticky type checking is more annoying than useful.
Solution:   Remove the error for changing a variable type.

f6f32c38bf

Note: There are a bunch of other changes to eval.txt that I believe are
N/A and not related to this patch.
2016-07-13 17:47:46 +10:00
Josh Triplett
83aea9ccf5 Document terminal buffer-local variables
Include an example of using them in 'statusline'.
2016-07-12 14:42:17 -07:00
Björn Linse
6ea2bde065 clipboard: fix v:register when clipboard=unnamed,unnamedplus 2016-07-12 22:30:51 +02:00
Justin M. Keyes
b771ec8baa install: Include *.rb in runtime files. 2016-07-10 14:43:14 -04:00