diff options
Diffstat (limited to 'public/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre/index.html')
| -rw-r--r-- | public/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre/index.html | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/public/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre/index.html b/public/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre/index.html index 049afdc..f45df6b 100644 --- a/public/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre/index.html +++ b/public/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre/index.html @@ -10,7 +10,7 @@ <link rel="icon" type="image/svg+xml" href="/favicon.svg"> <title>【Vim】 autocmd events の BufWrite/BufWritePre の違い | REPL: Rest-Eat-Program Loop</title> <link rel="stylesheet" href="/style.css?h=17cf97a767ec5fb6e64967729f40f30a"> - <link rel="stylesheet" href="/hl.css?h=208c52e3b7c9db1cad782c5d30b4698f"> + <link rel="stylesheet" href="/hl.css?h=340e65ffd5c17713efc9107c06304f7b"> </head> <body class="single"> <header class="header"> @@ -122,24 +122,24 @@ <a href="https://github.com/vim/vim/blob/8e6be34338f13a6a625f19bcef82019c9adc65f2/src/autocmd.c#L85-L86">https://github.com/vim/vim/blob/8e6be34338f13a6a625f19bcef82019c9adc65f2/src/autocmd.c#L85-L86</a> </p> - <pre class="highlight" language="c" linenumbering="unnumbered"><code> {"BufAdd", EVENT_BUFADD}, -{"BufCreate", EVENT_BUFADD},</code></pre> + <pre class="highlight" language="c" linenumbering="unnumbered"><code class="highlight"> {<span class="hljs-string">"BufAdd"</span>, EVENT_BUFADD}, +{<span class="hljs-string">"BufCreate"</span>, EVENT_BUFADD},</code></pre> <p> <a href="https://github.com/vim/vim/blob/8e6be34338f13a6a625f19bcef82019c9adc65f2/src/autocmd.c#L95-L97">https://github.com/vim/vim/blob/8e6be34338f13a6a625f19bcef82019c9adc65f2/src/autocmd.c#L95-L97</a> </p> - <pre class="highlight" language="c" linenumbering="unnumbered"><code> {"BufRead", EVENT_BUFREADPOST}, -{"BufReadCmd", EVENT_BUFREADCMD}, -{"BufReadPost", EVENT_BUFREADPOST},</code></pre> + <pre class="highlight" language="c" linenumbering="unnumbered"><code class="highlight"> {<span class="hljs-string">"BufRead"</span>, EVENT_BUFREADPOST}, +{<span class="hljs-string">"BufReadCmd"</span>, EVENT_BUFREADCMD}, +{<span class="hljs-string">"BufReadPost"</span>, EVENT_BUFREADPOST},</code></pre> <p> <a href="https://github.com/vim/vim/blob/8e6be34338f13a6a625f19bcef82019c9adc65f2/src/autocmd.c#L103-L105">https://github.com/vim/vim/blob/8e6be34338f13a6a625f19bcef82019c9adc65f2/src/autocmd.c#L103-L105</a> </p> - <pre class="highlight" language="c" linenumbering="unnumbered"><code> {"BufWrite", EVENT_BUFWRITEPRE}, -{"BufWritePost", EVENT_BUFWRITEPOST}, -{"BufWritePre", EVENT_BUFWRITEPRE},</code></pre> + <pre class="highlight" language="c" linenumbering="unnumbered"><code class="highlight"> {<span class="hljs-string">"BufWrite"</span>, EVENT_BUFWRITEPRE}, +{<span class="hljs-string">"BufWritePost"</span>, EVENT_BUFWRITEPOST}, +{<span class="hljs-string">"BufWritePre"</span>, EVENT_BUFWRITEPRE},</code></pre> </section> <section id="section--_neovim_のソースコード"> @@ -152,11 +152,11 @@ <a href="https://github.com/neovim/neovim/blob/71d4f5851f068eeb432af34850dddda8cc1c71e3/src/nvim/auevents.lua#L119-L124">https://github.com/neovim/neovim/blob/71d4f5851f068eeb432af34850dddda8cc1c71e3/src/nvim/auevents.lua#L119-L124</a> </p> - <pre class="highlight" language="lua" linenumbering="unnumbered"><code> aliases = { -BufCreate = 'BufAdd', -BufRead = 'BufReadPost', -BufWrite = 'BufWritePre', -FileEncoding = 'EncodingChanged', + <pre class="highlight" language="lua" linenumbering="unnumbered"><code class="highlight"> aliases = { +BufCreate = <span class="hljs-string">'BufAdd'</span>, +BufRead = <span class="hljs-string">'BufReadPost'</span>, +BufWrite = <span class="hljs-string">'BufWritePre'</span>, +FileEncoding = <span class="hljs-string">'EncodingChanged'</span>, },</code></pre> <p> |
