Questions tagged [events]
The events tag has no usage guidance.
11
questions
0
votes
2
answers
30
views
Misunderstanding of interaction between local options, moving between windows, and WinLeave, WinEnter, BufLeave, BufEnter events
This what is logged in :messages when I'm printing the value of nu and rnu upon the 4 events WinLeave, WinEnter, BufLeave, BufEnter during the action, done twice, of opening :help and closing it. The ...
0
votes
1
answer
26
views
Specifying filetype in ModeChanged event autocmd
I'm using stylua as the code formatter for lua files.
I do not usually get used to its formatting style but sometimes I do need a little help with it, so I decided to make it the formatprg during the ...
0
votes
2
answers
111
views
How to close Terminal and NERDTree windows if they are the last windows?
If I close all buffers, I'm left with the terminal window, which automatically opens whenever I open Vim.
I would like it close automatically when I exit Vim.
I see that on the NERDTree repo, they ...
1
vote
1
answer
31
views
Is it correct that between a CmdlineLeave and a CmdwinEnter there must be a CmdlineEnter?
Given
augroup Dummy
autocmd!
autocmd CmdLineEnter / echom "CmdLineEnter /"
autocmd CmdwinLeave / echom "CmdwinLeave /"
autocmd CmdLineLeave / echom "CmdLineLeave /&...
2
votes
1
answer
184
views
How can I execute a command after searching with `/`?
After a search command / (i.e., in normal mode) is done, I would like another command to be executed automatically. At the moment the other command should be :normal! zz, in order to center the found ...
3
votes
1
answer
313
views
Detecting the Enter and Leave of Visual mode event
Are there any events similar to InsertEnter and InsertLeave that I could use for visual mode?
Looking through the helpfiles, I did not fine any.
If not, how would I be able to detect if Vim enters or ...
1
vote
1
answer
15
views
How can I deactivate CR only if its effect is to move to the next line?
I don't use arrow keys, but to avoid the cursor moving should I hit them by mistake, I have this in my vimrc:
inoremap <Left> <NOP>
inoremap <Right> <NOP>
inoremap <...
3
votes
2
answers
73
views
What is the pattern matched against for events CmdwinLeave and CmdwinEnter?
More in general I'm always in doubt about what's the meaning of the {aupat} argument of autocmd for a given {event}.
From :help :autocmd I read (my emphasis)
Add {cmd} to the list of commands that ...
1
vote
0
answers
131
views
How to detect split window resized?
I'm aware that the VimResized event happens the main vim window is resized. Is there any event that happens when a split subwindow is resized? I'm looking for something like WinResized.
I'd like to ...
5
votes
1
answer
634
views
How do you manually trigger an event?
I have case where I would like to trigger the TextChanged event manually without actually changing the text. Would that be possible? How?
I know it's hacky, but it would make my life easier right now. ...
3
votes
1
answer
119
views
Is there going to be a VimConf this year?
Since Covid-19 hit, many conferences have been canceled or moved online.
Are we going to have a conference for Vim and NeoVim in 2020?