diff options
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/autoload/man.vim | 5 | ||||
| -rw-r--r-- | runtime/autoload/provider/pythonx.vim | 3 | ||||
| -rw-r--r-- | runtime/doc/autocmd.txt | 9 |
3 files changed, 11 insertions, 6 deletions
diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim index 6fed4a54e3..251e6eee41 100644 --- a/runtime/autoload/man.vim +++ b/runtime/autoload/man.vim @@ -113,10 +113,11 @@ function! s:system(cmd, ...) abort endfunction function! s:get_page(path) abort + " Respect $MANWIDTH or default to window width. + let manwidth = empty($MANWIDTH) ? winwidth(0) : $MANWIDTH " Force MANPAGER=cat to ensure Vim is not recursively invoked (by man-db). " http://comments.gmane.org/gmane.editors.vim.devel/29085 - " Respect $MANWIDTH, or default to window width. - return s:system(['env', 'MANPAGER=cat', (empty($MANWIDTH) ? 'MANWIDTH='.winwidth(0) : ''), 'man', a:path]) + return s:system(['env', 'MANPAGER=cat', 'MANWIDTH='.manwidth, 'man', a:path]) endfunction function! s:put_page(page) abort diff --git a/runtime/autoload/provider/pythonx.vim b/runtime/autoload/provider/pythonx.vim index f46c260fa3..08a0f39b01 100644 --- a/runtime/autoload/provider/pythonx.vim +++ b/runtime/autoload/provider/pythonx.vim @@ -57,7 +57,8 @@ function! provider#pythonx#Detect(major_ver) abort if exists('g:python3_host_prog') return [g:python3_host_prog, ''] else - let progs = ['python3', 'python3.5', 'python3.4', 'python3.3', 'python'] + let progs = ['python3', 'python3.7', 'python3.6', 'python3.5', + \ 'python3.4', 'python3.3', 'python'] endif endif diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 4f23aee83d..65e091edf5 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -49,9 +49,6 @@ effects. Be careful not to destroy your text. ============================================================================== 2. Defining autocommands *autocmd-define* -Note: The ":autocmd" command cannot be followed by another command, since any -'|' is considered part of the command. - *:au* *:autocmd* :au[tocmd] [group] {event} {pat} [nested] {cmd} Add {cmd} to the list of commands that Vim will @@ -64,6 +61,12 @@ Note: The ":autocmd" command cannot be followed by another command, since any The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand. See |autocmd-buflocal|. +Note: The ":autocmd" command can only be followed by another command when the +'|' appears before {cmd}. This works: > + :augroup mine | au! BufRead | augroup END +But this sees "augroup" as part of the defined command: > + :augroup mine | au BufRead * set tw=70 | augroup END + Note that special characters (e.g., "%", "<cword>") in the ":autocmd" arguments are not expanded when the autocommand is defined. These will be expanded when the Event is recognized, and the {cmd} is executed. The only |