Commit Graph

1758 Commits

Author SHA1 Message Date
Pedro L. Ramos
57c7e1d4a0 vim-patch:8.1.0648: custom operators can't act upon forced motion
Problem:    Custom operators can't act upon a forced motion. (Christian
            Wellenbrock)
Solution:   Add the forced motion to the mode() result. (Christian Brabandt,
            closes vim/vim#3490)
5976f8ff00

closes #8667
closes #9476

Christian Wellenbrock:

> For (most) built in text objects it's possible to force operation on
> them to be linewise, for example by using `dVab` (`:h o_V`,
> `motion_force`). When using custom text objects (defined as mappings
> by plugins for example), this doesn't currently work.
>
> Example:
>
>     onoremap x viw
>
> Open a file with a few lines each containing some words. With the
> cursor on any word, try:
>
> 1. `dw` (builtin) deletes some characters
> 2. `dVw` (builtin) deletes linewise
> 3. `dx` (from mapping) deletes some characters
> 4. `dVx` (from mapping) deletes some characters, but should delete
>    linewise

ref: https://github.com/wellle/targets.vim/issues/214
ref: https://gitter.im/neovim/neovim?at=5b379ff7f1664406610e7483
2019-01-10 08:50:07 +01:00
Justin M. Keyes
685b2028dc build: fix doc_html target
ref 24f2cc55a8 #9430
2019-01-04 02:17:23 +01:00
Justin M. Keyes
37a499148f Visual: highlight char-at-cursor
Decide whether to highlight the visual-selected character under the
cursor, depending on 'guicursor' style:

- Highlight if cursor is blinking or non-block (vertical, horiz).
- Do NOT highlight if cursor is non-blinking block.

Traditionally Vim's visual selection does "reverse mode", which perhaps
conflicts with the non-blinking block cursor. But 'guicursor' defaults
to a vertical bar for selection=exclusive, and this confuses users who
expect to see the text highlighted.

closes #8983
2019-01-04 01:28:44 +01:00
James McCoy
5fba815921
Merge pull request #9438 from jamessan/revert-pynvim
Rework Python provider/health check to use neovim module again
2019-01-02 11:05:13 -05:00
David Jimenez
8f288698e4 vim-patch:8.0.0251: not easy to select Python 2 or 3 (#9173)
Problem: It is not so easy to write a script that works with both Python 2 and Python 3, even when the Python code works with both.
Solution: Add 'pyxversion', :pyx, etc. (Marc Weber, Ken Takata)

f42dd3c390
2019-01-02 14:51:03 +01:00
James McCoy
d7b3ac029c
health/provider: Check for available pynvim when neovim module missing
Adapt the checks so we can still report when the pynvim module is
present but the neovim module is missing.
2019-01-01 20:38:28 -05:00
James McCoy
edeb19d5e9
python#CheckForModule: Use the given module string instead of hard-coding pynvim 2019-01-01 16:06:37 -05:00
James McCoy
0dd89cda9c
{health,provider}/python: Import the neovim, rather than pynvim, module
The neovim module is available for backwards compatibility.  We should
not yet force the use of the pynvim module, since there's no other major
reason to bump the minimum supported Python client module.

Closes #9426
2019-01-01 14:15:31 -05:00
Daniel Hahler
24f2cc55a8 cmake: runtime: use add_custom_command for tags directly (#9430)
This avoids generating the tags files all the time, and makes `make
install` with `CMAKE_INSTALL_MESSAGE=LAZY` much more silent in general.

Using `copy_if_different` instead of `remove` + `copy_directory` might
be good on top, but is a) not really necessary anymore and b) would not
sync removed files.
For this `file(COPY` could be used, but would require to re-run cmake on
changed input files then.
2019-01-01 13:56:20 +01:00
Björn Linse
13f74635fa multigrid: doc update 2018-12-31 16:24:07 +01:00
Utkarsh Maheshwari
47c053cc39 multigrid: Add multigrid documentation 2018-12-31 12:44:22 +01:00
pierre
92806827a9 appimage: Include metadata #9320
closes #9320
closes #9128
2018-12-30 23:02:40 +01:00
Justin M. Keyes
a10fdc70aa syntax/vim.vim: highlight <cmd> key 2018-12-30 21:09:39 +01:00
Justin M. Keyes
e83c0a267d help: Do not highlight "Nvim."
This was added in 549311db7d for some reason, it usually just looks
weird.
2018-12-30 21:09:39 +01:00
Justin M. Keyes
e834660b2b doc: Remove {Nvim} tag
The purpose of the {Nvim} hint was not well-defined, and its usage
inconsistent.  It's also unnecessary.

Nvim-Vim differences are centralized at:
    :help vim-differences
Removed things are centralized at:
    :help deprecated
Developer guidelines for documentation are listed at:
    :help dev-doc
2018-12-30 21:09:39 +01:00
Justin M. Keyes
4ba8266ab1 doc
- CMake features
2018-12-30 21:09:39 +01:00
James McCoy
135991712a
rplugin.vim: Add migration support for Windows, nvim/ -> nvim-data/ 2018-12-27 21:07:28 -05:00
James McCoy
15cc17521e
Use stdpath() to determine rplugin manifest path 2018-12-20 21:40:05 -05:00
Justin M. Keyes
127b8569e6 lint 2018-12-20 11:57:30 +01:00
Justin M. Keyes
221f6fffad runtime/lua/vim/compat.lua
ref #9280
Introduce the `vim.compat` module, to help environments with system Lua
5.2+ run the build/tests. Include the module implicitly in all tests.

ref #8677
legacy `vim` module:
    beep
    buffer
    command
    dict
    eval
    firstline
    lastline
    line
    list
    open
    type
    window
2018-12-20 11:57:30 +01:00
Matěj Cepl
e6d0dea42b test: Lua 5.2/5.3 compat #9280
Make the code run both on Lua 5.1 (which is the default for Neovim, and
is what LuaJIT provides) and Lua 5.2+.
2018-12-20 11:57:30 +01:00
James McCoy
314f6ea367
startup: Use $XDG_CONFIG_DIRS/nvim/sysinit.vim if it exists
Closes #8994
2018-12-16 12:05:47 -05:00
Björn Linse
6c602be33a vim-patch:8.0.1445: cannot act on edits in the command line
Problem:    Cannot act on edits in the command line.
Solution:   Add the CmdlineChanged autocommand event. (xtal8, closes vim/vim#2603,
            closes vim/vim#2524)

153b704e20
2018-12-12 10:25:36 +01:00
Justin M. Keyes
61d0dfee32 provider: repurpose E319
In Vim (and some vestigial parts of Nvim) E319 was a placeholder for
ex_ni commands, i.e. commands that are only available in certain builds
of Vim.  That is obviously counter to Nvim's goals: all Nvim commands
are available on all platforms and build types (the remaining ex_ni
commands are actually just missing providers).

We need an error id for "missing provider", so it makes sense to use
E319 for that purpose.

ref #9344
ref #3577
2018-12-12 01:26:21 +01:00
Justin M. Keyes
20620bae76 Merge #9306 'vim-patch: integrate xdiff library'
closes #1466
closes #1007
closes #1391
2018-12-09 23:07:28 +01:00
Anatolii Sakhnik
2c92a4d0c8 vim-patch:8.1.0397: no event triggered after updating diffs
Problem:    No event triggered after updating diffs.
Solution:   Add the DiffUpdated event.

e8fa05b5bc
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
cf1ffa9166 vim-patch:8.1.0360: using an external diff program is slow and inflexible
Problem:    Using an external diff program is slow and inflexible.
Solution:   Include the xdiff library. (Christian Brabandt)
            Use it by default.

e828b7621c

vim-patch:8.1.0360
vim-patch:8.1.0364
vim-patch:8.1.0366
vim-patch:8.1.0370
vim-patch:8.1.0377
vim-patch:8.1.0378
vim-patch:8.1.0381
vim-patch:8.1.0396
vim-patch:8.1.0432
2018-12-09 19:45:56 +02:00
Justin M. Keyes
857a7312d0
doc (#9288)
- misc
- doc: `:help config`. closes #9329
- cleanup test/README.md
2018-12-09 01:31:34 +01:00
Justin M. Keyes
e509576e53
provider/lang: expand() g:foo_host_prog (#9312)
Before this commit, if user does this:
    let g:node_host_prog = '~/.nvm/versions/node/v11.3.0/bin/neovim-node-host'
the "~/" is not expanded to user's home directory.

`:help g:ruby_host_prog` suggests a path with "~/" so technically we
already claimed to support this.

closes https://github.com/neovim/node-client/issues/102
2018-12-05 00:11:28 +01:00
@equalsraf
d207440f1e clipboard: Revert unused check #9309
PR #9304 added support for functions in clipboard providers. As part of
the PR I meant to move two checks in the provider code out of an if
statement into separate statements and adding additional checks for
g:clipboard attributes - as it turns out the code is wrong and it does
not implement additional checks while it adds two conditions that make
very little sense

    type(g:clipboard['copy']) #isnot# v:t_func

what would make sense would be something along the lines of

    type(g:clipboard['copy']['+']) #isnot# v:t_func

but might not be what we want either, so I'm reverting this.
2018-12-04 21:38:20 +01:00
Björn Linse
8b42249cdd RPC: turn errors from async calls into notifications
Previously, nvim sent a response with invalid request id (UINT64_MAX).
In functionaltests, catch unexpected error notifications in after_each().
2018-12-03 10:42:00 +01:00
Rui Abreu Ferreira
07ad5d71ab clipboard: Support custom VimL functions #9304
Up to now g:clipboard["copy"] only supported string values invoked as
system commands.

This commit enables the use of VimL functions instead. The function
signatures are the same as in provider/clipboard.vim. A clipboard
provider is expected to store and return a list of lines (i.e. the text)
and a register type (as seen in setreg()).

cache_enabled is ignored if "copy" is provided by a VimL function.
2018-12-03 00:07:08 +01:00
Justin M. Keyes
799d9c3215
clipboard: Prefer xclip (#9302)
The order was swapped in #4150 to prefer `xsel` but there wasn't a clear
explanation.  Meanwhile, `xsel` has been neglected upstream.

Let's trying preferring `xclip` again, we've had a few reports of
problems with `xsel`.

closes #7237
ref #5853
ref #7449
2018-12-01 18:50:26 +01:00
Justin M. Keyes
30940f809b doc: deprecate inputdialog()
input() is functionally equivalent. GUI support for dialogs is implicit
and does not depend on choosing inputdialog() vs input().
2018-12-01 16:06:01 +01:00
Justin M. Keyes
0f00f31cbd VimL/confirm(): Show dialog even if :silent
closes #8788
related #9034
2018-12-01 16:06:01 +01:00
Jan Edmund Lazo
a9e368a705 vim-patch:8.1.0553: it is not easy to edit a script that was sourced (#9298)
Problem:    It is not easy to edit a script that was sourced.
Solution:   Add a count to ":scriptnames", so that ":script 40" edits the
            script with script ID 40.
07dc18ffa4
2018-12-01 04:43:08 +01:00
Justin M. Keyes
519224f6bd matchit.vim: s:MultiMatch(): return Dict 2018-11-28 03:48:06 +01:00
Justin M. Keyes
30857030e8 doc
- develop.txt is for design/guidelines; architecture/concepts should
  live elsewhere (currently src/nvim/README.md)
- move dev-jargon to intro.txt
- replace https://neovim.io/community (deprecated) with
  https://neovim.io/#chat
- <Cmd> avoids CmdlineEnter/Leave
  https://github.com/vim/vim/issues/2889
2018-11-28 03:48:06 +01:00
Bjorn Neergaard
108566e7b6 clipboard.vim: check for win32yank.exe #9263
Win32 allows omitting the `.exe` extension, but WSL does not.
2018-11-21 12:24:40 +01:00
Marco Hinz
016ebb4185
Merge #9257 'health/python: warn if pynvim upgrade failed'
Reference: https://github.com/neovim/neovim/wiki/Following-HEAD#20181118
2018-11-20 13:15:04 +01:00
Marco Hinz
f1a787d292
health/python: warn if pynvim upgrade failed
Reference: https://github.com/neovim/neovim/wiki/Following-HEAD#20181118
2018-11-20 11:33:08 +01:00
Justin M. Keyes
deb18a050e
defaults: background=dark #2894 (#9205)
By historical accident, Nvim defaults to background=light. So on a dark
background, `:colorscheme default` looks completely wrong.

The "smart" logic that Vim uses is confusing for anyone who uses Vim on
multiple platforms, so rather than mimic that, pick the (hopefully) most
common default.

- Since Neovim is dark-powered, we assume most users have dark backgrounds.
- Most of the GUIs tend to have a dark background by default.

ref #6289
2018-11-20 10:52:49 +01:00
Marco Hinz
57fef7c74d
health/python: slightly improve output 2018-11-20 09:59:18 +01:00
Marco Hinz
443cd04d5b
provider/python: refactoring 2018-11-20 09:59:18 +01:00
Marco Hinz
0c2ca48e5f
doc/python: 'neovim' module was renamed to 'pynvim' 2018-11-17 17:56:34 +01:00
Marco Hinz
3ea14d5366
health/python: 'neovim' module was renamed to 'pynvim' 2018-11-17 17:56:34 +01:00
Jan Edmund Lazo
f6c6567cb1 vim-patch:8.1.0352: browsing compressed tar files does not always work
Problem:    Browsing compressed tar files does not always work.
Solution:   Use the "file" command to get the compression type.
d4a1aabe37
2018-11-13 22:33:27 -05:00
Jan Edmund Lazo
9e59fdf5f6 vim-patch:8.1.0311: filtering entries in a quickfix list is not easy
Problem:    Filtering entries in a quickfix list is not easy.
Solution:   Add the cfilter plugin. (Yegappan Lakshmanan)
8c5e0093c9
2018-11-13 21:32:00 -05:00
Jan Edmund Lazo
091ae1e63f vim-patch:8.1.0143: matchit and matchparen don't handle E363
Problem:    Matchit and matchparen don't handle E363.
Solution:   Catch the E363 error. (Christian Brabandt)
3d1d6475f9
2018-11-13 21:15:29 -05:00
Jan Edmund Lazo
24ce4c6233 vim-patch:8.1.0115: the matchparen plugin may throw an error
Problem:    The matchparen plugin may throw an error.
Solution:   Change the skip argument from zero to "0".
b7a5ab112a
2018-11-13 21:13:19 -05:00