`RedirectStream` is used to redirect `stdout` and `stderr`, but are
missing certain I/O methods available on other file-like objects.
This causes external plugins (like `colorama`) to crash.
Inheriting from `io.IOBase` adds an abstract implementation of these
methods, which will at least keep the python code running.
Fixes#4045
Helped by @Shougo.
vim-patch:7.4.955
vim-patch:7.4.974
vim-patch:7.4.975
vim-patch:7.4.989
Port upstream vim patches 955, 974, 975 and 989. Mark patches
964, 968, 970, and 971, and 982 as NA. Update patch list to 1022.
patch 7.4.955
Problem: Vim doesn't recognize .pl6 and .pod6 files.
Solution: Recognize them as perl6 and pod6. (Mike Eve)
patch 7.4.974
Problem: When using :diffsplit the cursor jumps to the first line.
Solution: Put the cursor on the line related to where the cursor was before
the split.
patch 7.4.975
Problem: Using ":sort" on a very big file sometimes causes text to be
corrupted. (John Beckett)
Solution: Copy the line into a buffer before calling ml_append().
patch 7.4.989
Problem: Leaking memory when hash_add() fails. Coverity error 99126.
Solution: When hash_add() fails free the memory.
778 marked as not NA as it will be needed once vim patch 754 is merged
Marked as NA:
964 test 87 was deleted
968 tests 86/87 were deleted
970 guarded by: `# if defined(FEAT_GUI_GTK) || defined(PROTO`
and is inside a function that no longer exists
971 function table already sorted correctly
982 marked as NA because Neovim tests are only specified in exactly one location
Problem: New style testing is incomplete.
Solution: Add the runtest script to the list of distributed files.
Add the new functions to the function overview.
Rename the functions to match Vim function style.
Move undolevels testing into a new style test script.
683fa185a4
Problem: Writing tests for Vim script is hard.
Solution: Add assertEqual(), assertFalse() and assertTrue() functions. Add
the v:errors variable. Add the runtest script. Add a first new
style test script.
43345546ae
Problem: The # register is not writable, it cannot be restored after
jumping around.
Solution: Make the # register writable. (Marcin Szamotulski)
3b3a9498d1
Problem: It's a bit clumsy to execute a command on a list of matches.
Solution: Add the ":ldo", ":lfdo", ":cdo" and ":cfdo" commands. (Yegappan
Lakshmanan)
aa23b37942
- Nvim has no concept of "huge" or "normal" features: the overwhelming
majority of features are compiled in by default
- Nvim does not link to X (X11), so doesn't support setting things via
~/.Xresources, among many other things
We do not support every Unix flavor in existence so note
that here.
We do not support Windows 95 or NT. Update the list to
the Windows versions we do support.
We only support OS X not classic Mac OS so note that too.
Currently,
```
if bool then
--stuff
elseif bool2 then
--morestuff
elseif bool3 then
--more stuff
else
--fail
end
```
Would get indented out strangely when using =. Now it behaves correctly.
Problem: The default conceal character is documented to be a space but it's
initially a dash. (Christian Brabandt)
Solution: Make the intial value a space.
4a42710695
Problem: It is not possible for a plugin to adjust to a changed setting.
Solution: Add the OptionSet autocommand event. (Christian Brabandt)
537443018d
It's not documentation in the same sense as the majority of files in
runtime/doc, so is of little use to most users and should probably not
be installed alongside the "real" documentation.
It may be full of good ideas, but it's also full of things which are no
longer applicable to Nvim, such as references to platforms we no longer
support (e.g., MS-DOS), Vi compatibility, Autoconf, the Perl interface,
etc.
If someone is looking for things to fix or improve, the GitHub issue
tracker should prove useful, and, unlike todo.txt, the issues are
generally much more relevant to Nvim. Besides all that, removing
todo.txt makes porting runtime patches a bit easier.
refs #2911, discussed briefly in #2608 and #2553
All `{not in Vi}' tags have been removed, so the first sentence is no
longer true. As for the second sentence, the header ("Differences
between Vim and Vi") is already self-explanatory, so it can be removed
as well.
These are more like notes than proper documentation, so remove it as
they're not of much use unless you don't know what you're looking for.
Many of these are somewhat useful, but many also duplicate what's
already documented elsewhere. In any case, vi_diff.txt is the last
place that assorted tips'n'tricks should be located (we already have
tips.txt!!!).
In regards to Nvim, it's very outdated; for an updated list of such
arguments refer to the manual page or `nvim --help`. In all other
regards, it's of little to no use to end-users.
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
Problem: On some systems automatically adding the missing EOL causes
problems. Setting 'binary' has too many side effects.
Solution: Add the 'fixeol' option, default on. (Pavel Samarkin)
34d72d4b6c
"vimrc" refers to all files that are used to configure Neovim. The main
configuration file is init.vim nowadays.
All nvimrc references that are left refer to a local ".nvimrc" which is read
if 'exrc' is set. ".ngvimrc" references were completely wiped.
Closes#3552.
Currently the logfile (":profile start {logfile}") only gets written when Vim
exits. This new command allows to dump the log immediately without exiting.
Problem: "zr" and "zm" do not take a count.
Solution: Implement the count, restrict the fold level to the maximum
nesting depth. (Marcin Szamotulski)
7d2757a472
From the documentation itself:
:[range]o[pen] Works like |:visual|: end Ex mode.
{Vi: start editing in open mode}
...
Vim does not support open mode, since it's not really useful. For
those situations where ":open" would start open mode Vim will leave Ex
mode, which allows executing the same commands, but updates the whole
screen instead of only one line.
Part of the reason behind this is to make removing vi_diff.txt easier,
although it's also because :open is not too useful.
Helped-by: @fdinoff
Helped-by: @dsummersl
Helped-by: @mhinz
Helped-by: @justinmk
A couple lines tripped me up while reading through this document for the first
time. This change aims to reword/rework these areas, so that they are clearer
on the first read.
All of this information is a combination of incorrect, outdated, or
redundant given its availability in other help files.
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Reviewed-by: Felipe Morales <hel.sheep@gmail.com>
Problem: Moving the cursor in Insert mode starts new undo sequence.
Solution: Add CTRL-G U to keep the undo sequence for the following
cursor movement command. (Christian Brabandt)
8b5f65a527Closes#3492
Note about ~/.local/share/nvim/site used in one usr_\* file: this one talks
about user-local installation of third-party plugins, and
~/.local/share/nvim/site is the proper place for them. Most other files talk
about user own configuration and this is ~/.config.
Commit e3568364 ("default: enable 'langnoremap'. #2853") enabled it by
default but forgot to remove the lines saying it's disabled by default.
tweaked by Michael Reed
Reviewed-by: Felipe Morales <hel.sheep@gmail.com>
[ci skip]
It is not logical that on UNIX permissions can prevent even writing temporary
file, while on other OS it will first write temporary file and then fail during
rename.
Modifications:
- If file was not written due to write error then writing stops and temporary
file will not be renamed.
- If NeoVim detects that target file is not a ShaDa file then temporary file
will not be renamed.
Notes:
- E136 code greatly changed its meaning: now it is write error and not read
error.
- E195 was removed because shada_read_everything will already do all the
necessary error reporting.
- E886 can be reported by both :rshada and :wshada, but :rshada comes first and
AFAIR it is the only error which is not E575 and can be reported by :rshada.
What works:
1. ShaDa file dumping: header, registers, jump list, history, search patterns,
substitute strings, variables.
2. ShaDa file reading: registers, global marks, variables.
Most was not tested.
TODO:
1. Merging.
2. Reading history, local marks, jump and buffer lists.
3. Documentation update.
4. Converting some data from &encoding.
5. Safer variant of dumping viminfo (dump to temporary file then rename).
6. Removing old viminfo code (currently masked with `#if 0` in a ShaDa file for
reference).
- 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
- new feature: if the first character of 'keywordprg' is ":", the
command is invoked as a Vim ex-command prefixed with [count].
- change default 'keywordprg' to :Man
"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
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)
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#1665Fixes#2530
I see that problem fixed by #2801 was resurrected by making help tags file
generated in a more direct way. This fixes the hang without using the empty
file.
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.
Also move introduction to Nvim and topic overview to nvim.txt.
Reviewed-by: Michael Reed <Pyrohh@users.noreply.github.com>
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Reviewed-by: Felipe Morales <hel.sheep@gmail.com>
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Reviewed-by: Michael Reed <Pyrohh@users.noreply.github.com>
There's no way this isn't some long-running joke:
"Just as ':print'. Was apparently added to Vi for
people that keep the shift key pressed too long..."
Note: A user command can overrule this command.
Regarding ':X': the command has been removed for a while, but the
documentation must have been missed, so remove it here.
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Helped-by: @jusga
- CPO_ALL and CPO_VI are identical, so merge them
- No longer check for the environment variable 'VIM_POSIX'
- In vim_diff.txt, mention the removal of 'cpoptions' flags
Added: TermOpen autocmd
Added: terminal mode (un)map commands
Options and commands not available in neovim ('cp' and variants, termcap
options, :shell, :fixdel) are highlighted as errors. Previously deleted
entries were restored.
Co-authored-by: Felipe Morales <hel.sheep@gmail.com>
'guioptions' is mentioned in the "Option Defaults" section of vim_diff,
and while its default did indeed change, it was only because the 't'
flag was removed. To make that clear, move its reference to the
"Removed Features" section instead.
Remove stray instance of 't' flag from GO_ALL. Most if not all of the
GO_* #defines are unused, but lets keep them for now as it's not clear
whether they won't be used by Nvim GUIs.
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.
Presumably due to tarruda's unifdefing, it was already a no-op at the
time of nvim's first commit.
It's probably better to be clear that it doesn't exist, as opposed to
users thinking `:set guipty` is doing something when it isn't.