Joe Nash caca8d33a9
[vim] Fix command already exists on opening multiple mir buffers (#82410)
When using the vim syntax for mir, an error occurs in nvim  when opening
multiple .mir buffers. delcommand HiLink in the mir syntax file to avoid
the issue.

To reproduce:
Open an .mir file, for example
llvm/test/Codegen/X86/expand-post-ra-pseudo.mir
Open another mir file from within nvim, for example peephole.mir
```
Error detected while processing function 335[30]..<SNR>43_callback[25]..function 335[30]..<SNR>43_callback:                                                                                                                      
line   23:                                                                                                                                                                                                                       
Vim(command):E174: Command already exists: add ! to replace it: HiLink hi def link <args>   
```
2024-02-28 16:37:39 -05:00
..
2023-11-27 14:46:09 -08:00

-*- llvm/utils/vim/README -*-

This directory contains settings for the vim editor to work on llvm *.ll and
tablegen *.td files. It comes with filetype detection rules in the (ftdetect),
syntax highlighting (syntax), some minimal sensible default settings (ftplugin)
and indentation plugins (indent).

To install copy all subdirectories to your $HOME/.vim or if you prefer create
symlinks to the files here. Do not copy the vimrc file here it is only meant as
an inspiration and starting point for those working on llvm c++ code.

Note: If you notice missing or incorrect syntax highlighting, please contact
<llvm-bugs [at] lists.llvm.org>; if you wish to provide a patch to improve the
functionality, it will be most appreciated. Thank you.

If you find yourself working with LLVM Makefiles often, but you don't get syntax
highlighting (because the files have names such as Makefile.rules or
TEST.nightly.Makefile), add the following to your ~/.vimrc:

  " LLVM Makefile highlighting mode
  augroup filetype
    au! BufRead,BufNewFile *Makefile*     set filetype=make
  augroup END