aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/health.vim3
-rw-r--r--runtime/autoload/health/nvim.vim51
-rw-r--r--runtime/autoload/remote/host.vim2
-rw-r--r--runtime/doc/deprecated.txt4
-rw-r--r--runtime/doc/eval.txt32
-rw-r--r--runtime/doc/insert.txt2
-rw-r--r--runtime/doc/vim_diff.txt18
-rw-r--r--runtime/ftplugin/man.vim2
-rw-r--r--runtime/syntax/vim.vim8
9 files changed, 101 insertions, 21 deletions
diff --git a/runtime/autoload/health.vim b/runtime/autoload/health.vim
index 783c30cbf6..336adc65e5 100644
--- a/runtime/autoload/health.vim
+++ b/runtime/autoload/health.vim
@@ -13,6 +13,9 @@ function! s:enhance_syntax() abort
syntax keyword healthSuggestion SUGGESTIONS
highlight link healthSuggestion String
+
+ " We do not care about markdown syntax errors in :CheckHealth output.
+ highlight! link markdownError Normal
endfunction
" Runs the specified healthchecks.
diff --git a/runtime/autoload/health/nvim.vim b/runtime/autoload/health/nvim.vim
index d769525373..60e56034e1 100644
--- a/runtime/autoload/health/nvim.vim
+++ b/runtime/autoload/health/nvim.vim
@@ -57,6 +57,57 @@ function! s:check_manifest() abort
endif
endfunction
+function! s:check_tmux() abort
+ if empty($TMUX) || !executable('tmux')
+ return
+ endif
+ call health#report_start('tmux configuration')
+ let suggestions = ["Set escape-time in ~/.tmux.conf: set-option -sg escape-time 10",
+ \ 'See https://github.com/neovim/neovim/wiki/FAQ']
+ let cmd = 'tmux show-option -qvgs escape-time'
+ let out = system(cmd)
+ let tmux_esc_time = substitute(out, '\v(\s|\r|\n)', '', 'g')
+
+ if v:shell_error
+ call health#report_error('command failed: '.cmd."\n".out)
+ elseif empty(tmux_esc_time)
+ call health#report_error('escape-time is not set', suggestions)
+ elseif tmux_esc_time > 500
+ call health#report_error(
+ \ 'escape-time ('.tmux_esc_time.') is higher than 300ms', suggestions)
+ else
+ call health#report_ok('escape-time = '.tmux_esc_time.'ms')
+ endif
+endfunction
+
+function! s:check_terminfo() abort
+ if !executable('infocmp')
+ return
+ endif
+ call health#report_start('terminfo')
+ let suggestions = [
+ \ "Set key_backspace to \\177 (ASCII BACKSPACE). Run these commands:\n"
+ \ .'infocmp $TERM | sed ''s/kbs=^[hH]/kbs=\\177/'' > $TERM.ti'
+ \ ."\n"
+ \ .'tic $TERM.ti',
+ \ 'See https://github.com/neovim/neovim/wiki/FAQ']
+ let cmd = 'infocmp -L'
+ let out = system(cmd)
+ let kbs_entry = matchstr(out, 'key_backspace=\S*')
+
+ if v:shell_error
+ call health#report_error('command failed: '.cmd."\n".out)
+ elseif !empty(matchstr(out, '\Vkey_backspace=^H'))
+ call health#report_error('key_backspace (kbs) entry is ^H (ASCII DELETE): '
+ \ .kbs_entry, suggestions)
+ else
+ call health#report_info('key_backspace terminfo entry: '
+ \ .(empty(kbs_entry) ? '? (not found)' : kbs_entry))
+ endif
+endfunction
+
function! health#nvim#check() abort
call s:check_manifest()
+ call s:check_tmux()
+ call s:check_terminfo()
endfunction
diff --git a/runtime/autoload/remote/host.vim b/runtime/autoload/remote/host.vim
index 1f30b91ab8..51f7e5886f 100644
--- a/runtime/autoload/remote/host.vim
+++ b/runtime/autoload/remote/host.vim
@@ -190,7 +190,7 @@ function! s:RegistrationCommands(host) abort
call remote#host#RegisterClone(host_id, a:host)
let pattern = s:plugin_patterns[a:host]
let paths = globpath(&rtp, 'rplugin/'.a:host.'/'.pattern, 0, 1)
- let paths = map(paths, 'tr(v:val,"\\","/")') " Normalize slashes #4795
+ let paths = map(paths, 'tr(resolve(v:val),"\\","/")') " Normalize slashes #4795
let paths = uniq(sort(paths))
if empty(paths)
return []
diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt
index 2b69929cfe..6997d331e4 100644
--- a/runtime/doc/deprecated.txt
+++ b/runtime/doc/deprecated.txt
@@ -6,6 +6,10 @@
Nvim *deprecated*
+The items listed below are "deprecated". This means they will be removed in
+the future. They should not be used in new scripts, and old scripts should be
+updated.
+
==============================================================================
Normal commands ~
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 1eb5ec45c0..cfd62bacfe 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -6840,23 +6840,30 @@ system({cmd} [, {input}]) *system()* *E677*
Get the output of the shell command {cmd} as a |string|. {cmd}
will be run the same as in |jobstart()|. See |systemlist()|
to get the output as a |List|.
-
- When {input} is given and is a string this string is written
- to a file and passed as stdin to the command. The string is
- written as-is, you need to take care of using the correct line
- separators yourself.
- If {input} is given and is a |List| it is written to the file
- in a way |writefile()| does with {binary} set to "b" (i.e.
- with a newline between each list item with newlines inside
- list items converted to NULs).
- Pipes are not used.
+ Not to be used for interactive commands.
+
+ If {input} is a string it is written to a pipe and passed as
+ stdin to the command. The string is written as-is, line
+ separators are not changed.
+ If {input} is a |List| it is written to the pipe as
+ |writefile()| does with {binary} set to "b" (i.e. with
+ a newline between each list item, and newlines inside list
+ items converted to NULs).
+ *E5677*
+ Note: system() cannot write to or read from backgrounded ("&")
+ shell commands, e.g.: >
+ :echo system("cat - &", "foo"))
+< which is equivalent to: >
+ $ echo foo | bash -c 'cat - &'
+< The pipes are disconnected (unless overridden by shell
+ redirection syntax) before input can reach it. Use
+ |jobstart()| instead.
Note: Use |shellescape()| or |::S| with |expand()| or
|fnamemodify()| to escape special characters in a command
argument. Newlines in {cmd} may cause the command to fail.
The characters in 'shellquote' and 'shellxquote' may also
cause trouble.
- This is not to be used for interactive commands.
The result is a String. Example: >
:let files = system("ls " . shellescape(expand('%:h')))
@@ -6871,9 +6878,6 @@ system({cmd} [, {input}]) *system()* *E677*
The command executed is constructed using several options when
{cmd} is a string: 'shell' 'shellcmdflag' {cmd}
- The command will be executed in "cooked" mode, so that a
- CTRL-C will interrupt the command (on Unix at least).
-
The resulting error code can be found in |v:shell_error|.
This function will fail in |restricted-mode|.
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index 818d6cf64c..a82e17c857 100644
--- a/runtime/doc/insert.txt
+++ b/runtime/doc/insert.txt
@@ -1436,7 +1436,7 @@ original HTML files completion of tags (and only tags) isn't context aware.
RUBY *ft-ruby-omni* {Nvim}
-NOTE: Completion for ruby code is not currently provided by Nvim.
+NOTE: |compl-omni| for Ruby code requires |provider-ruby| to be installed.
Ruby completion will parse your buffer on demand in order to provide a list of
completions. These completions will be drawn from modules loaded by 'require'
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 249208911b..bb1f993ab6 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -76,6 +76,15 @@ Python plugins |provider-python|
Clipboard integration |provider-clipboard|
+USER EXPERIENCE ~
+
+A major goal of Nvim is to work intuitively and consistently. For example,
+Nvim does not have `-X`, a platform-specific option available in some Vim
+builds (with potential surprises: http://stackoverflow.com/q/14635295). Nvim
+avoids features that cannot be provided on all platforms--instead that is
+delegated to external plugins/extensions.
+
+
OTHER FEATURES ~
|bracketed-paste-mode| is built-in and enabled by default.
@@ -99,6 +108,7 @@ Options:
Commands:
|:CheckHealth|
+ |:drop| is available on all platforms
|:Man| is available by default, with many improvements such as completion
Functions:
@@ -131,10 +141,10 @@ are always available and may be used simultaneously in separate plugins. The
`neovim` pip package must be installed to use Python plugins in Nvim (see
|provider-python|).
-|:!| and |system()| do not support "interactive" commands; use |:terminal| for
-that instead. Terminal Vim supports interactive |:!| and |system()|, but gui
-Vim does not. See ":help gui-pty" in Vim:
- http://vimdoc.sourceforge.net/htmldoc/gui_x11.html#gui-pty
+|:!| does not support "interactive" commands. Use |:terminal| instead.
+(GUI Vim has a similar limitation, see ":help gui-pty" in Vim.)
+
+|system()| does not support writing/reading "backgrounded" commands. |E5677|
|mkdir()| behaviour changed:
1. Assuming /tmp/foo does not exist and /tmp can be written to
diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim
index 02d2b4e557..f6fefd0155 100644
--- a/runtime/ftplugin/man.vim
+++ b/runtime/ftplugin/man.vim
@@ -21,7 +21,7 @@ if has('vim_starting')
" all caps it is impossible to tell what the original capitilization was.
let ref = tolower(matchstr(getline(1), '^\S\+'))
let b:man_sect = man#extract_sect_and_name_ref(ref)[0]
- execute 'file man://'.ref
+ execute 'silent file man://'.ref
endif
setlocal buftype=nofile
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 5c570eb52a..32e871ea79 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -5,6 +5,14 @@
" Version: 7.4-45
" Automatically generated keyword lists: {{{1
+" #############################################################################
+" #############################################################################
+" Note: Be careful when merging the upstream version of this file.
+" Much of this is generated by scripts/genvimvim.lua (result is installed
+" to: $VIMRUNTIME/syntax/vim/generated.vim)
+" #############################################################################
+" #############################################################################
+
" Quit when a syntax file was already loaded {{{2
if exists("b:current_syntax")
finish