summaryrefslogtreecommitdiff
path: root/llvm/utils/vim/ftplugin
AgeCommit message (Collapse)Author
2024-12-04[vim] Improve iskeyword for LLVM IR (#117905)Fraser Cormack
This patch sets the 'iskeyword' variable to characters found in LLVM IR identifiers. Keywords are used in many places in vim, most notably being treated as word boundaries for commands like 'w' and '*'. The aim with this is to improve the navigability and editability of LLVM IR files as now one is able to: skip over entire identifiers with motions (e.g., `w/e/b`); yank/delete whole identifiers (e.g., `diw`); highlight/search for the identifier under the cursor (`*`), etc. More complicated LLVM identifiers including quotation marks are not supported. The 'iskeyword' variable is just a list of characters, not a regex, and including quotation marks and all the characters permitted in quoted identifiers would expand the scope to almost everything and become less usable. These types of identifiers are rare by comparison. Note that this does change how words are considered across the entire LLVM IR file, so including strings, comments, names, etc. Given that the majority of editing/navigating LLVM IR is working with and across values, this is arguably a worthwhile trade-off.
2023-11-27[vim] set commentstring (#71838)Nick Desaulniers
I recently moved from using vim to lunarvim. I noticed that `gcc` (lol) wasn't able to comment out lines, because commentstring is not set. Thanks to Chase Colman for the suggestion in https://github.com/LunarVim/LunarVim/issues/4394.
2021-02-17[vim] Add initial syntax definition for .mir filesCassie Jones
This initial definition handles the yaml container and the embedding of the inner IRs. As a stopgap, this reuses the LLVM IR syntax highlighting for the MIR function bodies--even though it's not technically correct, it produces decent highlighting for a first pass. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D95552
2015-07-15[vim] Add the IR's comment prefix to the comments list. This allows vimChandler Carruth
to intelligently wrap prose written in IR comment blocks. This has bothered me for roughly ever, and my fellow IRC denziens convinced me to fix it. llvm-svn: 242266
2015-04-21Enhanced vim support.Matthias Braun
This brings the utils/vim folder into a more vim-like format by moving the syntax hightlighting files into a syntax subdirectory. It adds some minimal settings that everyone should agree on to ftdetect/ftplugin and features a new indentation plugin for .ll files. llvm-svn: 235369