github pit-ray/win-vind v5.3.0

latest releases: v5.13.1, v5.13.0, v5.12.0...
10 months ago

Minor

New

I added the following commands. (#89, #100) (#108)

command syntax
autocmd [au]tocmd {event} {aupat} {cmd}
autocmd! [au]tocmd! {event} {aupat} {cmd}

See its document for details.
https://pit-ray.github.io/win-vind/cheat_sheet/functions/#autocmd_add

autocmd

It adds {cmd} into autocmd list for {aupat}, autocmd pattern, corresponding to {event}. As such as Vim, this function does not overwrite but append {cmd} into a list even if the same {cmd} has already existed in a list. The event does not allow us to use *. If you want to add a command to some events at the same time, , without after-space is available. The rule of {aupat} is based on the original Vim. Of course, registered {cmd}s will execute in order added.

autocmd!

It remove all autocmd matched {event} and {aupat}, then register {cmd} after delete. The following syntaxes are available.

au[tocmd]! {event} {aupat} {cmd}
au[tocmd]! {event} {aupat}
au[tocmd]! * {aupat}
au[tocmd]! {event}

Each features are the same as the original Vim.

Examples

  1. Default mapping for the specific event (match any applications)
    autocmd AppLeave * <to_insert>
  2. Once notepad is selected, it will automatically switch to Editor normal mode.
    "Equivalent to conventional dedicate_to_window
    autocmd AppEnter *notepad* <to_edi_normal>
  3. Suppress win-vind in processes named Vim.
    " Equivalent to conventional suppress_for_vim
    autocmd AppEnter,EdiNormalEnter *vim* <to_resident>

Change

  • Deprecate suppress_for_vim and dedicate_to_window


Don't miss a new win-vind release

NewReleases is sending notifications on new releases.