Commit Graph

154 Commits

Author SHA1 Message Date
Thomas Vigouroux
684c782546 docs(autocmd): update docs to match implementation
docs(reg_recorded): add links to relevant docs

docs(Recording): update docs to match implementation

docs(Q) update references of Q to be gQ

docs(autocmd) add description about state of reg_record{ing,ed} for RecordingLeave

docs(vim_diff) add Recording{Enter,Leave} to features

docs(index) removed duplicate gQ

docs(options) removed line about gQ erroring in visual mode

Update runtime/doc/vim_diff.txt

Co-authored-by: zeertzjq <zeertzjq@outlook.com>

docs(vim_diff) removed double mention of Q
2021-12-18 08:54:07 -07:00
Thomas Vigouroux
8a4e26c6fe feat(autocmd): add Recording autocmds
feat(eval): add reg_recorded()

This function is used the get the last recorded register.

style(Recording): rename handler to match suggestions

fix(RecordingLeave): send autocommand earlier

This makes the autocommand fire just before setting reg_recorded to
reg_recording, this way we clearly show that we are actually just before
actually quitting the recording mode.
2021-12-18 10:54:26 +01:00
Alejandro Exojo
8ad6015409
feat: add autocommand event when search wraps around (#8487) 2021-12-10 12:28:25 -07:00
Jan Edmund Lazo
828bf128a6
Merge pull request #15840 from vimpostor/vim-8.2.3430
vim-patch:8.2.{3430,3434,3462,3463,3555,3609,3610}: ModeChanged autocmd
2021-11-30 22:13:50 -05:00
dundargoc
caa6992a10
chore: fix typos (#16361)
Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: István Donkó <istvan.donko@gmail.com>
Co-authored-by: Julian Berman <Julian@GrayVines.com>
Co-authored-by: bryant <bryant@users.noreply.github.com>
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com>
Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com>
Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com>
Co-authored-by: Jesse Wertheim <jaawerth@gmail.com>
Co-authored-by: dm1try <me@dmitry.it>
Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl>
Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com>
Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: István Donkó <istvan.donko@gmail.com>
Co-authored-by: Julian Berman <Julian@GrayVines.com>
Co-authored-by: bryant <bryant@users.noreply.github.com>
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com>
Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com>
Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com>
Co-authored-by: Jesse Wertheim <jaawerth@gmail.com>
Co-authored-by: dm1try <me@dmitry.it>
Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl>
Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com>
2021-11-27 11:10:48 -05:00
Christian Clason
e6c46bac3f
vim-patch:88a4205f1cfb (#16399)
Update runtime files
88a4205f1c
2021-11-22 10:53:57 +01:00
Magnus Groß
11683193f5
vim-patch:8.2.3555: ModeChanged is not triggered on every mode change
Problem:    ModeChanged is not triggered on every mode change.
Solution:   Also trigger on minor mode changes. (Maguns Gross, closes vim/vim#8999)
25def2c8b8
2021-11-18 11:23:18 +01:00
Magnus Groß
69bd1e4e36
vim-patch:8.2.3430: no generic way to trigger an autocommand on mode change
Problem:    No generic way to trigger an autocommand on mode change.
Solution:   Add the ModeChanged autocommand event. (Magnus Gross, closes vim/vim#8856)
f1e8876fa2

N/A patches for version.c:

vim-patch:8.2.3434: function prototype for trigger_modechanged() is incomplete

Problem:    Function prototype for trigger_modechanged() is incomplete.
Solution:   Add "void".
28e591dd50

Fixes #4399.
Fixes #7416.
2021-11-18 11:23:18 +01:00
zeertzjq
dba3590a0e
vim-patch:8.2.3591: no event is triggered when closing a window (#16306)
Problem:    No event is triggered when closing a window.
Solution:   Add the WinClosed event. (Naohiro Ono, closes vim/vim#9110)
23beefed73

Nvim has already implemented this feature, so this only changes tests
and docs.
2021-11-17 21:11:09 -05:00
zeertzjq
6004f9137a refactor(dirchanged): tab -> tabpage
Match Vim's behavior.
2021-10-17 22:04:53 +08:00
zeertzjq
920473d2f2 vim-patch:8.0.1459: cannot handle change of directory
Problem:    Cannot handle change of directory.
Solution:   Add the DirChanged autocommand event. (Andy Massimino,
            closes vim/vim#888)  Avoid changing directory for 'autochdir' too often.
b7407d3fc9

Only add "auto" pattern. "window" and "global" are already implemented.
Skip `Test_dirchanged_auto` using `CheckFunction test_autochdir`.
Part of PR #15952. More information can be found there.

N/A patches for version.c:

vim-patch:8.0.1460: missing file in patch

Problem:    Missing file in patch.
Solution:   Add changes to missing file.
b5cb65ba2b

vim-patch:8.0.1461: missing another file in patch

Problem:    Missing another file in patch.
Solution:   Add changes to missing file.
15833239a4
2021-10-17 22:04:53 +08:00
Christian Clason
0ba77f2f31 vim-patch:2286304cdbba
Update runtime files
2286304cdb
2021-10-16 18:03:51 +02:00
Christian Clason
0c2a7aa5f7
vim-patch:6e649224926b (#15911)
Update runtime files
6e64922492
2021-10-05 14:12:16 +02:00
Christian Clason
e31652879e
vim-patch:partial 53f7fccc9413 (#15631)
* vim-patch:partial 53f7fccc9413

Update runtime files
53f7fccc94

omit macros/hanoi/hanoi.vim
omit spell/tet/main.aap
omit tools/shtags.1
omit tools/xcmdsrv_client.c

skip doc/pattern.txt (requires 8.2.3110; 8.2.{1665,1872})
skip doc/map.txt (requires 8.2.3228)
2021-09-11 16:47:45 +02:00
Christian Clason
be557dddf4 vim-patch:90df4b9d4234
Update runtime files
90df4b9d42

omit .github/CODEOWNERS
omit doc/vim9.txt
omit po/it.po

skip ftplugin/jsonc.vim
skip indent/jsonc.vim
skip syntax/jsonc.vim
(already ported in dce50312e1)

partial skip doc/eval.txt (needs 8.1.{2304,2321})
2021-09-10 09:14:56 +02:00
Christian Clason
79cbbd5179
vim-patch:d2ea7cf10a4d #15571
Update runtime files
d2ea7cf10a

omit `runtime/doc/if_tcl.txt`
omit `runtime/doc/textprop.txt`
omit `runtime/tutor/*`
omit `runtime/syntax/vim.vim` (cherry-picked in 2dd7828511)

manual merge of `runtime/pack/dist/opt/termdebug/plugin/termdebug.vim`
2021-09-08 07:24:12 -07:00
Gregory Anders
50b30de200
feat(terminal): TermClose: set exit code in v:event.status #15406
Closes #4713
2021-08-20 10:45:28 -07:00
dundargoc
c9131ef9b5
docs: fix paragraph for BufEnter in the documentation (#15301) 2021-08-07 12:18:40 +02:00
shadmansaleh
1f280b582f fixup(runtime): Fix lua runtime files not listed
lua runtime files weren't listed in :scriptname & profiler.
This fixes that.

* Add tests

* Small doc tweeks
2021-06-13 00:27:52 +06:00
Jan Edmund Lazo
ad6bb386be
vim-patch:4c295027a426
Update runtime files
4c295027a4
2021-05-02 13:00:38 -04:00
Jan Edmund Lazo
b8f3ef10c9
vim-patch:dad4473f02e1
Update runtime files.
dad4473f02

Omit :echoconsole. Patch v8.2.2638 is not ported.
2021-05-02 11:51:38 -04:00
Jan Edmund Lazo
330500a5bf
vim-patch:cb80aa2d53e5
Update runtime files.
cb80aa2d53

Omit runtime/doc/tabpage.txt.
Patch v8.2.1401 is not ported yet.

Port optwin.vim changes without gettext().
Patch v8.2.1544 is not ported yet.
2021-05-01 22:29:02 -04:00
Jan Edmund Lazo
e1171cf1d2
vim-patch:d58a3bf7dac8
Update runtime files.
d58a3bf7da

Omit syntax/man.vim.
2021-05-01 02:01:25 -04:00
Jan Edmund Lazo
09f3e62bc6
vim-patch:e7b1ea0276cc
Update runtime files.
e7b1ea0276
2021-04-29 20:42:16 -04:00
Jan Edmund Lazo
62adc04f08
vim-patch:469bdbde1e8e
Minor runtime file updates.
469bdbde1e
2021-04-27 09:21:32 -04:00
Björn Linse
42ffa2d62e
Merge pull request #13205 from romgrk/add-bufmodified-autocmd
Implement BufModifiedSet autocmd
2020-11-09 12:23:14 +01:00
Rom Grk
6b5975a1eb doc: add BufModifiedSet 2020-11-07 23:22:54 -05:00
Andrea Cedraro
4c7ad9527d
Add v:event flag on DirChanged signaling switching window (#13153)
Closes #9909
2020-11-07 12:02:06 -05:00
Rom Grk
0fce70252d doc: fix WinScrolled details 2020-11-07 06:25:07 -05:00
Rom Grk
13e0ca3e19 Merge branch 'master' into add-scroll-events 2020-11-03 03:11:08 -05:00
Rom Grk
e606654ac2 doc: update doc: s/Scroll/WinScrolled/ 2020-10-28 04:49:49 -04:00
Rom Grk
ffe1a067df docs: add documentation for Scroll autocmd 2020-10-24 04:57:15 -04:00
Jan Edmund Lazo
3f0850e9f0
vim-patch:8.2.1874: can't do something just before leaving Insert mode
Problem:    Can't do something just before leaving Insert mode.
Solution:   Add the InsertLeavePre autocommand event. (closes vim/vim#7177)
b53e13a91a

N/A patches for version.c:

vim-patch:8.1.1877: graduated features scattered

Problem:    Graduated features scattered.
Solution:   Put graduated and obsolete features together.
ffc0716af8

vim-patch:8.2.1875: warning when building GTK gui

Problem:    Warning when building GTK gui.
Solution:   Add missing function parameter.
3da855c8e2

vim-patch:8.2.1877: test for function list fails

Problem:    Test for function list fails.
Solution:   Move "obsolete" comments one line up.
b8f519e538

vim-patch:8.2.1878: GTK: error for redefining function

Problem:    GTK: error for redefining function. (Tony Mechelynck)
Solution:   Remove "gtk_" prefix from local functions and prepend "gui_" to
            global functions.
8a99e66b4f

vim-patch:8.2.1881: cannot build with GTK3

Problem:    Cannot build with GTK3.
Solution:   Adjust form functions.
692d1a51e7

vim-patch:8.2.1883: compiler warnings when using Python

Problem:    Compiler warnings when using Python.
Solution:   Adjust PyCFunction to also have the second argument.  Use "int"
            return type for some functions.  Insert "(void *)" to get rid of
            the remaining warnings.
4ce5fe4c87
2020-10-21 23:36:56 -04:00
Justin M. Keyes
c2662210b5
docs, remove 'guifontset' #11708
- remove redundant autocmd list
  This "grouped" list is useless, it only gets in the way when searching
  for event names.
- intro.txt: cleanup
- starting.txt: update, revisit
- doc: `:help bisect`
- mbyte.txt: update aliases 1656367b90. closes #11960
- options: remove 'guifontset'. Why:
  - It is complicated and is used by almost no one.
  - It is unlikely to be implemented by Nvim GUIs (complicated to parse,
    specific to Xorg...).
2020-08-31 00:51:35 -07:00
Christian Clason
8a1276005a
Add v:event.visual during TextYankPost (#12382)
* propagate visual selection to textyankpost event

* adapt tests

* add docs

* also adapt oldtest
2020-06-03 10:51:25 -04:00
Jan Edmund Lazo
5ede2766c8
vim-patch:8.2.0158: triggering CompleteDone earlier is not backwards compatible
Problem:    Triggering CompleteDone earlier is not backwards compatible.
            (Daniel Hahler)
Solution:   Add CompleteDonePre instead.
3f169ce17e
2020-01-26 21:50:37 -05:00
Justin M. Keyes
b648b38bb1 doc: autocmd.txt 2020-01-18 21:32:14 -08:00
Justin M. Keyes
156c25e498 WinClosed: sort auevents.lua; improve tests
- test: reduce verbosity, condense redundancy, improve readability
- auevents.lua: keep events sorted by name. ref afd1d412fa
2020-01-18 21:32:14 -08:00
Marcos ALMEIDA
757aad92e8 autocmd: add WinClosed event
- only fire once, just before freeing mem
- trigger when on a different buffer
- avoid recursive calls in another tab
2020-01-18 17:06:03 -08:00
Jan Edmund Lazo
ad35cbca76
vim-patch:8.2.0123: complete_info() does not work when CompleteDone is triggered
Problem:    complete_info() does not work when CompleteDone is triggered.
Solution:   Trigger CompleteDone before clearing the info.
17e04781f2
2020-01-17 23:46:00 -05:00
Justin M. Keyes
9231684986
doc [ci skip] #11656 2020-01-12 23:41:55 -08:00
Jan Edmund Lazo
6c606c1191
vim-patch:8.1.1875: cannot get size and position of the popup menu
Problem:    Cannot get size and position of the popup menu.
Solution:   Add pum_getpos(). (Ben Jackson, closes vim/vim#4827)
e9bd57286a

https://github.com/neovim/neovim/pull/11562 backported the vim patch.
This patch only updates the runtime/doc/ files to match Vim.
2019-12-29 18:34:05 -05:00
Seth Fowler
251b20e533 Add support for the pum_getpos() API (#11562)
Add support for the pum_getpos() API
2019-12-16 20:08:55 +01:00
Daniel Hahler
f33371c03f vim-patch:8.1.2017: cannot execute commands after closing cmdline window #11479
Problem:    Cannot execute commands after closing the cmdline window.
Solution:   Also trigger BufEnter and WinEnter. (closes vim/vim#4762)
96e38a86a7

Fixes https://github.com/neovim/neovim/issues/11279.
2019-11-29 09:51:25 -08:00
Usama Hameed
fc27dc98d7 autocmds: TermEnter, TermLeave #8550
fix #8428
2019-09-14 15:54:19 -07:00
Justin M. Keyes
589f612adf rename: UIAttach/UIDetach => UIEnter/UILeave
"enter"/"leave" is more conventional for Vim events, and
"attach"/"detach" distinction does not gain much.
2019-09-12 17:04:05 -07:00
Justin M. Keyes
6dd56d0902 UIAttach, UIDetach
doc: ginit.vim, gvimrc
fix #3656
2019-09-12 17:04:05 -07:00
Rui Abreu Ferreira
e9cf515888 UIAttach, UIDetach 2019-09-12 15:52:54 -07:00
Justin M. Keyes
45c34bd84a
:doautocmd : Never show "No matching autocommands" #10689
The message is useless, it doesn't even mention the event name.

vim_dev discussion:
https://groups.google.com/forum/#!msg/vim_dev/RTbq58TMq9w/Xr4rSoUTCgAJ

ref: https://github.com/vim/vim/issues/4300
2019-08-05 03:33:45 +02:00
Justin M. Keyes
0d852bdc69 vim-patch:6c1e1570b134
Update runtime files
6c1e1570b1
2019-08-02 16:20:22 +02:00