Skip to content

Commit

Permalink
Merge remote-tracking branch 'vim/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ychin committed Feb 5, 2024
2 parents 73ed6d9 + 0f4054f commit 4e39985
Show file tree
Hide file tree
Showing 514 changed files with 11,776 additions and 3,400 deletions.
9 changes: 9 additions & 0 deletions .github/CODEOWNERS_vim
Expand Up @@ -13,6 +13,7 @@ runtime/autoload/freebasic.vim @dkearns
runtime/autoload/getscript.vim @cecamp
runtime/autoload/haskell.vim @alx741
runtime/autoload/javascript.vim @jsit
runtime/autoload/modula2.vim @dkearns
runtime/autoload/netrw.vim @cecamp
runtime/autoload/netrwFileHandlers.vim @cecamp
runtime/autoload/netrwSettings.vim @cecamp
Expand Down Expand Up @@ -65,6 +66,7 @@ runtime/compiler/eruby.vim @dkearns
runtime/compiler/fbc.vim @dkearns
runtime/compiler/gawk.vim @dkearns
runtime/compiler/gjs.vim @dkearns
runtime/compiler/gm2.vim @dkearns
runtime/compiler/go.vim @dbarnett
runtime/compiler/haml.vim @tpope
runtime/compiler/hare.vim @rsaihe
Expand Down Expand Up @@ -182,6 +184,7 @@ runtime/ftplugin/m3quake.vim @dkearns
runtime/ftplugin/markdown.vim @tpope
runtime/ftplugin/matlab.vim @cecamp
runtime/ftplugin/meson.vim @Liambeguin
runtime/ftplugin/modula2.vim @dkearns
runtime/ftplugin/modula3.vim @dkearns
runtime/ftplugin/nginx.vim @chr4
runtime/ftplugin/nroff.vim @a-vrma
Expand Down Expand Up @@ -339,6 +342,7 @@ runtime/syntax/shared/hgcommitDiff.vim @vegerot
runtime/syntax/abaqus.vim @costerwi
runtime/syntax/aidl.vim @dpelle
runtime/syntax/amiga.vim @cecamp
runtime/syntax/ant.vim @dkearns
runtime/syntax/arduino.vim @johshoff
runtime/syntax/asciidoc.vim @aerostitch
runtime/syntax/asm.vim @dkearns
Expand All @@ -355,6 +359,7 @@ runtime/syntax/cabalconfig.vim @coot
runtime/syntax/cabalproject.vim @coot
runtime/syntax/cf.vim @ernstvanderlinden
runtime/syntax/chatito.vim @ObserverOfTime
runtime/syntax/chuck.vim @gacallea
runtime/syntax/clojure.vim @axvr
runtime/syntax/cs.vim @nickspoons
runtime/syntax/csh.vim @cecamp
Expand Down Expand Up @@ -442,6 +447,10 @@ runtime/syntax/maple.vim @cecamp
runtime/syntax/markdown.vim @tpope
runtime/syntax/mason.vim @petdance
runtime/syntax/meson.vim @Liambeguin
runtime/syntax/modula2.vim @dkearns
runtime/syntax/modula2/opt/iso.vim @trijezdci
runtime/syntax/modula2/opt/pim.vim @trijezdci
runtime/syntax/modula2/opt/r10.vim @trijezdci
runtime/syntax/modula3.vim @dkearns
runtime/syntax/n1ql.vim @pr3d4t0r
runtime/syntax/netrw.vim @cecamp
Expand Down
4 changes: 4 additions & 0 deletions Filelist
Expand Up @@ -20,6 +20,7 @@ SRC_ALL = \
ci/config.mk*.sed \
ci/if_ver*.vim \
ci/setup-xvfb.sh \
ci/remove_snap.sh \
src/Make_all.mak \
src/README.md \
src/alloc.c \
Expand Down Expand Up @@ -818,6 +819,7 @@ RT_SCRIPTS = \
runtime/plugin/README.txt \
runtime/syntax/*.vim \
runtime/syntax/README.txt \
runtime/syntax/modula2/opt/*.vim \
runtime/syntax/shared/*.vim \
runtime/syntax/shared/README.txt \
runtime/syntax/Makefile \
Expand Down Expand Up @@ -871,6 +873,7 @@ RT_DOS_BIN = \
runtime/vimlogo.eps \
runtime/vimlogo.gif \
runtime/vimlogo.pdf \
runtime/vimlogo.svg \

# Amiga runtime (also in the extra archive)
RT_AMI = \
Expand Down Expand Up @@ -977,6 +980,7 @@ IN_README_DIR = \
README_src.txt \
README_srcdos.txt \
README_unix.txt \
README_vimlogo.txt \
README_vms.txt \
README_w32s.txt \
Contents \
Expand Down
11 changes: 11 additions & 0 deletions READMEdir/README_vimlogo.txt
@@ -0,0 +1,11 @@
The Python project that creates `vimlogo.svg` can be found at
`https://github.com/ShayHill/vimlogo`. The Vim license applies.

`vimlogo.svg` is an effort to remove errors and inadvertant inconsistencies
from the original vim logo while maintaing the original design. `vimlogo.svg`
is based on the `vimlogo.svg` file (previously?) found at
`https://www.vim.org/logos.php`

As of 2024 Jan 30, `vimlogo.svg` is a separate project from `vimlogo.cdr`,
`vimlogo.eps`, `vimlogo.gif`, `vimlogo.pdf`, and `vimlogo.xpm`, all of which
are slightly different from each other.
14 changes: 9 additions & 5 deletions READMEdir/README_vms.txt
Expand Up @@ -19,21 +19,25 @@ src/INSTALLvms.txt.

To use the binary version, you need one of these archives:

vim-XX-exe-ia64-gui.zip IA64 GUI/Motif executables
vim-XX-exe-ia64-gtk.zip IA64 GUI/GTK executables
vim-XX-exe-ia64-term.zip IA64 console executables
vim-XX-exe-x86-gui.zip X86_64 GUI/Motif executables
vim-XX-exe-x86-term.zip X86_64 console executables
vim-XX-exe-ia64-gui.zip IA64 GUI/Motif executables
vim-XX-exe-ia64-gtk.zip IA64 GUI/GTK executables
vim-XX-exe-ia64-term.zip IA64 console executables
vim-XX-exe-axp-gui.zip Alpha GUI/Motif executables
vim-XX-exe-axp-gtk.zip Alpha GUI/GTK executables
vim-XX-exe-axp-term.zip Alpha console executables
vim-XX-exe-axp-term.zip Alpha console executables
vim-XX-exe-vax-gui.zip VAX GUI executables
vim-XX-exe-vax-term.zip VAX console executables
vim-XX-exe-vax-term.zip VAX console executables

and of course
vim-XX-runtime.zip runtime files

The binary archives contain: vim.exe, ctags.exe, xxd.exe files,
but there are also prepared "deploy ready" archives:

vim-XX-x86.zip GUI and console executables with runtime and
help files for X86_64 systems
vim-XX-ia64.zip GUI and console executables with runtime and
help files for IA64 systems
vim-XX-axp.zip GUI and console executables with runtime and
Expand Down
13 changes: 13 additions & 0 deletions ci/remove_snap.sh
@@ -0,0 +1,13 @@
#!/usr/bin/env sh
pushd /etc/apt/preferences.d/
cat > nosnap.pref <<EOF
# To prevent repository packages from triggering the installation of snap,
# this file forbids snapd from being installed by APT.
Package: snapd
Pin: release a=*
Pin-Priority: -10
EOF
popd
snap remove --purge $(snap list | awk '!/^Name|^core/ {print $1}')
apt-get purge -y snapd
5 changes: 4 additions & 1 deletion nsis/gvim.nsi
Expand Up @@ -397,6 +397,9 @@ Section "$(str_section_exe)" id_section_exe
SetOutPath $0\indent
File ${VIMRT}\indent\*.*

SetOutPath $0\keymap
File ${VIMRT}\keymap\*.*

SetOutPath $0\macros
File /r ${VIMRT}\macros\*.*

Expand All @@ -416,7 +419,7 @@ Section "$(str_section_exe)" id_section_exe
File ${VIMSRC}\vim.ico

SetOutPath $0\syntax
File /r ${VIMRT}\syntax\*.*
File /r /x testdir ${VIMRT}\syntax\*.*

SetOutPath $0\spell
File ${VIMRT}\spell\*.txt
Expand Down
60 changes: 55 additions & 5 deletions runtime/autoload/dist/ft.vim
Expand Up @@ -2,8 +2,8 @@ vim9script

# Vim functions for file type detection
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2023 Aug 10
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2024 Jan 05
# Former Maintainer: Bram Moolenaar <Bram@vim.org>

# These functions are moved here from runtime/filetype.vim to make startup
Expand Down Expand Up @@ -279,6 +279,19 @@ export def DtraceCheck()
endif
enddef

export def FTdef()
if get(g:, "filetype_def", "") == "modula2" || IsModula2()
SetFiletypeModula2()
return
endif

if exists("g:filetype_def")
exe "setf " .. g:filetype_def
else
setf def
endif
enddef

export def FTe()
if exists('g:filetype_euphoria')
exe 'setf ' .. g:filetype_euphoria
Expand Down Expand Up @@ -517,16 +530,53 @@ def IsLProlog(): bool
return getline(lnum) =~ '\<module\s\+\w\+\s*\.\s*\(%\|$\)'
enddef

def IsModula2(): bool
return getline(nextnonblank(1)) =~ '\<MODULE\s\+\w\+\s*;\|^\s*(\*'
enddef

def SetFiletypeModula2()
const KNOWN_DIALECTS = ["iso", "pim", "r10"]
const KNOWN_EXTENSIONS = ["gm2"]
const LINE_COUNT = 200
const TAG = '(\*!m2\(\w\+\)\%(+\(\w\+\)\)\=\*)'

var dialect = get(g:, "modula2_default_dialect", "pim")
var extension = get(g:, "modula2_default_extension", "")

var matches = []

# ignore unknown dialects or badly formatted tags
for lnum in range(1, min([line("$"), LINE_COUNT]))
matches = matchlist(getline(lnum), TAG)
if !empty(matches)
if index(KNOWN_DIALECTS, matches[1]) >= 0
dialect = matches[1]
endif
if index(KNOWN_EXTENSIONS, matches[2]) >= 0
extension = matches[2]
endif
break
endif
endfor

modula2#SetDialect(dialect, extension)

setf modula2
enddef

# Determine if *.mod is ABB RAPID, LambdaProlog, Modula-2, Modsim III or go.mod
export def FTmod()
if get(g:, "filetype_mod", "") == "modula2" || IsModula2()
SetFiletypeModula2()
return
endif

if exists("g:filetype_mod")
exe "setf " .. g:filetype_mod
elseif expand("<afile>") =~ '\<go.mod$'
setf gomod
elseif IsLProlog()
setf lprolog
elseif getline(nextnonblank(1)) =~ '\%(\<MODULE\s\+\w\+\s*;\|^\s*(\*\)'
setf modula2
elseif IsRapid()
setf rapid
else
Expand Down Expand Up @@ -1243,4 +1293,4 @@ export def FTvba()
enddef

# Uncomment this line to check for compilation errors early
# defcompile
defcompile
20 changes: 16 additions & 4 deletions runtime/autoload/dist/man.vim
Expand Up @@ -3,7 +3,7 @@
" Maintainer: Jason Franklin <jason@oneway.dev>
" Maintainer: SungHyun Nam <goweol@gmail.com>
" Autoload Split: Bram Moolenaar
" Last Change: 2023 Jun 28
" Last Change: 2024 Jan 17 (make it work on AIX, see #13847)

let s:cpo_save = &cpo
set cpo-=C
Expand All @@ -13,14 +13,26 @@ let s:man_tag_depth = 0
let s:man_sect_arg = ""
let s:man_find_arg = "-w"
try
if !has("win32") && $OSTYPE !~ 'cygwin\|linux' && system('uname -s') =~ "SunOS" && system('uname -r') =~ "^5"
let s:man_sect_arg = "-s"
let s:man_find_arg = "-l"
if !has("win32") && $OSTYPE !~ 'cygwin\|linux'
" cache the value
let uname_s = system('uname -s')

if uname_s =~ "SunOS" && system('uname -r') =~ "^5"
" Special Case for Man on SunOS
let s:man_sect_arg = "-s"
let s:man_find_arg = "-l"
elseif uname_s =~? 'AIX'
" Special Case for Man on AIX
let s:man_sect_arg = ""
let s:man_find_arg = ""
endif
endif
catch /E145:/
" Ignore the error in restricted mode
endtry

unlet! uname_s

func s:ParseIntoPageAndSection()
" Accommodate a reference that terminates in a hyphen.
"
Expand Down
31 changes: 31 additions & 0 deletions runtime/autoload/modula2.vim
@@ -0,0 +1,31 @@
" Vim filetype plugin file
" Language: Modula-2
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2024 Jan 04

" Dialect can be one of pim, iso, r10
function modula2#GetDialect() abort

if exists("b:modula2.dialect")
return b:modula2.dialect
endif

if exists("g:modula2_default_dialect")
let dialect = g:modula2_default_dialect
else
let dialect = "pim"
endif

return dialect
endfunction

function modula2#SetDialect(dialect, extension = "") abort
if exists("b:modula2")
unlockvar! b:modula2
endif

let b:modula2 = #{ dialect: a:dialect, extension: a:extension }
lockvar! b:modula2
endfunction

" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:

0 comments on commit 4e39985

Please sign in to comment.