Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
Vim
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Someone-Else
Vim
Commits
8dd1aa58
Commit
8dd1aa58
authored
18 years ago
by
Bram Moolenaar
Browse files
Options
Downloads
Patches
Plain Diff
updated for version 7.0-187
parent
fb7c90c0
No related branches found
Branches containing commit
Tags
v7.0.187
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
runtime/doc/autocmd.txt
+17
-8
17 additions, 8 deletions
runtime/doc/autocmd.txt
src/ex_cmds2.c
+11
-0
11 additions, 0 deletions
src/ex_cmds2.c
src/fileio.c
+1
-0
1 addition, 0 deletions
src/fileio.c
src/version.c
+2
-0
2 additions, 0 deletions
src/version.c
src/vim.h
+2
-1
2 additions, 1 deletion
src/vim.h
with
33 additions
and
9 deletions
runtime/doc/autocmd.txt
+
17
−
8
View file @
8dd1aa58
*autocmd.txt* For Vim version 7.0. Last change: 200
6 May 0
6
*autocmd.txt* For Vim version 7.0. Last change: 200
7 Jan 1
6
VIM REFERENCE MANUAL by Bram Moolenaar
...
...
@@ -279,6 +279,7 @@ Name triggered by ~
|FuncUndefined| a user function is used but it isn't defined
|SpellFileMissing| a spell file is used but it can't be found
|SourcePre| before sourcing a Vim script
|SourceCmd| before sourcing a Vim script |Cmd-event|
|VimResized| after the Vim window size changed
|FocusGained| Vim got input focus
...
...
@@ -690,10 +691,17 @@ ShellFilterPost After executing a shell command with
Can be used to check for any changed files.
*SourcePre*
SourcePre Before sourcing a Vim script. |:source|
<afile> is the name of the file being sourced.
*SourceCmd*
SourceCmd When sourcing a Vim script. |:source|
<afile> is the name of the file being sourced.
The autocommand must source this file.
|Cmd-event|
*SpellFileMissing*
SpellFileMissing When trying to load a spell checking file and
it can't be found. <amatch> is the language,
'encoding' also matters. See
it can't be found. The pattern is matched
against the language. <amatch> is the
language, 'encoding' also matters. See
|spell-SpellFileMissing|.
*StdinReadPost*
StdinReadPost After reading from the stdin into the buffer,
...
...
@@ -1219,8 +1227,8 @@ highlighting when starting Vim.
*Cmd-event*
When using one of the "*Cmd" events, the matching autocommands are expected to
do the file reading
or
writing. This can be used when working with
a special
kind of file, for example on a remote system.
do the file reading
,
writing
or sourcing
. This can be used when working with
a special
kind of file, for example on a remote system.
CAREFUL: If you use these events in a wrong way, it may have the effect of
making it impossible to read or write the matching files! Make sure you test
your autocommands properly. Best is to use a pattern that will never match a
...
...
@@ -1233,9 +1241,10 @@ possible with a BufReadCmd, use the |:preserve| command to make sure the
original file isn't needed for recovery. You might want to do this only when
you expect the file to be modified.
The |v:cmdarg| variable holds the "++enc=" and "++ff=" argument that are
effective. These should be used for the command that reads/writes the file.
The |v:cmdbang| variable is one when "!" was used, zero otherwise.
For file read and write commands the |v:cmdarg| variable holds the "++enc="
and "++ff=" argument that are effective. These should be used for the command
that reads/writes the file. The |v:cmdbang| variable is one when "!" was
used, zero otherwise.
See the $VIMRUNTIME/plugin/netrw.vim for examples.
...
...
This diff is collapsed.
Click to expand it.
src/ex_cmds2.c
+
11
−
0
View file @
8dd1aa58
...
...
@@ -2811,6 +2811,17 @@ do_source(fname, check_other, is_vimrc)
}
#ifdef FEAT_AUTOCMD
/* Apply SourceCmd autocommands, they should get the file and source it. */
if
(
has_autocmd
(
EVENT_SOURCECMD
,
fname_exp
,
NULL
)
&&
apply_autocmds
(
EVENT_SOURCECMD
,
fname_exp
,
fname_exp
,
FALSE
,
curbuf
))
# ifdef FEAT_EVAL
return
aborting
()
?
FAIL
:
OK
;
# else
return
OK
;
# endif
/* Apply SourcePre autocommands, they may get the file. */
apply_autocmds
(
EVENT_SOURCEPRE
,
fname_exp
,
fname_exp
,
FALSE
,
curbuf
);
#endif
...
...
This diff is collapsed.
Click to expand it.
src/fileio.c
+
1
−
0
View file @
8dd1aa58
...
...
@@ -7019,6 +7019,7 @@ static struct event_name
{
"ShellCmdPost"
,
EVENT_SHELLCMDPOST
},
{
"ShellFilterPost"
,
EVENT_SHELLFILTERPOST
},
{
"SourcePre"
,
EVENT_SOURCEPRE
},
{
"SourceCmd"
,
EVENT_SOURCECMD
},
{
"SpellFileMissing"
,
EVENT_SPELLFILEMISSING
},
{
"StdinReadPost"
,
EVENT_STDINREADPOST
},
{
"StdinReadPre"
,
EVENT_STDINREADPRE
},
...
...
This diff is collapsed.
Click to expand it.
src/version.c
+
2
−
0
View file @
8dd1aa58
...
...
@@ -666,6 +666,8 @@ static char *(features[]) =
static
int
included_patches
[]
=
{
/* Add new patch number below this line */
/**/
187
,
/**/
186
,
/**/
...
...
This diff is collapsed.
Click to expand it.
src/vim.h
+
2
−
1
View file @
8dd1aa58
...
...
@@ -1102,7 +1102,7 @@ enum auto_event
EVENT_COLORSCHEME
,
/* after loading a colorscheme */
EVENT_FILEAPPENDPOST
,
/* after appending to a file */
EVENT_FILEAPPENDPRE
,
/* before appending to a file */
EVENT_FILEAPPENDCMD
,
/* append
e
to a file using command */
EVENT_FILEAPPENDCMD
,
/* append to a file using command */
EVENT_FILECHANGEDSHELL
,
/* after shell command that changed file */
EVENT_FILECHANGEDSHELLPOST
,
/* after (not) reloading changed file */
EVENT_FILECHANGEDRO
,
/* before first change to read-only file */
...
...
@@ -1147,6 +1147,7 @@ enum auto_event
EVENT_REMOTEREPLY
,
/* upon string reception from a remote vim */
EVENT_SWAPEXISTS
,
/* found existing swap file */
EVENT_SOURCEPRE
,
/* before sourcing a Vim script */
EVENT_SOURCECMD
,
/* sourcing a Vim script using command */
EVENT_SPELLFILEMISSING
,
/* spell file missing */
EVENT_CURSORMOVED
,
/* cursor was moved */
EVENT_CURSORMOVEDI
,
/* cursor was moved in Insert mode */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment