Commit Graph

70 Commits

Author SHA1 Message Date
Felipe Morales
4af822fa09 tutor: Fix mistaken option name
Closes #3754
2015-11-28 19:55:43 +01:00
Felipe Morales
538a57cfd8 Merge pull request #3675 from fmoralesc/update-vim-tutor
tutor: Update vim-tutor to 0.2.1
2015-11-28 11:23:22 +01:00
Felipe Morales
0af56a0ec7 tutor: Update vim-tutor to 0.2.1
Also, some tweaks based on input by @fdinoff on gitter.
2015-11-28 10:59:21 +01:00
ZyX
b98cea909f shada: Also store last search direction
Note: it looks like viminfo files do not store search direction intentionally.
After reading viminfo file search direction was considered to be “forward”.

Note 2: all files created on earlier Neovim version will automatically receive
“forward” direction.

Fixes #3580
2015-11-23 17:08:01 +03:00
Felipe Morales
321db59ca1 Merge pull request #3270 from ZyX-I/shada-support
Add plugin for editing ShaDa files
2015-11-23 00:27:18 +01:00
Daniel Hahler
dcc71094d1 runtime/autoload/provider/python{,3}.vim: fix E168
Do not use `finish` inside of `provider#python{,3}#Call`, but `return`.
2015-11-03 16:52:26 +01:00
ZyX
8d9063bb2a runtime: Add autoload/shada.vim helper file
Contains most of the logic
2015-11-01 21:27:28 +03:00
ZyX
00a638179d runtime: Add autoload/msgpack.vim helper file 2015-11-01 21:27:27 +03:00
Felipe Morales
6b6f018f84 spellfile: follow the XDG spec
Closes #3535
2015-10-28 14:46:00 +01:00
rosston
d69f3bbb0d vim-patch:8feef4f #3444
Update runtime files.

8feef4ff62
2015-10-11 18:07:58 -04:00
Justin M. Keyes
af0ca25ba9 man.vim: avoid creating extra blank buffers. 2015-09-25 22:01:03 -04:00
Justin M. Keyes
2169721b94 man.vim: accept [count] for section number. 2015-09-23 00:06:27 -04:00
Justin M. Keyes
3c32ae2ff3 man.vim: window-local options
Set window-local options only on a newly-created "man" tab or if we're
already in one.
2015-09-23 00:06:27 -04:00
Justin M. Keyes
45724e2c41 man.vim: man#get_page(): parse page and section.
- Eliminate man#pre_get_page().
- Temporarily remove () from 'iskeyword' to avoid spurious \k match.
2015-09-23 00:06:26 -04:00
Justin M. Keyes
4fb75d61c2 man.vim: convert ftplugin to actual plugin.
- do not create leader maps
- :norm! instead of :norm
- :keepjumps during layout
- use blackhole reg to avoid polluting unnamed reg
- format buffer name as "man://foo(2)"
- simulate behavior of `man`
    - buffer-local mapping of q to quit
    - open in new tab instead of new window
    - set 'nolist'
    - set tabstop=8
2015-09-23 00:05:33 -04:00
Florian Walch
e3540a430b provider/pythonx: Improve detection code and error messages.
"python -c" returns 1 in case of an error. Use a return code of 2 if
the Neovim module is not found to distinguish these cases.

Verify the interpreter version before checking for an installed Neovim
module. Show a new error message if the Python interpreter version
is below the minimum required version.

Always use "pkgutil" to determine if the Neovim module is installed.
In contrast to "importlib", which was used for Python 3,
"pkgutil.find_loader" is available for all Python versions [1,2].
"pkgutil.find_loader" internally uses "importlib" for Python >= 3.3 [2].
Also, the previously used "importlib.find_loader" is only available
since Python 3.3 (so checking the major Python version was not enough)
and deprecated since Python 3.4 [3].
Finally, conditioning on the major version in Vimscript was incorrect,
as checking the Neovim module for a certain Python major version does
not mean that the tested interpreters are actually of that version.
For example, we test the "python" executable, which is Python 2 on
Ubuntu and Python 3 on Arch Linux.

[1] https://docs.python.org/2/library/pkgutil.html#pkgutil.find_loader
[2] https://docs.python.org/3/library/pkgutil.html#pkgutil.find_loader
[3] https://docs.python.org/3/library/importlib.html#importlib.find_loader
2015-09-17 18:48:26 +02:00
Jonathan Skeate
5613b62224 host.vim: expand $MYVIMRC. #3342
According to the vim helpfile:

> fnamemodify({fname}, {mods})
>    ...
>    Note: Environment variables don't work in {fname}, use
>    expand() first then.

So this causes issues if your $MYVIMRC contains environment variables
(e.g. $XDG_CONFIG_HOME)
2015-09-14 21:59:13 -04:00
Jakob Schnitzer
c478dd5ab4 python: remove current working directory from path
Before, running Nvim in a directory containing a Python module `neovim`,
or one that is imported by it or a plugin, will load that module and not
the system one. So Nvim might be tricked into running arbitrary scripts
from the current working directory.

Fixes #1665
Fixes #2530
2015-09-14 12:06:49 +02:00
sanmiguel
0ec6a9c3c3 provider/pythonx.vim: Use shell-agnostic construction. #3190 2015-08-21 00:33:29 -04:00
Justin M. Keyes
681ee8131c Merge pull request #2910 from blueyed/python-fix-path_hook
Python: fixes for sys.path_hooks handler
2015-08-17 19:21:19 -04:00
Justin M. Keyes
616b787d12 tutor: avoid 'wildignore' pain 2015-08-16 21:13:26 -04:00
Justin M. Keyes
197a5ad376 Merge pull request #2700 from fmoralesc/vim-tutor-mode
runtime: Include vim-tutor-mode
2015-08-15 14:56:46 -04:00
Felipe Morales
4fc1ab779d runtime: Include vim-tutor-mode
vim-tutor-mode provides a mechanism to write and read interactive
tutorials in vim. It's aim is to replace the venerable vimtutor with a
more modern system.

The plugin's development is maintained at https://github.com/fmoralesc
/vim-tutor-mode

Closes #2351.
2015-08-15 15:25:30 -03:00
Björn Linse
d4ebbaa91a clipboard: support clipboard=unnamedplus,unnamed 2015-08-07 13:06:13 +02:00
Justin Gassner
63d5b8707b vim-patch:5d89d9b #2922
Update runtime files.

https://code.google.com/p/vim/source/detail?r=5d89d9b40499059e1a64dc35fbae94313fba0098
2015-08-02 05:17:49 -04:00
Björn Linse
c7bfbd4fd9 python3: remove decoding logic, as this is now done in plugin host #3026
DecodeHook isn't needed since neovim/python-client#53
rpc methods won't pass bytes anymore, ref neovim/python-client#129
2015-07-18 22:39:28 +02:00
Björn Linse
73d9cd85df rplugin: Don't error if plugin is registered before host #2961
This makes it possible to register a lazy loaded host in a plugin/ file.
Previously this caused an error on restart after :UpdateRemotePlugins
2015-07-10 22:11:13 +02:00
Daniel Hahler
07e538d589 python: VimPathFinder: remove unused load_module method
This method was not used, but `VimModuleLoader.load_module` is.
2015-07-09 13:45:25 +02:00
Daniel Hahler
5e32120236 python: path_hook: properly implement PEP302
The path hook used to load the module already in the `find_module` hook.

This caused different behaviour between Python 2.7 and 3.3, where the
former would call the `VimModuleLoader`, while Python 3.3 appears to
short-circuited this (because the module was loaded already).

This patch will now only find the module, but not load it in the
`find_module` hook.
2015-07-09 13:43:57 +02:00
Daniel Hahler
ad6dfa6669 python: VimModuleLoader: check sys.modules[fullname]
This is required by PEP302 for `reload()`ing modules.
2015-07-09 13:43:57 +02:00
Daniel Hahler
1cc37f32b8 python: VimPathFinder: use find_spec for Python 3.4
Fixes https://github.com/neovim/neovim/issues/2909
2015-07-09 13:43:29 +02:00
Nick Hynes
0ffd51425e rplugin: pass additional info to host factory function #2920 2015-07-03 12:12:21 -04:00
Björn Linse
3fcfd52422 clipboard: avoid redundant error message on clipboard_get failure .
Fixes #2712

Helped-By: Michael Reed <m.reed@mykolab.com>
2015-06-25 19:30:29 -04:00
Björn Linse
d133502e98 clipboard: keep track of ownership and cache clipboard data locally
Helped-By: Justin M. Keyes <justinkz@gmail.com>
2015-06-25 19:30:28 -04:00
Björn Linse
a0e89978bd clipboard: don't use &shell in clipboard provider 2015-06-25 19:16:59 -04:00
Nick Hynes
105b8f1070 rplugin: allow users to register hosts #2896 2015-06-25 19:01:38 -04:00
Florian Walch
e8c68aa7ee provider/pythonx: Show absolute path to executable in error message. 2015-06-09 10:55:25 +03:00
Florian Walch
cfa278c72e provider/pythonx: Merge s:check_version() and s:check_interpreter(). 2015-06-09 10:29:46 +03:00
Florian Walch
4dc3c84c5a provider/pythonx: Don't use Python 3 interpreter for +python.
The executable 'python' can refer to either Python 2 or Python 3. Add a
check to only accept Python 2 interpreters as providers for +python.

Also improve the error messages.

Resolves #2734.
2015-06-09 10:29:46 +03:00
Daniel Hahler
c148427c89 provider/pythonx: return error from Detect
Ref: https://github.com/blueyed/neovim/commit/9b653ce0#commitcomment-11195449
2015-06-09 10:29:46 +03:00
Daniel Hahler
8d42db1eea remote#host#RequirePythonHost: fix reference to log
I could not find a reference to NVIM_PYTHON_PYTHON_LOG anywhere, and
python-client looks for NVIM_PYTHON_LOG_FILE.

~/.nvimlog appears to be hardcoded and enabled by default.  This would
need to be adjusted when this changes.
2015-06-09 10:29:46 +03:00
Daniel Hahler
2111f28fc5 provider/python: Call: fix usage of 'finish' in function
Do not call it again in case of an exception in `remote#host#Require`
(ref: https://github.com/neovim/neovim/pull/2549#issuecomment-102674350).
2015-06-09 10:29:46 +03:00
Daniel Hahler
866e587b88 provider/python: define Prog and Error functions always
`provider#pythonX#Error` and `provider#pythonX#Prog` are currently meant
for debugging only (the error message is not being used), and should
therefore be defined always, especially in case of errors.

Ref: https://github.com/neovim/neovim/pull/2549#issuecomment-98607580
2015-06-09 10:29:46 +03:00
Daniel Hahler
3b0ec6599c provider/pythonx: Detect: only return valid versions
The `check` return value of `s:check_version` was not being used, and it
was returned always.
2015-06-09 10:29:45 +03:00
Daniel Hahler
12f7229e7e provider/pythonx: test python3/2 first, do not test python3.2
python3/python2 will typically point at the default / most recent
interpreter.
2015-06-09 10:29:45 +03:00
Daniel Hahler
6fa10ab9cb provider/pythonx: add reference to ":help nvim-python" for error 2015-06-09 10:29:45 +03:00
Daniel Hahler
905f34cf30 provider/pythonx: fix grammar with error 2015-06-09 10:29:45 +03:00
Daniel Hahler
75db0c37a7 provider/pythonx: only call system("python") once
`s:check_interpreter` will query/return the version also, so that
`s:check_version` can just use that, without calling "python" again.
2015-06-09 10:29:45 +03:00
Shougo Matsushita
7dc241ac78 rplugin: Improve remote plugins detection messages #2769 2015-05-31 12:47:54 -04:00
Florian Walch
90fae3663f vim-patch:4abac79 #2694
Update runtime files.

https://code.google.com/p/vim/source/detail?r=4abac79c0b7ae7aac0cb32d9930e155de628b63f
2015-05-19 12:44:56 +03:00