0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

Merge branch 'vim:master' into 20250615

This commit is contained in:
Rob B 2025-07-01 22:11:02 +10:00 committed by GitHub
commit 850a2316d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
33 changed files with 528 additions and 445 deletions

1
.github/MAINTAINERS vendored
View File

@ -664,6 +664,7 @@ runtime/syntax/zsh.vim @chrisbra
runtime/tutor/tutor1.eo @dpelle
runtime/tutor/tutor1.fr @dpelle
runtime/tutor/tutor1.ru @RestorerZ
runtime/tutor/tutor2.fr @dlejay
src/iscygpty.* @k-takata
src/libvterm/ @leonerd
src/po/ca.po @nfdisco

View File

@ -319,6 +319,13 @@ jobs:
run: |
make ${SHADOWOPT} ${TEST}
# Enable to debug failing tests live and ssh into the CI runners
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: true
- if: ${{ !cancelled() }}
uses: ./.github/actions/test_artifacts
@ -729,16 +736,17 @@ jobs:
# name: vim${{ matrix.bits }}-${{ matrix.toolchain }}
# path: ./artifacts
- name: Install packages for testing
shell: bash
run: |
if ${{ matrix.features != 'TINY' }}; then
if ${{ matrix.arch == 'x64' }}; then
choco install netbeans --no-progress
else
exit 0
fi
fi
# disabled because of https://github.com/tunisiano187/Chocolatey-packages/issues/3916
#- name: Install packages for testing
# shell: bash
# run: |
# if ${{ matrix.features != 'TINY' }}; then
# if ${{ matrix.arch == 'x64' }}; then
# choco install netbeans --no-progress
# else
# exit 0
# fi
# fi
- name: Test and show the result of testing gVim
if: matrix.GUI == 'yes' || matrix.VIMDLL == 'yes'

View File

@ -839,7 +839,6 @@ RT_ALL = \
runtime/pack/dist/opt/netrw/autoload/netrw/fs.vim \
runtime/pack/dist/opt/netrw/autoload/netrw/os.vim \
runtime/pack/dist/opt/netrw/autoload/netrw/msg.vim \
runtime/pack/dist/opt/netrw/autoload/netrwSettings.vim \
runtime/pack/dist/opt/netrw/autoload/netrw_gitignore.vim \
runtime/pack/dist/opt/netrw/doc/netrw.txt \
runtime/pack/dist/opt/netrw/plugin/netrwPlugin.vim \

View File

@ -32,6 +32,10 @@ All commands are given with normal keyboard characters, so those who can type
with ten fingers can work very fast. Additionally, function keys can be
mapped to commands by the user, and the mouse can be used.
Vim also aims to provide a (mostly) POSIX-compatible vi implementation, when
compiled with a minimal feature set (typically called vim.tiny), which is used
by many Linux distributions as the default vi editor.
Vim runs under MS-Windows (7, 8, 10, 11), macOS, Haiku, VMS and almost all
flavours of UNIX. Porting to other systems should not be very difficult.
Older versions of Vim run on MS-DOS, MS-Windows 95/98/Me/NT/2000/XP/Vista,

View File

@ -15,6 +15,10 @@ All commands are given with normal keyboard characters, so those who can type
with ten fingers can work very fast. Additionally, function keys can be
mapped to commands by the user, and the mouse can be used.
Vim also aims to provide a (mostly) POSIX-compatible vi implementation, when
compiled with a minimal feature set (typically called vim.tiny), which is used
by many Linux distributions as the default vi editor.
Vim runs under MS-Windows (7, 8, 10, 11), macOS, Haiku, VMS and almost all
flavours of UNIX. Porting to other systems should not be very difficult.
Older versions of Vim run on MS-DOS, MS-Windows 95/98/Me/NT/2000/XP/Vista,

View File

@ -498,7 +498,7 @@ Section "$(str_section_exe)" id_section_exe
File ${VIMRT}\tools\*.*
SetOutPath $0\tutor
File /x Makefile /x *.info ${VIMRT}\tutor\*.*
File /r /x *.info ${VIMRT}\tutor\*.*
SectionEnd
##########################################################

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 9.1. Last change: 2025 Jun 28
*options.txt* For Vim version 9.1. Last change: 2025 Jun 29
VIM REFERENCE MANUAL by Bram Moolenaar
@ -10086,8 +10086,7 @@ A jump table for the options with a short description can be found at |Q_op|.
specifically the clipboard. If the seat does not exist, then the
option will still be set to the new value, with the Wayland clipboard
being unavailable as a result. If an empty value is passed then Vim
will attempt to use the value of $XDG_SEAT if it exists, if not then
it resorts to using the first seat found available. Updating this
will attempt to use the first seat found available. Updating this
option will also update |v:clipmethod|.
*'wlsteal'* *'wst'* *'nowlsteal'* *'nowst'*

View File

@ -339,10 +339,8 @@ NETRW VARIABLES AND SETTINGS *netrw-variables* {{{2
)
Netrw provides a lot of variables which allow you to customize netrw to your
preferences. One way to look at them is via the command :NetrwSettings (see
|netrw-settings|) which will display your current netrw settings. Most such
settings are described below, in |netrw-browser-options|, and in
|netrw-externapp|:
preferences. Most such settings are described below, in
|netrw-browser-options|, and in |netrw-externapp|:
*b:netrw_lastfile* last file Network-read/written retained on a
per-buffer basis (supports plain :Nw )
@ -765,9 +763,6 @@ below, a {netfile} is a URL to a remote file.
strings (ie. "").
(related: |netrw-userpass|)
:NetrwSettings This command is described in |netrw-settings| -- used to
display netrw settings and change netrw behavior.
==============================================================================
8. Variables and Options *netrw-var* *netrw-settings* {{{1
@ -1125,7 +1120,6 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
*netrw-quickcom* *netrw-quickcoms*
QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2
:NetrwSettings............................................|netrw-settings|
:Ntree....................................................|netrw-ntree|
:Explore[!] [dir] Explore directory of current file......|netrw-explore|
:Hexplore[!] [dir] Horizontal Split & Explore.............|netrw-explore|
@ -2950,17 +2944,6 @@ file you edit; this apparently also applies to directories. In other words,
autochdir sets the current directory to that containing the "file" (even if
that "file" is itself a directory).
NETRW SETTINGS WINDOW *netrw-settings-window* {{{2
With the NetrwSettings.vim plugin, >
:NetrwSettings
will bring up a window with the many variables that netrw uses for its
settings. You may change any of their values; when you save the file, the
settings therein will be used. One may also press "?" on any of the lines for
help on what each of the variables do.
(also see: |netrw-browser-var| |netrw-protocol| |netrw-variables|)
==============================================================================
OBTAINING A FILE *netrw-obtain* *netrw-O* {{{2

View File

@ -9236,7 +9236,6 @@ netrw-rightmouse pi_netrw.txt /*netrw-rightmouse*
netrw-s pi_netrw.txt /*netrw-s*
netrw-s-cr pi_netrw.txt /*netrw-s-cr*
netrw-settings pi_netrw.txt /*netrw-settings*
netrw-settings-window pi_netrw.txt /*netrw-settings-window*
netrw-sexplore pi_netrw.txt /*netrw-sexplore*
netrw-sort pi_netrw.txt /*netrw-sort*
netrw-sort-sequence pi_netrw.txt /*netrw-sort-sequence*

View File

@ -1,4 +1,4 @@
.TH VIM 1 "12 agosto 2024"
.TH VIM 1 "27 giugno 2025"
.SH NOME
vim \- VI Migliorato, un editor di testi per programmatori
.SH SINTASSI
@ -404,6 +404,9 @@ nella scrittura dei file. Verr
Non connettersi al server X. Vim parte più rapidamente,
ma il titolo della finestra e la clipboard non sono usati.
.TP
\-Y
Non connettersi al compositore Wayland.
.TP
\-y
Eseguire
.B Vim
@ -564,7 +567,7 @@ Inizializzazioni personali di
.B gVim
(viene utilizzata la prima trovata).
.TP
/usr/local/share/vim/optwin.vim
/usr/local/share/vim/vim??/optwin.vim
Script Vim usato dal comando ":options", maniera elegante per visualizzare e impostare opzioni.
.TP
/usr/local/share/vim/vim??/menu.vim

View File

@ -1,4 +1,4 @@
.TH VIM 1 "12 agosto 2024"
.TH VIM 1 "27 giugno 2025"
.SH NOME
vim \- VI Migliorato, un editor di testi per programmatori
.SH SINTASSI
@ -404,6 +404,9 @@ nella scrittura dei file. Verrà chiesta una chiave di cifratura.
Non connettersi al server X. Vim parte più rapidamente,
ma il titolo della finestra e la clipboard non sono usati.
.TP
\-Y
Non connettersi al compositore Wayland.
.TP
\-y
Eseguire
.B Vim
@ -564,7 +567,7 @@ Inizializzazioni personali di
.B gVim
(viene utilizzata la prima trovata).
.TP
/usr/local/share/vim/optwin.vim
/usr/local/share/vim/vim??/optwin.vim
Script Vim usato dal comando ":options", maniera elegante per visualizzare e impostare opzioni.
.TP
/usr/local/share/vim/vim??/menu.vim

View File

@ -1,60 +1,119 @@
.TH VIMTUTOR 1 "2 avril 2001"
.TH VIMTUTOR 1 "3 décembre 2024"
.SH NAME
vimtutor \- tutoriel Vim
.SH SYNOPSIS
.br
.B vimtutor [\-g] [langue]
.B vimtutor [\-l | \-\-language ISO639] [\-c | \-\-chapter NUMÉRO] [\-g | \-\-gui] [ISO639]
.br
.B vimtutor [\-h | \-\-help]
.br
.B vimtutor [\-\-list]
.SH DESCRIPTION
.B Vimtutor
.B vimtutor
lance le tutoriel
.B Vim
\.
Il copie d'abord le fichier du tutoriel, afin que vous puissiez le modifier
sans altérer le fichier original.
.BR "Vim" "."
.PP
.B Vimtutor
est utile pour les personnes souhaitant apprendre leurs premières commandes
.B Vim
\.
.B vimtutor
est utile pour les personnes souhaitant apprendre leurs premières
commandes
.BR "Vim" "."
.PP
L'argument optionnel \-g lance vimtutor avec gvim plutôt qu'avec vim, si l'IHM
graphique de vim est disponible, ou le lance avec vim si gvim n'est pas
disponible.
L'argument optionel [ISO639] correspond aux deux ou trois lettres qui identifient
une langue, comme par exemple "it" ou "es".
.PP
L'argument optionnel [langue] est le nom d'une langue, spécifiée par son
symbole à deux lettres, tels que "it" ou "es". Si l'argument [langue] est omis,
la langue de la région linguistique actuelle sera retenue. Si le tutoriel est
disponible dans cette langue, il est proposé. Sinon, c'est la version anglaise
qui est proposée.
.B vimtutor
ne fait qu'ouvrir une copie temporaire des fichiers du tutoriel, il n'y
a donc aucun risque d'écraser les leçons.
.PP
.B Vim
est toujours lancé en mode Compatible Vi.
est toujours lancé en mode
.B Vi
compatible.
.PP
.SH OPTIONS
.TP
.BR \-l ", " \-\-language\ \fIISO639\fR
Les deux ou trois lettres qui déterminent la langue, comme
par exemple 'it', 'es' ou 'bar'.
Par défaut, la langue locale du système est utilisée,
ou l'anglais sinon.
.TP
.BR \-c ", " \-\-chapter\ \fINUMÉRO\fR
Sélectionne le chapitre désiré. Par défaut, c'est le premier chapitre.
.TP
.BR \-g ", " \-\-gui
Lance
.B vimtutor
avec une interface graphique de
.B Vim
si possible; sinon, revient à la version console.
.TP
.BR \-h ", " \-\-help
Affiche les informations d'usage.
.TP
.BR \-\-list
Affiche la liste des chapitres et des langues.
.SH EXEMPLES
Pour démarrer
.B vimtutor
en français au premier chapitre:
.PP
.nf
.RS
vimtutor fr
.RE
.fi
.PP
En anglais au chapitre deux:
.PP
.nf
.RS
vimtutor -c2
.RE
.fi
.PP
Pour lancer (avec les commandes en format long) l'interface graphique,
pour le bavarois, au premier chapitre:
.PP
.nf
.RS
vimtutor --language bar --chapter 1 --gui
.RE
.fi
.SH FICHIERS
.TP 15
/usr/local/lib/vim/tutor/tutor[.langue]
Les fichiers textes de
.B Vimtutor
/usr/local/share/vim/vim??/tutor/tutor1[.language]
Les fichiers du premier chapitre du
.B vimtutor
\.
.TP 15
/usr/local/lib/vim/tutor/tutor.vim
Le script Vim utilisé pour copier les fichiers texte de
.B Vimtutor
/usr/local/share/vim/vim??/tutor/tutor2[.language]
Les fichiers du deuxième chapitre du
.B vimtutor
\.
.TP 15
/usr/local/share/vim/vim??/tutor/tutor.vim
Le script
.B Vim
utilisé pour copier les fichier du
.B vimtutor
\.
.SH AUTEUR
.B Vimtutor
a été écrit à l'origine pour Vi par Michael C. Pierce et Robert K. Ware, de la
Colorado School of Mines, en reprenant des idées émises par Charles Smith, de
la Colorado State University.
E-mail : bware@mines.colorado.edu.
Courriel: bware@mines.colorado.edu (ne fonctionne plus).
.br
Il a été modifié pour
.B Vim
par Bram Moolenaar.
Pour connaître le nom des traducteurs, consultez les fichiers textes du
Pour connaitre le nom des traducteurs, consultez les fichiers textes du
tutoriel.
.SH VOIR AUSSI
vim(1)
.SH TRADUCTION
Cette page de manuel a été traduite par David Blanchet
<david.blanchet@free.fr> 2004-12-27.
Mise à jour 2012-05-06, Dominique Pellé <dominique.pelle@gmail.com>
Mise à jour 2012-05-06, Dominique Pellé <dominique.pelle@gmail.com>.
Mise à jour 2025-06-16, Damien Lejay <damien@lejay.be>.

View File

@ -1,60 +1,119 @@
.TH VIMTUTOR 1 "2 avril 2001"
.TH VIMTUTOR 1 "3 décembre 2024"
.SH NAME
vimtutor \- tutoriel Vim
.SH SYNOPSIS
.br
.B vimtutor [\-g] [langue]
.B vimtutor [\-l | \-\-language ISO639] [\-c | \-\-chapter NUMÉRO] [\-g | \-\-gui] [ISO639]
.br
.B vimtutor [\-h | \-\-help]
.br
.B vimtutor [\-\-list]
.SH DESCRIPTION
.B Vimtutor
.B vimtutor
lance le tutoriel
.B Vim
\.
Il copie d'abord le fichier du tutoriel, afin que vous puissiez le modifier
sans altérer le fichier original.
.BR "Vim" "."
.PP
.B Vimtutor
est utile pour les personnes souhaitant apprendre leurs premières commandes
.B Vim
\.
.B vimtutor
est utile pour les personnes souhaitant apprendre leurs premières
commandes
.BR "Vim" "."
.PP
L'argument optionnel \-g lance vimtutor avec gvim plutôt qu'avec vim, si l'IHM
graphique de vim est disponible, ou le lance avec vim si gvim n'est pas
disponible.
L'argument optionel [ISO639] correspond aux deux ou trois lettres qui identifient
une langue, comme par exemple "it" ou "es".
.PP
L'argument optionnel [langue] est le nom d'une langue, spécifiée par son
symbole à deux lettres, tels que "it" ou "es". Si l'argument [langue] est omis,
la langue de la région linguistique actuelle sera retenue. Si le tutoriel est
disponible dans cette langue, il est proposé. Sinon, c'est la version anglaise
qui est proposée.
.B vimtutor
ne fait qu'ouvrir une copie temporaire des fichiers du tutoriel, il n'y
a donc aucun risque d'écraser les leçons.
.PP
.B Vim
est toujours lancé en mode Compatible Vi.
est toujours lancé en mode
.B Vi
compatible.
.PP
.SH OPTIONS
.TP
.BR \-l ", " \-\-language\ \fIISO639\fR
Les deux ou trois lettres qui déterminent la langue, comme
par exemple 'it', 'es' ou 'bar'.
Par défaut, la langue locale du système est utilisée,
ou l'anglais sinon.
.TP
.BR \-c ", " \-\-chapter\ \fINUMÉRO\fR
Sélectionne le chapitre désiré. Par défaut, c'est le premier chapitre.
.TP
.BR \-g ", " \-\-gui
Lance
.B vimtutor
avec une interface graphique de
.B Vim
si possible; sinon, revient à la version console.
.TP
.BR \-h ", " \-\-help
Affiche les informations d'usage.
.TP
.BR \-\-list
Affiche la liste des chapitres et des langues.
.SH EXEMPLES
Pour démarrer
.B vimtutor
en français au premier chapitre:
.PP
.nf
.RS
vimtutor fr
.RE
.fi
.PP
En anglais au chapitre deux:
.PP
.nf
.RS
vimtutor -c2
.RE
.fi
.PP
Pour lancer (avec les commandes en format long) l'interface graphique,
pour le bavarois, au premier chapitre:
.PP
.nf
.RS
vimtutor --language bar --chapter 1 --gui
.RE
.fi
.SH FICHIERS
.TP 15
/usr/local/lib/vim/tutor/tutor[.langue]
Les fichiers textes de
.B Vimtutor
/usr/local/share/vim/vim??/tutor/tutor1[.language]
Les fichiers du premier chapitre du
.B vimtutor
\.
.TP 15
/usr/local/lib/vim/tutor/tutor.vim
Le script Vim utilisé pour copier les fichiers texte de
.B Vimtutor
/usr/local/share/vim/vim??/tutor/tutor2[.language]
Les fichiers du deuxième chapitre du
.B vimtutor
\.
.TP 15
/usr/local/share/vim/vim??/tutor/tutor.vim
Le script
.B Vim
utilisé pour copier les fichier du
.B vimtutor
\.
.SH AUTEUR
.B Vimtutor
a été écrit à l'origine pour Vi par Michael C. Pierce et Robert K. Ware, de la
Colorado School of Mines, en reprenant des idées émises par Charles Smith, de
la Colorado State University.
E-mail : bware@mines.colorado.edu.
Courriel: bware@mines.colorado.edu (ne fonctionne plus).
.br
Il a été modifié pour
.B Vim
par Bram Moolenaar.
Pour connaître le nom des traducteurs, consultez les fichiers textes du
Pour connaitre le nom des traducteurs, consultez les fichiers textes du
tutoriel.
.SH VOIR AUSSI
vim(1)
.SH TRADUCTION
Cette page de manuel a été traduite par David Blanchet
<david.blanchet@free.fr> 2004-12-27.
Mise à jour 2012-05-06, Dominique Pellé <dominique.pelle@gmail.com>
Mise à jour 2012-05-06, Dominique Pellé <dominique.pelle@gmail.com>.
Mise à jour 2025-06-16, Damien Lejay <damien@lejay.be>.

View File

@ -19,7 +19,7 @@ if &cp || exists("g:loaded_netrw")
finish
endif
let g:loaded_netrw = "v181"
let g:loaded_netrw = "v183"
if !has("patch-9.1.1054") && !has('nvim')
echoerr 'netrw needs Vim v9.1.1054'

View File

@ -1,235 +0,0 @@
" Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
" Former Maintainer: Charles E Campbell
" Upstream: <https://github.com/saccarosium/netrw.vim>
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
" netrwSettings.vim is provided *as is* and comes with no
" warranty of any kind, either expressed or implied. By using
" this plugin, you agree that in no event will the copyright
" holder be liable for any damages resulting from the use
" of this software. }}}
if &cp || exists("g:loaded_netrwSettings")
finish
endif
let g:loaded_netrwSettings = "v181"
" NetrwSettings: {{{
function! netrwSettings#NetrwSettings()
" this call is here largely just to insure that netrw has been loaded
call netrw#WinPath("")
if !exists("g:loaded_netrw")
echohl WarningMsg
echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings"
echohl None
return
endif
above wincmd s
enew
setlocal noswapfile bh=wipe
set ft=vim
file Netrw\ Settings
" these variables have the following default effects when they don't
" exist (ie. have not been set by the user in his/her .vimrc)
if !exists("g:netrw_liststyle")
let g:netrw_liststyle= 0
let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa"
endif
if !exists("g:netrw_silent")
let g:netrw_silent= 0
endif
if !exists("g:netrw_use_nt_rcp")
let g:netrw_use_nt_rcp= 0
endif
if !exists("g:netrw_ftp")
let g:netrw_ftp= 0
endif
if !exists("g:netrw_ignorenetrc")
let g:netrw_ignorenetrc= 0
endif
put ='+ ---------------------------------------------'
put ='+ NetrwSettings: by Charles E. Campbell'
put ='+ Press <F1> with cursor atop any line for help'
put ='+ ---------------------------------------------'
let s:netrw_settings_stop= line(".")
put =''
put ='+ Netrw Protocol Commands'
put = 'let g:netrw_dav_cmd = '.g:netrw_dav_cmd
put = 'let g:netrw_fetch_cmd = '.g:netrw_fetch_cmd
put = 'let g:netrw_ftp_cmd = '.g:netrw_ftp_cmd
put = 'let g:netrw_http_cmd = '.g:netrw_http_cmd
put = 'let g:netrw_rcp_cmd = '.g:netrw_rcp_cmd
put = 'let g:netrw_rsync_cmd = '.g:netrw_rsync_cmd
put = 'let g:netrw_scp_cmd = '.g:netrw_scp_cmd
put = 'let g:netrw_sftp_cmd = '.g:netrw_sftp_cmd
put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd
let s:netrw_protocol_stop= line(".")
put = ''
put ='+Netrw Transfer Control'
put = 'let g:netrw_cygwin = '.g:netrw_cygwin
put = 'let g:netrw_ftp = '.g:netrw_ftp
put = 'let g:netrw_ftpmode = '.g:netrw_ftpmode
put = 'let g:netrw_ignorenetrc = '.g:netrw_ignorenetrc
put = 'let g:netrw_sshport = '.g:netrw_sshport
put = 'let g:netrw_silent = '.g:netrw_silent
put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp
let s:netrw_xfer_stop= line(".")
put =''
put ='+ Netrw Messages'
put ='let g:netrw_use_errorwindow = '.g:netrw_use_errorwindow
put = ''
put ='+ Netrw Browser Control'
if exists("g:netrw_altfile")
put = 'let g:netrw_altfile = '.g:netrw_altfile
else
put = 'let g:netrw_altfile = 0'
endif
put = 'let g:netrw_alto = '.g:netrw_alto
put = 'let g:netrw_altv = '.g:netrw_altv
put = 'let g:netrw_banner = '.g:netrw_banner
if exists("g:netrw_bannerbackslash")
put = 'let g:netrw_bannerbackslash = '.g:netrw_bannerbackslash
else
put = '\" let g:netrw_bannerbackslash = (not defined)'
endif
put = 'let g:netrw_browse_split = '.g:netrw_browse_split
if exists("g:netrw_browsex_viewer")
put = 'let g:netrw_browsex_viewer = '.g:netrw_browsex_viewer
else
put = '\" let g:netrw_browsex_viewer = (not defined)'
endif
put = 'let g:netrw_compress = '.g:netrw_compress
if exists("g:Netrw_corehandler")
put = 'let g:Netrw_corehandler = '.g:Netrw_corehandler
else
put = '\" let g:Netrw_corehandler = (not defined)'
endif
put = 'let g:netrw_ctags = '.g:netrw_ctags
put = 'let g:netrw_cursor = '.g:netrw_cursor
let decompressline= line("$")
put = 'let g:netrw_decompress = '.string(g:netrw_decompress)
if exists("g:netrw_dynamic_maxfilenamelen")
put = 'let g:netrw_dynamic_maxfilenamelen='.g:netrw_dynamic_maxfilenamelen
else
put = '\" let g:netrw_dynamic_maxfilenamelen= (not defined)'
endif
put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax
put = 'let g:netrw_fastbrowse = '.g:netrw_fastbrowse
let fnameescline= line("$")
put = 'let g:netrw_fname_escape = '.string(g:netrw_fname_escape)
put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd
put = 'let g:netrw_ftp_sizelist_cmd = '.g:netrw_ftp_sizelist_cmd
put = 'let g:netrw_ftp_timelist_cmd = '.g:netrw_ftp_timelist_cmd
let globescline= line("$")
put = 'let g:netrw_glob_escape = '.string(g:netrw_glob_escape)
put = 'let g:netrw_hide = '.g:netrw_hide
if exists("g:netrw_home")
put = 'let g:netrw_home = '.g:netrw_home
else
put = '\" let g:netrw_home = (not defined)'
endif
put = 'let g:netrw_keepdir = '.g:netrw_keepdir
put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd
put = 'let g:netrw_list_hide = '.g:netrw_list_hide
put = 'let g:netrw_liststyle = '.g:netrw_liststyle
put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd
put = 'let g:netrw_localcopycmdopt = '.g:netrw_localcopycmdopt
put = 'let g:netrw_localmkdir = '.g:netrw_localmkdir
put = 'let g:netrw_localmkdiropt = '.g:netrw_localmkdiropt
put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd
put = 'let g:netrw_localmovecmdopt = '.g:netrw_localmovecmdopt
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
put = 'let g:netrw_menu = '.g:netrw_menu
put = 'let g:netrw_mousemaps = '.g:netrw_mousemaps
put = 'let g:netrw_mkdir_cmd = '.g:netrw_mkdir_cmd
if exists("g:netrw_nobeval")
put = 'let g:netrw_nobeval = '.g:netrw_nobeval
else
put = '\" let g:netrw_nobeval = (not defined)'
endif
put = 'let g:netrw_remote_mkdir = '.g:netrw_remote_mkdir
put = 'let g:netrw_preview = '.g:netrw_preview
put = 'let g:netrw_rename_cmd = '.g:netrw_rename_cmd
put = 'let g:netrw_retmap = '.g:netrw_retmap
put = 'let g:netrw_rm_cmd = '.g:netrw_rm_cmd
put = 'let g:netrw_rmdir_cmd = '.g:netrw_rmdir_cmd
put = 'let g:netrw_rmf_cmd = '.g:netrw_rmf_cmd
put = 'let g:netrw_sort_by = '.g:netrw_sort_by
put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction
put = 'let g:netrw_sort_options = '.g:netrw_sort_options
put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence
put = 'let g:netrw_servername = '.g:netrw_servername
put = 'let g:netrw_special_syntax = '.g:netrw_special_syntax
put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd
put = 'let g:netrw_scpport = '.g:netrw_scpport
put = 'let g:netrw_sepchr = '.g:netrw_sepchr
put = 'let g:netrw_sshport = '.g:netrw_sshport
put = 'let g:netrw_timefmt = '.g:netrw_timefmt
let tmpfileescline= line("$")
put ='let g:netrw_tmpfile_escape...'
put = 'let g:netrw_use_noswf = '.g:netrw_use_noswf
put = 'let g:netrw_xstrlen = '.g:netrw_xstrlen
put = 'let g:netrw_winsize = '.g:netrw_winsize
put =''
put ='+ For help, place cursor on line and press <F1>'
1d
silent %s/^+/"/e
res 99
silent %s/= \([^0-9].*\)$/= '\1'/e
silent %s/= $/= ''/e
1
call setline(decompressline, "let g:netrw_decompress = ".substitute(string(g:netrw_decompress),"^'\\(.*\\)'$",'\1',''))
call setline(fnameescline, "let g:netrw_fname_escape = '".escape(g:netrw_fname_escape,"'")."'")
call setline(globescline, "let g:netrw_glob_escape = '".escape(g:netrw_glob_escape,"'")."'")
call setline(tmpfileescline, "let g:netrw_tmpfile_escape = '".escape(g:netrw_tmpfile_escape,"'")."'")
set nomod
nmap <buffer> <silent> <F1> :call NetrwSettingHelp()<cr>
nnoremap <buffer> <silent> <leftmouse> <leftmouse> :call NetrwSettingHelp()<cr>
let tmpfile= tempname()
exe 'au BufWriteCmd Netrw\ Settings silent w! '.tmpfile.'|so '.tmpfile.'|call delete("'.tmpfile.'")|set nomod'
endfunction
" }}}
" NetrwSettingHelp: {{{
function! NetrwSettingHelp()
let curline = getline(".")
if curline =~ '='
let varhelp = substitute(curline,'^\s*let ','','e')
let varhelp = substitute(varhelp,'\s*=.*$','','e')
try
exe "he ".varhelp
catch /^Vim\%((\a\+)\)\=:E149/
echo "***sorry*** no help available for <".varhelp.">"
endtry
elseif line(".") < s:netrw_settings_stop
he netrw-settings
elseif line(".") < s:netrw_protocol_stop
he netrw-externapp
elseif line(".") < s:netrw_xfer_stop
he netrw-variables
else
he netrw-browse-var
endif
endfunction
" }}}
" vim:ts=8 sts=4 sw=4 et fdm=marker

View File

@ -339,10 +339,8 @@ NETRW VARIABLES AND SETTINGS *netrw-variables* {{{2
)
Netrw provides a lot of variables which allow you to customize netrw to your
preferences. One way to look at them is via the command :NetrwSettings (see
|netrw-settings|) which will display your current netrw settings. Most such
settings are described below, in |netrw-browser-options|, and in
|netrw-externapp|:
preferences. Most such settings are described below, in
|netrw-browser-options|, and in |netrw-externapp|:
*b:netrw_lastfile* last file Network-read/written retained on a
per-buffer basis (supports plain :Nw )
@ -765,9 +763,6 @@ below, a {netfile} is a URL to a remote file.
strings (ie. "").
(related: |netrw-userpass|)
:NetrwSettings This command is described in |netrw-settings| -- used to
display netrw settings and change netrw behavior.
==============================================================================
8. Variables and Options *netrw-var* *netrw-settings* {{{1
@ -1125,7 +1120,6 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
*netrw-quickcom* *netrw-quickcoms*
QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2
:NetrwSettings............................................|netrw-settings|
:Ntree....................................................|netrw-ntree|
:Explore[!] [dir] Explore directory of current file......|netrw-explore|
:Hexplore[!] [dir] Horizontal Split & Explore.............|netrw-explore|
@ -2950,17 +2944,6 @@ file you edit; this apparently also applies to directories. In other words,
autochdir sets the current directory to that containing the "file" (even if
that "file" is itself a directory).
NETRW SETTINGS WINDOW *netrw-settings-window* {{{2
With the NetrwSettings.vim plugin, >
:NetrwSettings
will bring up a window with the many variables that netrw uses for its
settings. You may change any of their values; when you save the file, the
settings therein will be used. One may also press "?" on any of the lines for
help on what each of the variables do.
(also see: |netrw-browser-var| |netrw-protocol| |netrw-variables|)
==============================================================================
OBTAINING A FILE *netrw-obtain* *netrw-O* {{{2

View File

@ -15,7 +15,7 @@ if &cp || exists("g:loaded_netrwPlugin")
finish
endif
let g:loaded_netrwPlugin = "v181"
let g:loaded_netrwPlugin = "v183"
let s:keepcpo = &cpo
set cpo&vim
@ -70,12 +70,6 @@ command! -nargs=* -bar -bang -count=0 -complete=dir Lexplore call netrw#Lexplore
command! -nargs=* -bar -bang Nexplore call netrw#Explore(-1, 0, 0, <q-args>)
command! -nargs=* -bar -bang Pexplore call netrw#Explore(-2, 0, 0, <q-args>)
" }}}
" Commands: NetrwSettings {{{
command! -nargs=0 NetrwSettings call netrwSettings#NetrwSettings()
command! -bang NetrwClean call netrw#Clean(<bang>0)
" }}}
" Maps: {{{

View File

@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" Last Change: 2025 Jun 25
" Last Change: 2025 Jun 30
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@ -205,13 +205,6 @@ if exists("g:vimsyntax_noerror")
let g:vimsyn_noerror= g:vimsyntax_noerror
endif
" Variable options {{{2
if exists("g:vim_maxlines")
let s:vimsyn_maxlines= g:vim_maxlines
else
let s:vimsyn_maxlines= 60
endif
" Nulls {{{2
" =====
Vim9 syn keyword vim9Null null null_blob null_channel null_class null_dict null_function null_job null_list null_object null_partial null_string
@ -2108,10 +2101,10 @@ endif
" Synchronize (speed) {{{2
"============
if exists("g:vimsyn_minlines")
exe "syn sync minlines=".g:vimsyn_minlines
endif
exe "syn sync maxlines=".s:vimsyn_maxlines
exe "syn sync minlines=" .. get(g:, "vimsyn_minlines", 100)
exe "syn sync maxlines=" .. get(g:, "vimsyn_maxlines", 200)
syn sync linecont "^\s\+\\"
syn sync linebreaks=2
syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]"

View File

@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" Last Change: 2025 Jun 28
" Last Change: 2025 Jun 30
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@ -258,13 +258,6 @@ if exists("g:vimsyntax_noerror")
let g:vimsyn_noerror= g:vimsyntax_noerror
endif
" Variable options {{{2
if exists("g:vim_maxlines")
let s:vimsyn_maxlines= g:vim_maxlines
else
let s:vimsyn_maxlines= 60
endif
" Nulls {{{2
" =====
Vim9 syn keyword vim9Null null null_blob null_channel null_class null_dict null_function null_job null_list null_object null_partial null_string
@ -2169,10 +2162,10 @@ endif
" Synchronize (speed) {{{2
"============
if exists("g:vimsyn_minlines")
exe "syn sync minlines=".g:vimsyn_minlines
endif
exe "syn sync maxlines=".s:vimsyn_maxlines
exe "syn sync minlines=" .. get(g:, "vimsyn_minlines", 100)
exe "syn sync maxlines=" .. get(g:, "vimsyn_maxlines", 200)
syn sync linecont "^\s\+\\"
syn sync linebreaks=2
syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]"

View File

@ -1009,10 +1009,13 @@ NOTE : Le complètement fonctionne pour de nombreuses commandes. Essayez
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ceci conclut le Tutoriel Vim. Le but était de vous donner un bref aperçu de
l'éditeur Vim, juste assez pour vous permettre d'utiliser l'éditeur
relativement facilement. Il est loin d'être complet, vu que Vim a beaucoup
plus de commandes. Un Manuel de l'utilisateur est disponible en anglais :
Voilà, c'est la fin du chapitre 1 de ce tutoriel. Vous pouvez maintenant
passer au chapitre 2.
Le but était de vous donner un bref aperçu de l'éditeur Vim, juste assez pour
vous permettre d'utiliser l'éditeur relativement facilement.
Il est loin d'être complet, vu que Vim a beaucoup plus de commandes.
Un Manuel de l'utilisateur est disponible en anglais :
:help user-manual
Pour continuer à découvrir et à apprendre Vim, il existe un livre traduit en

View File

@ -6,7 +6,7 @@
Hic Sunt Dracones: if this is your first exposure to vim and you
intended to avail yourself of the introductory chapter, kindly type
:q<enter> and try again.
:q!<ENTER> and run vimtutor for Chapter 1 instead.
The approximate time required to complete this chapter is 8-10 minutes,
depending upon how much time is spent with experimentation.
@ -23,14 +23,14 @@
MNEMONIC: into register(") named (a) (y)ank (i)nner (w)ord
3. Navigate forward to the word 'cookie' (fk or 2fc or $2b or /co<enter>)
3. Navigate forward to the word 'cookie' (fk or 2fc or $2b or /co<ENTER>)
and type "byiw
4. Navigate to any point on the word 'Vince' and type ciw<C-r>a<ESC>
4. Navigate to any point on the word 'Vince' and type ciw<CTRL-R>a<ESC>
MNEMONIC: (c)hange (i)nner (w)ord with <contents of (r)egister> named (a)
5. Navigate to any point on the word 'cake' and type ciw<C-r>b<ESC>
5. Navigate to any point on the word 'cake' and type ciw<CTRL-R>b<ESC>
---> a) Edward will henceforth be in charge of the cookie rations
b) In this capacity, Vince will have sole cake discretionary powers
@ -40,8 +40,8 @@ NOTE: Delete also works into registers, i.e. "sdiw will delete the word under
REFERENCE: Registers :h registers
Named Registers :h quotea
Motion :h motion.txt<enter> /inner<enter>
CTRL-R :h insert<enter> /CTRL-R<enter>
Motion :h motion.txt<ENTER> /inner<ENTER>
CTRL-R :h insert<ENTER> /CTRL-R<ENTER>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -54,10 +54,10 @@ REFERENCE: Registers :h registers
2. Navigate to any point on the supplied number
3. Type ciw<C-r>=60*60*24<enter>
3. Type ciw<CTRL-R> followed by =60*60*24<ENTER>
4. On the next line, enter insert mode and add today's date with
<C-r>=system('date')<enter>
<CTRL-R> followed by =system('date')<ENTER>
NOTE: All calls to system are OS dependent, e.g. on Windows use
system('date /t') or :r!date /t
@ -79,7 +79,7 @@ REFERENCE: Expression Register :h quote=
1. Move the cursor to the line below marked --->
2. yank the zeroth line, then inspect registers with :reg<enter>
2. yank the zeroth line, then inspect registers with :reg<ENTER>
3. delete line 0. with "cdd, then inspect registers
(Where do you expect line 0 to be?)
@ -118,7 +118,7 @@ REFERENCE: Numbered Registers :h quote0
NOTE: a common conundrum when coding is moving around large chunks of code.
The following technique helps avoid number line calculations associated
with operations like "a147d or :945,1091d a or even worse using
i<C-r>=1091-945<enter> first
i<CTRL-R> followed by =1091-945<ENTER> first
1. Move the cursor to the line below marked --->
@ -172,9 +172,11 @@ REFERENCE: Marks :h marks
3. Change a whole word from anywhere within a word: ciw
4. Insert text directly from registers in insert mode: (C-r)a
5. Insert the results of simple arithmetic operations: (C-r)=60*60<enter>
5. Insert the results of simple arithmetic operations: <CTRL-R> followed by
=60*60<ENTER>
in insert mode
6. Insert the results of system calls: (C-r)=system('ls -1')
6. Insert the results of system calls: <CTRL-R> followed by
=system('ls -1')<ENTER>
in insert mode
7. Inspect registers with :reg

213
runtime/tutor/tutor2.fr Normal file
View File

@ -0,0 +1,213 @@
===============================================================================
= B i e n v e n u e dans l e T u t o r i e l de VIM Version 1.7 =
===============================================================================
= C H A P I T R E DEUX =
===============================================================================
Hic sunt dracones: si cʼest la première fois que vous utilisez Vim
et que vous souhaitez accéder au tutoriel dʼintroduction, tapez
les trois touches :q! puis la touche <ENTRÉE> et recommencez.
Il vous faudra entre 8 et 10 minutes pour terminer ce chapitre, selon
que vous passiez plus ou moins de temps à expérimenter.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Leçon 2.1.1: REGISTRES NOMMÉS
** Conserver deux mots copiés en parallèle, puis les coller **
1. Déplacez le curseur sur la ligne ci-dessous commençant par: --->
2. Placez-vous nʼimporte où dans le mot 'Édouard' et tapez "ayiw
AIDE MNÉMOTECHNIQUE: dans le registre(") nommé (a) (y)ank la portion
(i)nterne du (w)ord sous-jacent
3. Avancez jusquʼau mot 'chouquettes' (fq ou 2fc ou $ ou /ch<ENTRÉE>)
et tapez "byiw
4. Rendez-vous sur le mot 'Vincent' et tapez ciw<CTRL-R>a<ÉCHAP>
AIDE MNÉMOTECHNIQUE: é(c)hange la partie (i)nterne du (w)ord sous-jacent
avec le <contenu du (r)egistre> nommé (a)
5. Rendez-vous sur le mot 'croissant' et tapez ciw<CTRL-R>b<ÉCHAP>
---> a) Édouard aura toute autorité sur le contingentement des chouquettes
b) À ce titre, Vincent exercera seul le pouvoir discrétionnaire sur
lʼattribution des croissants.
NOTE: On peut aussi utiliser les registres avec la commande de suppression.
Taper "sdiw supprimera le mot sous-jacent et en conservera une copie
dans le registre (s).
RÉFÉRENCES: Registres :h registers
Registres nommés :h quotea
Mouvements :h motion.txt<ENTRÉE> /inner<ENTRÉE>
CTRL-R :h insert<ENTRÉE> /CTRL-R<ENTRÉE>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Leçon 2.1.2: LE REGISTRE DʼEXPRESSIONS
** Insérer à la volée le résultat dʼun calcul **
1. Déplacez le curseur sur la ligne ci-dessous commençant par: --->
2. Placez-vous sur le nombre
3. Tapez ciw<CTRL-R> suivi de =60*60*24<ENTRÉE>
4. Sur la ligne suivante, en mode Insertion, ajoutez la date du jour avec
<CTRL-R> suivi de =system('date')<ENTRÉE>
NOTE: Tous les appels système dépendent de votre système dʼexploitation. Par
exemple sur MS-Windows, utilisez plutôt
system('date /t') ou :r!date /t
---> Dans une journée, il y a 100 secondes.
Aujourdʼhui, nous sommes:
NOTE: on arrive au même résultat avec :pu=system('date')
ou, plus court :r!date
RÉFÉRENCE: Registre dʼexpressions :h quote=
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Leçon 2.1.3: LES REGISTRES NUMÉROTÉS
** Tapez yy et dd afin de contempler leur effet sur les registres **
1. Déplacez le curseur sur la ligne ci-dessous commençant par: --->
2. Copiez (yy) la ligne 0, puis inspectez les registres avec :reg<ENTRÉE>
3. Supprimez la ligne 0 avec "cdd, puis inspectez les registres
(Où pensez-vous retrouver la ligne 0?)
4. Continuez à supprimer chaque ligne successivement (avec dd), tout en
regardant le résultat au passage avec :reg.
NOTE: Vous devriez remarquer que les anciennes lignes supprimées descendent
dans la liste des registres au fur et à mesure que vous supprimez de
nouvelles lignes.
5. Maintenant collez le contenu des registres suivant, dans cet ordre:
c, 7, 4, 2, 8. i.e collez avec "cp puis "7p puis etc.
---> 0. Ceci
9. zigzag
8. secret
7. est
6. on
5. axe
4. un
3. guerre
2. message
1. hommage
NOTE: Les lignes entièrement supprimées (via dd) restent beaucoup plus
longtemps dans les registres numérotés que les lignes copiées (via yy)
ou les suppressions impliquant des mouvements plus courts.
RÉFÉRENCE: Registres numérotés :h quote0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Leçon 2.1.4: LʼÉLÉGANCE DES MARQUES
** Lʼart dʼéviter les calculs pour le codeur décérébré **
NOTE: En programmation, déplacer de gros blocs de code est souvent une vraie
corvée. Le souci nʼest pas la difficulté de lʼopération, mais la
gymnastique mentale quʼimposent les calculs de numéros de ligne — une
tâche fastidieuse et source dʼerreurs.
La technique qui suit vous épargne justement ce tracas pour des
opérations comme "a147d ou :945,1091d a ou pire encore
i<CTRL-R> suivi de =1091-945<ENTRÉE>
1. Déplacez le curseur sur la ligne ci-dessous commençant par: --->
2. Placez-vous sur la première ligne de la fonction et placez une marque (a)
avec ma
NOTE: peu importe la position exacte sur la ligne.
3. Allez à la fin de la ligne, puis à la fin du bloc de code avec $%
4. Supprimez le bloc et conservez-le dans le registre (a) avec "ad'a
AIDE MNÉMOTECHNIQUE: demande au registre(") nommé (a) de conserver la
(d)élétion effectuée depuis le curseur jusquʼà la LIGNE contenant la
marque(') (a)
5. Collez le bloc entre BBB et CCC avec "ap
NOTE: exercez-vous plusieurs fois pour que ça devienne naturel ma$%"ad'a
---> AAA
function itGotRealBigRealFast() {
if ( somethingIsTrue ) {
doIt()
}
// the taxonomy of our function has changed and it
// no longer makes alphabetical sense in its current position
// imagine hundreds of lines of code
// naively you could navigate to the start and end and record or
// remember each line number
}
BBB
CCC
NOTE: les marques et les registres ne partagent pas leur espace de noms,
le registre (a) est complètement indépendant de la marque (a).
On ne peut pas en dire autant des registres et des macros.
RÉFÉRENCES: Marques :h marks
:h mark-motions (différence entre ' et ` )
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Leçon 2.1 RÉSUMÉ
1. Utiliser lʼun des 26 registres nommés (a-z) pour conserver
(copier/supprimer) et coller du texte.
2. Copier un mot entier en plaçant le curseur sur le mot: yiw
3. Changer un mot entier en plaçant le curseur sur le mot: ciw
4. Insérer du texte directement depuis un registre, en mode Insertion:
<CTRL-R>a
5. Insérer le résultat dʼune opération arithmétique simple:
<CTRL-R> suivi de =60*60<ENTRÉE> en mode Insertion
6. Insérer le résultat dʼun appel système: <CTRL-R> suivi de
=system('ls -1')<ENTRÉE>
en mode Insertion
7. Inspecter les registres avec :reg
8. Apprendre pourquoi les suppressions de lignes entières (dd) sont
préservées plus longtemps: elles bénéficient des registres 1 à 9 et sont
préservées plus longtemps que toute autre opération
9. Apprendre la destination finale de toutes les copies dans les registres
numérotés et à quel point elles sont éphémères
10. Placer des marques depuis le mode Normal m[a-zA-Z0-9]
11. Se déplacer ligne par ligne jusquʼà une marque avec '
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Voilà, vous êtes arrivé à la fin du chapitre deux du tutoriel de Vim. Il est
encore en chantier.
Ce chapitre a été écrit par Paul D. Parker,
il a été traduit en français par Damien Lejay.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

5
src/auto/configure vendored
View File

@ -9080,7 +9080,7 @@ shm_open("/test", O_CREAT, 0600);
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
if ac_fn_c_try_link "$LINENO"
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SHM_OPEN 1" >>confdefs.h
@ -9090,7 +9090,8 @@ else case e in #(
printf "%s\n" "no" >&6; } ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CPPFLAGS=$cppflags_save
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-wayland argument" >&5

View File

@ -4560,15 +4560,17 @@ copy_substring_from_pos(pos_T *start, pos_T *end, char_u **match,
int is_single_line = start->lnum == end->lnum;
segment_len = is_single_line ? (end->col - start->col)
: (int)STRLEN(start_ptr);
: (int)STRLEN(start_ptr);
if (ga_grow(&ga, segment_len + 1) != OK)
return FAIL;
ga_concat_len(&ga, start_ptr, segment_len);
if (!is_single_line)
ga_append(&ga, '\n');
// Append full lines between start and end
if (!is_single_line)
{
for (lnum = start->lnum + 1; lnum < end->lnum; lnum++)
{
line = ml_get(lnum);
@ -4577,6 +4579,7 @@ copy_substring_from_pos(pos_T *start, pos_T *end, char_u **match,
ga_concat(&ga, line);
ga_append(&ga, '\n');
}
}
// Append partial end line (up to word end)
word_end = find_word_end(end_line + end->col);
@ -4616,7 +4619,7 @@ expand_pattern_in_buf(
int pat_len, match_len;
int has_range = FALSE;
int compl_started = FALSE;
int search_flags, i;
int search_flags;
char_u *match, *line, *word_end;
regmatch_T regmatch;
@ -4673,14 +4676,8 @@ expand_pattern_in_buf(
if (compl_started)
{
// If we've looped back to an earlier match, stop
if ((dir == FORWARD
&& (cur_match_pos.lnum < prev_match_pos.lnum
|| (cur_match_pos.lnum == prev_match_pos.lnum
&& cur_match_pos.col <= prev_match_pos.col)))
|| (dir == BACKWARD
&& (cur_match_pos.lnum > prev_match_pos.lnum
|| (cur_match_pos.lnum == prev_match_pos.lnum
&& cur_match_pos.col >= prev_match_pos.col))))
if ((dir == FORWARD && LTOREQ_POS(cur_match_pos, prev_match_pos)) ||
(dir == BACKWARD && LTOREQ_POS(prev_match_pos, cur_match_pos)))
{
if (looped_around)
break;
@ -4740,7 +4737,7 @@ expand_pattern_in_buf(
match[pat_len + match_len] = NUL;
// Include this match if it is not a duplicate
for (i = 0; i < ga.ga_len; ++i)
for (int i = 0; i < ga.ga_len; ++i)
{
if (STRCMP(match, ((char_u **)ga.ga_data)[i]) == 0)
{

View File

@ -2392,7 +2392,7 @@ dnl defining FEAT_XFONTSET is delayed, so that it can be disabled for no GUI
AC_MSG_CHECKING(if shm_open is available)
cppflags_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>], [shm_open("/test", O_CREAT, 0600);])],

View File

@ -2774,7 +2774,7 @@ win_line(
skip_cells = 0;
#ifdef FEAT_TERMINAL
if (term_show_buffer(wp->w_buffer)
&& wlv.col == 0
&& wlv.vcol == 0
&& wlv.win_attr == term_get_attr(wp, lnum, -1))
// reset highlighting attribute
wlv.win_attr = 0;

View File

@ -250,7 +250,7 @@ static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg);
static void ins_compl_add_list(list_T *list);
static void ins_compl_add_dict(dict_T *dict);
static int get_userdefined_compl_info(colnr_T curs_col, callback_T *cb, int *startcol);
static void get_cpt_func_completion_matches(callback_T *cb);
static void get_cpt_func_completion_matches(callback_T *cb, int restore_leader);
static callback_T *get_callback_if_cpt_func(char_u *p);
# endif
static int setup_cpt_sources(void);
@ -4807,20 +4807,6 @@ get_callback_if_cpt_func(char_u *p)
}
return NULL;
}
/*
* Retrieve new completion matches by invoking callback "cb".
*/
static void
expand_cpt_function(callback_T *cb)
{
// Re-insert the text removed by ins_compl_delete().
ins_compl_insert_bytes(compl_orig_text.string + get_compl_len(), -1);
// Get matches
get_cpt_func_completion_matches(cb);
// Undo insertion
ins_compl_delete();
}
#endif
/*
@ -4984,7 +4970,7 @@ get_next_completion_match(int type, ins_compl_next_state_T *st, pos_T *ini)
#ifdef FEAT_COMPL_FUNC
case CTRL_X_FUNCTION:
if (ctrl_x_mode_normal()) // Invoked by a func in 'cpt' option
expand_cpt_function(st->func_cb);
get_cpt_func_completion_matches(st->func_cb, TRUE);
else
expand_by_function(type, compl_pattern.string, NULL);
break;
@ -6989,16 +6975,23 @@ remove_old_matches(void)
*/
#ifdef FEAT_COMPL_FUNC
static void
get_cpt_func_completion_matches(callback_T *cb UNUSED)
get_cpt_func_completion_matches(callback_T *cb UNUSED, int restore_leader)
{
int startcol = cpt_sources_array[cpt_sources_index].cs_startcol;
int result;
VIM_CLEAR_STRING(cpt_compl_pattern);
if (startcol == -2 || startcol == -3)
return;
if (set_compl_globals(startcol, curwin->w_cursor.col, TRUE) == OK)
if (restore_leader) // Re-insert the text removed by ins_compl_delete()
ins_compl_insert_bytes(compl_orig_text.string + get_compl_len(), -1);
result = set_compl_globals(startcol, curwin->w_cursor.col, TRUE);
if (restore_leader)
ins_compl_delete(); // Undo insertion
if (result == OK)
{
expand_by_function(0, cpt_compl_pattern.string, cb);
cpt_sources_array[cpt_sources_index].cs_refresh_always =
@ -7051,7 +7044,7 @@ cpt_compl_refresh(void)
}
cpt_sources_array[cpt_sources_index].cs_startcol = startcol;
if (ret == OK)
get_cpt_func_completion_matches(cb);
get_cpt_func_completion_matches(cb, FALSE);
}
}

View File

@ -0,0 +1,15 @@
| +0#af5f00255#ffffff0@1|1| |h+0#0000001#a8a8a8255|e|l@1|o| +0#0000000#ffffff0@65
| +0#af5f00255&@1|2| | +0#0000001#a8a8a8255| +0#0000000#ffffff0@69
| +0#af5f00255&@1|3| >h+0#0000000&|e+0#0000001#a8a8a8255|l@1|o| +0#0000000#ffffff0@65
|~+0#4040ff13&| @73
|~| @73
|~| @73
|!+2#ffffff16#00e0003|s|h| |-|c| |"|p|r|i|n|t|f| |'|h|e|l@1|o|\@1|n|\@1|n|h|e|l@1|o|'|"| |[|f|i|n|i|s|h|e|d|]| @11|3|,|1| @11|A|l@1
| +0#0000000#ffffff0@74
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|[+1#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
|-+2&&@1| |V|I|S|U|A|L| |L|I|N|E| |-@1| +0&&@46|3| @9

View File

@ -592,8 +592,8 @@ func Test_cpt_func_cursorcol()
call assert_equal(8, col('.'))
return col('.')
endif
call assert_equal("foo bar", getline(1))
call assert_equal(8, col('.'))
call assert_equal("foo ", getline(1))
call assert_equal(5, col('.'))
return v:none
endfunc

View File

@ -1032,6 +1032,10 @@ func Test_terminal_visual_empty_listchars()
call term_wait(buf)
call term_sendkeys(buf, "V2k")
call VerifyScreenDump(buf, 'Test_terminal_empty_listchars', {})
call term_sendkeys(buf, "\<esc>")
call term_sendkeys(buf, ":set nu\<cr>")
call term_sendkeys(buf, "ggV2j")
call VerifyScreenDump(buf, 'Test_terminal_empty_listchars2', {})
call StopVimInTerminal(buf)
endfunc

View File

@ -719,6 +719,18 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1498,
/**/
1497,
/**/
1496,
/**/
1495,
/**/
1494,
/**/
1493,
/**/
1492,
/**/

View File

@ -68,7 +68,8 @@ zh Chinese
echo "Chapter: 2"
printf "\tLang: %-3s => %s\n" \
en English\(default\)
en English\(default\) \
fr French
echo "================================================================================================"
}

View File

@ -907,21 +907,14 @@ vwl_destroy_seat(vwl_seat_T *seat)
/*
* Return a seat with the give name/label. If none exists then NULL is returned.
* If NULL or an empty string is passed as the label then $XDG_SEAT is used
* else the first available seat found is used.
* If NULL or an empty string is passed as the label then the first available
* seat found is used.
*/
static vwl_seat_T *
vwl_get_seat(const char *label)
{
if ((STRCMP(label, "") == 0 || label == NULL) && vwl_seats.ga_len > 0)
{
const char *xdg_seat = (char*)mch_getenv("XDG_SEAT");
if (xdg_seat == NULL)
return &((vwl_seat_T *)vwl_seats.ga_data)[0];
else
label = xdg_seat;
}
for (int i = 0; i < vwl_seats.ga_len; i++)
{