I want to write command like autocmd BufAdd * if &filetype != 'help' | echo 'foo', but it didn't work. I've tried different options: &l:filetype, &buftype, &l:buftype; tried with toggled filetype setting, but nothing changed. Global command autocmd BufAdd * echo 'bar' worked everywhere includes help pages, and the same time :echo &filetype on help pages returns help. What am I doing wrong?
Exclude help and plugin pages from autocmd pattern
380 Views Asked by pas At
1
There are 1 best solutions below
Related Questions in VIM
- Firefox vim mode, can't switch to normal mode in style editor
- How to skip a command in redo
- Vim errorformat multiline string
- How to let Vim tell the switching across several `gvim.exe` processes?
- match wordchar and/or dot string of anylength
- augment the number of lines on indent
- Barebones vim with `nocp`
- Moved .vimrc in a new dir, trying to get it to work
- Copying text from gvim editor to system clipboard works only once per session
- Temporarily declare a word as wrong in vim spellchecker
- Automatically switch back to NerdTree after pressing "o" on file
- How to use Ctags to list all the references of a symbol(tag) in vim?
- Vim + Airline + Linux sloppy exit
- How to delete a WORD in vim in insert mode
- Prevent single letter deletes to spam clipboard manager
Related Questions in VI
- vi/fugitive: Gpush does not exit... sometimes
- How to append chars except empty and comment-out lines via VIM?
- mac os vi disable,and reminder me "UltiSnips requires py >= 2.6 or any py3"
- Copying to clipboard in vi
- Regex Match without new line ^M
- linux vi editor special character gets converted into something else
- VI editor - saving filename in :wq
- Disable Wrapping Cursor in Eclipse
- Vim remove part of line in a file
- convert a string in upper case in vi
- Shell Scripting - How to unzip a file and edit it by shell script?
- how to remove unwanted text in vi with regex or similar pattern match
- How can I display <TAB> as bars in vim
- Replacing varying length text over multiple lines in Vim
- How to prevent wrapping string in quotes while enable auto-wrap in vim?
Related Questions in AUTOCMD
- Variables of scripts go away with autocmd?
- Improve autocommand to indent and return to line on BufLeave and FocusLost
- Vim: disable autocmd BufRead (modeline)
- Vimscript: Trigger when cursor moved between lines
- Use variables/lists as an autocmd pattern
- How do I set an autocmd in the vimrc to only run with specific filetypes?
- Run/Toggle command for certain filetypes only
- Disable syntax highlighting for certain filenames
- How to open pdf files under cursor (using 'gf') with external PDF readers in vim
- :hi Vertsplit doesn't run on autocmd from init.vim
- Exclude help and plugin pages from autocmd pattern
- Call a function in Vim’s `autocmd` command
- Is there a clean way to augment a `BufWrite` autocmd in Vim?
- Disabling autocmd's for special windows
- Different VimResized autocmds for Shrinking and Growing
Related Questions in NEOVIM
- Use case for Neovim terminal mode inside tmux session
- Neovim + rainbow
- Using `system` with a long string VS multiple arguments
- Can't find init.vim
- How to change neovim PATH during installation proccess
- Syntax Highlighting Issues in Neovim
- Any shell command to directly let dein.vim to install plugins?
- How to make the GUI elements of windows version Neovim appear?
- Neovim Indent Bug?
- How to run scripts in background in Neovim?
- Vim error E745 'Using a List as a Number' when creating `Latex` snippet in `neosnippet`
- VIM textwidth has no effect
- Vimscript - split function call to multiple lines
- 'Cursorline' in the setting of 'wordwrap' in VIM
- How to change coc.nvim floating window colors?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Because,
BufAddthe current buffer can be (and quite probably is) different from the matched buffer;BufAddthe matched buffer may (and quite probably will) not have any&filetypeset yet.Note that normally one should hook into some specific FileType with
~/.vim/after/ftplugin/xyz.viminstead.