Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into tabsidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
rbtnn committed Nov 14, 2024
2 parents b0759a4 + 7c3b65e commit 92df5d3
Show file tree
Hide file tree
Showing 32 changed files with 365 additions and 81 deletions.
8 changes: 8 additions & 0 deletions runtime/autoload/dist/ft.vim
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ export def FTcls()
endif
enddef

export def FTll()
if getline(1) =~ ';\|\<source_filename\>\|\<target\>'
setf llvm
else
setf lifelines
endif
enddef

export def FTlpc()
if exists("g:lpc_syntax_for_c")
var lnum = 1
Expand Down
8 changes: 3 additions & 5 deletions runtime/autoload/netrw.vim
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
" 2024 Nov 07 by Vim Project: use keeppatterns to prevent polluting the search history
" 2024 Nov 07 by Vim Project: fix a few issues with netrw tree listing (#15996)
" 2024 Nov 10 by Vim Project: directory symlink not resolved in tree view (#16020)
" 2024 Nov 14 by Vim Project: small fixes to netrw#BrowseX (#16056)
" }}}
" Former Maintainer: Charles E Campbell
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
Expand Down Expand Up @@ -5004,7 +5005,7 @@ if has('unix')
let args = a:args
exe 'silent !' ..
\ ((args =~? '\v<\f+\.(exe|com|bat|cmd)>') ?
\ 'cmd.exe /c start "" /b ' .. args :
\ 'cmd.exe /c start /b ' .. args :
\ 'nohup ' .. args .. ' ' .. s:redir() .. ' &')
\ | redraw!
endfun
Expand Down Expand Up @@ -5083,10 +5084,7 @@ endif
" given filename; typically this means given their extension.
" 0=local, 1=remote
fun! netrw#BrowseX(fname,remote)
if a:remote == 0 && isdirectory(a:fname)
" if its really just a local directory, then do a "gf" instead
exe "e ".a:fname
elseif a:remote == 1 && a:fname !~ '^https\=:' && a:fname =~ '/$'
if a:remote == 1 && a:fname !~ '^https\=:' && a:fname =~ '/$'
" remote directory, not a webpage access, looks like an attempt to do a directory listing
norm! gf
endif
Expand Down
3 changes: 1 addition & 2 deletions runtime/defaults.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" The default vimrc file.
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2024 Nov 09
" Last Change: 2024 Nov 14
" Former Maintainer: Bram Moolenaar <[email protected]>
"
" This is loaded if no vimrc file was found.
Expand Down Expand Up @@ -39,7 +39,6 @@ set backspace=indent,eol,start
set history=200 " keep 200 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set wildmenu " display completion matches in a status line

set ttimeout " time out for key codes
set ttimeoutlen=100 " wait up to 100ms after Esc for special key
Expand Down
8 changes: 4 additions & 4 deletions runtime/doc/builtin.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.1. Last change: 2024 Nov 11
*builtin.txt* For Vim version 9.1. Last change: 2024 Nov 14


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -3790,10 +3790,10 @@ getbufvar({buf}, {varname} [, {def}]) *getbufvar()*
getcellpixels() *getcellpixels()*
Returns a |List| of terminal cell pixel size.
List format is [xpixels, ypixels].
Only works on Unix. For gVim and on other systems,
returns [-1, -1].
Only works on (terminal) Unix. For gVim, on other systems and
on failure returns [].

Return type: list<Number>
Return type: list<any>


getcellwidths() *getcellwidths()*
Expand Down
8 changes: 7 additions & 1 deletion runtime/doc/filetype.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 9.1. Last change: 2024 Nov 12
*filetype.txt* For Vim version 9.1. Last change: 2024 Nov 14


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -843,6 +843,12 @@ To enable folding use this: >
let g:markdown_recommended_style = 0
ORG *ft-org-plugin*

To enable folding use this: >
let g:org_folding = 1
<

PDF *ft-pdf-plugin*

Two maps, <C-]> and <C-T>, are provided to simulate a tag stack for navigating
Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/message.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*message.txt* For Vim version 9.1. Last change: 2024 Mar 13
*message.txt* For Vim version 9.1. Last change: 2024 Nov 14


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -29,7 +29,7 @@ depends on the 'shortmess' option.
Clear messages, keeping only the {count} most
recent ones.

The number of remembered messages is fixed at 200.
The number of remembered messages is determined by the 'msghistory' option.

*g<*
The "g<" command can be used to see the last page of previous command output.
Expand Down
13 changes: 10 additions & 3 deletions runtime/doc/options.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*options.txt* For Vim version 9.1. Last change: 2024 Nov 06
*options.txt* For Vim version 9.1. Last change: 2024 Nov 14


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -4440,7 +4440,8 @@ A jump table for the options with a short description can be found at |Q_op|.
global
A history of ":" commands, and a history of previous search patterns
is remembered. This option decides how many entries may be stored in
each of these histories (see |cmdline-editing|).
each of these histories (see |cmdline-editing| and 'msghistory' for
the number of messages to remember).
The maximum value is 10000.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
Expand Down Expand Up @@ -5917,6 +5918,12 @@ A jump table for the options with a short description can be found at |Q_op|.
time in msec between two mouse clicks for the second click to be
recognized as a multi click.

*'msghistory'* *'mhi'*
'msghistory' 'mhi' number (default 500)
global
Determines how many entries are remembered in the |:messages| history.
The maximum value is 10000.

*'mzquantum'* *'mzq'*
'mzquantum' 'mzq' number (default 100)
global
Expand Down Expand Up @@ -9493,7 +9500,7 @@ A jump table for the options with a short description can be found at |Q_op|.
happens when there are special characters.

*'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'*
'wildmenu' 'wmnu' boolean (default off, set in |defaults.vim|)
'wildmenu' 'wmnu' boolean (default on)
global
When 'wildmenu' is on, command-line completion operates in an enhanced
mode. On pressing 'wildchar' (usually <Tab>) to invoke completion,
Expand Down
10 changes: 7 additions & 3 deletions runtime/doc/os_mac.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*os_mac.txt* For Vim version 9.1. Last change: 2019 Apr 21
*os_mac.txt* For Vim version 9.1. Last change: 2024 Nov 14


VIM REFERENCE MANUAL by Bram Moolenaar et al.
Expand Down Expand Up @@ -118,9 +118,13 @@ Shift-Control-2.

When reporting any Mac specific bug or feature change, please use the vim-mac
maillist |vim-mac|. However, you need to be subscribed. An alternative is to
send a message to the current MacVim maintainers:
report issues either directly at the Vim github repository:

[email protected]
https://github.com/vim/vim/issues

or for MacVim specific issues, you may report those over here:

https://github.com/macvim-dev/macvim/issues

==============================================================================
7. Compiling Vim *mac-compile*
Expand Down
2 changes: 2 additions & 0 deletions runtime/doc/tags
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ $quote eval.txt /*$quote*
'mesg' vi_diff.txt /*'mesg'*
'mfd' options.txt /*'mfd'*
'mh' options.txt /*'mh'*
'mhi' options.txt /*'mhi'*
'mis' options.txt /*'mis'*
'mkspellmem' options.txt /*'mkspellmem'*
'ml' options.txt /*'ml'*
Expand Down Expand Up @@ -531,6 +532,7 @@ $quote eval.txt /*$quote*
'mousetime' options.txt /*'mousetime'*
'mp' options.txt /*'mp'*
'mps' options.txt /*'mps'*
'msghistory' options.txt /*'msghistory'*
'msm' options.txt /*'msm'*
'mzq' options.txt /*'mzq'*
'mzquantum' options.txt /*'mzquantum'*
Expand Down
3 changes: 2 additions & 1 deletion runtime/doc/version9.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*version9.txt* For Vim version 9.1. Last change: 2024 Nov 11
*version9.txt* For Vim version 9.1. Last change: 2024 Nov 14


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -41659,6 +41659,7 @@ Options: ~
popup
'findfunc' Vim function to obtain the results for a |:find|
command
'msghistory' Max number of messages to remember
'winfixbuf' Keep buffer focused in a window
'tabclose' Which tab page to focus after closing a tab page
't_xo' Terminal uses XON/XOFF handshaking (e.g. vt420)
Expand Down
5 changes: 4 additions & 1 deletion runtime/filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ au BufNewFile,BufRead */etc/sensors.conf,*/etc/sensors3.conf setf sensors
au BufNewFile,BufRead lftp.conf,.lftprc,*lftp/rc setf lftp

" Lifelines (or Lex for C++!)
au BufNewFile,BufRead *.ll setf lifelines
au BufNewFile,BufRead *.ll call dist#ft#FTll()

" Lilo: Linux loader
au BufNewFile,BufRead lilo.conf setf lilo
Expand Down Expand Up @@ -1472,6 +1472,9 @@ au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md
\ setf markdown |
\ endif

" Org (Emacs' org-mode)
au BufNewFile,BufRead *.org setf org

" Mason (it used to include *.comp, are those Mason files?)
au BufNewFile,BufRead *.mason,*.mhtml setf mason

Expand Down
12 changes: 12 additions & 0 deletions runtime/ftplugin/llvm.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
" Vim filetype plugin file
" Language: LLVM IR
" Last Change: 2024 Oct 22
" Maintainer: Wu, Zhenyu <[email protected]>

if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1

setl comments=:;
setl commentstring=;\ %s

let b:undo_ftplugin = "setl commentstring< comments<"
37 changes: 37 additions & 0 deletions runtime/ftplugin/org.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
" Vim filetype plugin file
" Language: Org
" Maintainer: Luca Saccarola <[email protected]>
" Last Change: 2024 Nov 14

if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1

if exists('b:undo_ftplugin')
let b:undo_ftplugin .= "|setl cms< com< fo< flp<"
else
let b:undo_ftplugin = "setl cms< com< fo< flp<"
endif

setl commentstring=#\ %s
setl comments=fb:*,fb:-,fb:+,b:#,b:\:

setl formatoptions+=nql
setl formatlistpat=^\\s*\\(\\(\\d\\|\\a\\)\\+[.)]\\|[+-]\\)\\s\\+

function OrgFoldExpr()
let l:depth = match(getline(v:lnum), '\(^\*\+\)\@<=\( .*$\)\@=')
if l:depth > 0 && synIDattr(synID(v:lnum, 1, 1), 'name') =~# '\m^orgHeadline'
return ">" . l:depth
endif
return "="
endfunction

if has("folding") && get(g:, 'org_folding', 0)
setl foldexpr=OrgFoldExpr()
setl foldmethod=expr
let b:undo_ftplugin .= "|setl foldexpr< foldmethod<"
endif

" vim: ts=8 sts=2 sw=2 et
6 changes: 5 additions & 1 deletion runtime/indent/sh.vim
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-sh-indent
" Changelog:
" 20241411 - Detect dash character in function keyword for
" bash mode (issue #16049)
" 20190726 - Correctly skip if keywords in syntax comments
" (issue #17)
" 20190603 - Do not indent in zsh filetypes with an `if` in comments
Expand Down Expand Up @@ -195,7 +197,9 @@ endfunction
function! s:is_function_definition(line)
return a:line =~ '^\s*\<\k\+\>\s*()\s*{' ||
\ a:line =~ '^\s*{' ||
\ a:line =~ '^\s*function\s*\k\+\s*\%(()\)\?\s*{'
\ a:line =~ '^\s*function\s*\k\+\s*\%(()\)\?\s*{' ||
\ ((&ft is# 'zsh' || s:is_bash()) &&
\ a:line =~ '^\s*function\s*\S\+\s*\%(()\)\?\s*{' )
endfunction

function! s:is_array(line)
Expand Down
22 changes: 22 additions & 0 deletions runtime/indent/testdir/bash.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
# vim: set ft=bash sw=2 noet:

# START_INDENT
a = 10
b = 20

function add() {
c = $((a + b))
}

function print {
# do nothing
}

if [[ $c -ge 15 ]];
then
print("ok")
else
print("not ok")
fi
# END_INDENT
22 changes: 22 additions & 0 deletions runtime/indent/testdir/bash.ok
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
# vim: set ft=bash sw=2 noet:

# START_INDENT
a = 10
b = 20

function add() {
c = $((a + b))
}

function print {
# do nothing
}

if [[ $c -ge 15 ]];
then
print("ok")
else
print("not ok")
fi
# END_INDENT
2 changes: 2 additions & 0 deletions runtime/optwin.vim
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,8 @@ call <SID>AddOption("terse", gettext("add 's' flag in 'shortmess' (don't show se
call <SID>BinOptionG("terse", &terse)
call <SID>AddOption("shortmess", gettext("list of flags to make messages shorter"))
call <SID>OptionG("shm", &shm)
call <SID>AddOption("msghistory", gettext("how many messages are remembered"))
call append("$", " \tset mhi=" . &mhi)
call <SID>AddOption("showcmd", gettext("show (partial) command keys in location given by 'showcmdloc'"))
let &sc = s:old_sc
call <SID>BinOptionG("sc", &sc)
Expand Down
11 changes: 6 additions & 5 deletions runtime/syntax/cfg.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
" Language: Good old CFG files
" Maintainer: Igor N. Prischepoff ([email protected], [email protected])
" Last change: 2012 Aug 11
" 2024 Nov 14 by Vim project: // only denotes a comment when starting a line (#16051)

" quit when a syntax file was already loaded
if exists ("b:current_syntax")
Expand All @@ -27,17 +28,17 @@ syn match CfgSection "{.*}"
syn match CfgString "\".*\"" contained
syn match CfgString "'.*'" contained

" Comments (Everything before '#' or '//' or ';')
" Comments (Everything before '#' or ';' or leading '//')
syn match CfgComment "#.*"
syn match CfgComment ";.*"
syn match CfgComment "\/\/.*"
syn match CfgComment "^\s*\/\/.*"

" Define the default highlighting.
" Only when an item doesn't have highlighting yet
hi def link CfgOnOff Label
hi def link CfgComment Comment
hi def link CfgSection Type
hi def link CfgString String
hi def link CfgComment Comment
hi def link CfgSection Type
hi def link CfgString String
hi def link CfgParams Keyword
hi def link CfgValues Constant
hi def link CfgDirectory Directory
Expand Down
Loading

0 comments on commit 92df5d3

Please sign in to comment.