Closed sdothum closed 5 years ago
Nice idea -- would something like VimadeIgnore [expr] or VimadeExclude [expr] suit your needs? -- The list itself I think will be exposed through the config.
Not quite sure what [expr] will be yet -- seems like it to start it should at least support matching on filetype, buffer/file name.
Hadn't thought about filetype but I could see some having a use for that. As for var naming, perhaps g:VimadeGroupBuf and g:VimadeGroupFt or g:VimadeGroup (if you don't need to distinguish between filetype and buffer name -- filetypes would most likely be defined as exact matches, names as regex). Tuples would be another alternative if you do need to make the distinction.
I don't have any particular preference for var naming or how you define the specification -- whatever is easiest for you to implement and is consistent with your coding. But simple regex grouping on ft and buffer/filename would be awesome.
Starting to work on this -- should have it out there some time this week
Sorry for the delay -- I think this should do what you are looking for. I steered away from the config to try and keep the logic moreso just vimscript in a vimrc.
Added the following commands:
VimadeBufDisable
- remove and ignore fading for the current buffer
VimadeBufEnable
- re-enable fading for current buffer
VimadeWinDisable
- remove and ignore fading for the current window
VimadeWinEnable
- re-enable fading for current window
usage examples:
au! BufWinEnter Dockerfile VimadeBufDisable
- Disables fading for buffers loaded that are named Dockerfile
au! FileType nerdtree VimadeBufDisable
- Disables fading for buffers with the nerdtree filetype>
Thank you! This works for the Yankring plugin that caught my attention with it's multiple windows.
Great work.
Sorry for the delay -- I think this should do what you are looking for. I steered away from the config to try and keep the logic moreso just vimscript in a vimrc.
Added the following commands:
VimadeBufDisable
- remove and ignore fading for the current bufferVimadeBufEnable
- re-enable fading for current bufferVimadeWinDisable
- remove and ignore fading for the current windowVimadeWinEnable
- re-enable fading for current windowusage examples:
au! BufWinEnter Dockerfile VimadeBufDisable
- Disables fading for buffers loaded that are named Dockerfile
au! FileType nerdtree VimadeBufDisable
- Disables fading for buffers with the nerdtree filetype>
Tried using the au! FileType nerdtree VimadeBufDisable
, and got this ton of errors when opening Nerdtree:
Some plugins open multiple windows eg yankring. Would be nice to be able to provide a regex expression to be able to exclude fading of associated buffer windows when any are in focus, and faded when not.