Comments (3)
Believe it or not, this is not a bug but is due to the definition of b:match_words
in ftplugin/vim.vim
.
Try the following (please do an update of the plugin first),
" file: test/issues/7/hotfix.vim
function! AugroupHotfix()
call matchup#util#patch_match_words(
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:',
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S\+:')
endfunction
let g:matchup_hotfix_vim = 'AugroupHotfix'
Equivalently, it could be patched to not show the augroup name.
Note: if you execute this after loading you must reload the test example using :edit
.
from vim-matchup.
Thanks for clarifying this and considering it despite that is related to the definition in $VIMRUNTIME/ftplugin/vim.vim.
With your hotfix it looks now as following:
I guess I would prefer that only the matched words are highlighted. This seems to be more consistent compared to if elseif
etc.
Since this is actually not related to your plugin, I close this issue.
from vim-matchup.
Thanks for testing. Here is an example which does not highlight the name.
" file: test/issues/7/hotfix2.vim
function! AugroupHotfix()
call matchup#util#patch_match_words(
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:',
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S\@=:')
endfunction
let g:matchup_hotfix_vim = 'AugroupHotfix'
Note that the hotfix function is general and can be used for any filetype with g:matchup_hotfix_{&filetype}
.
from vim-matchup.
Related Issues (20)
- .njk (Nunjucks) support? HOT 1
- goto/jump/label support HOT 1
- Freeze in large C file with treesitter HOT 6
- Feature: Option to set motion timeouts HOT 5
- [Feature Request]: Hybrid winbar/statusline option for offscreen matches HOT 11
- Treesitter integration broken on Javascript HOT 26
- Matchup error with treesitter in javascript files HOT 1
- Latest tree-sitter-c parser breaks vim-matchup HOT 1
- Add support for statuscolumn and foldcolumn in offscreen matches
- Error since last update → If treesitter matchup is enabled HOT 2
- Feature request: disable closing hint HOT 3
- offscreen doesn't display
- Wrong matching across strings HOT 2
- Crash when shell case is incomplete
- Matchup adding random characters on the beginning of the buffer. HOT 8
- clarification about lazy loading on keys HOT 6
- Incompatibility with nvim-cmp snippet completion HOT 8
- Matching string and char delimeters HOT 2
- how to activate ruby's `|` delimeter for block arguments HOT 4
- MatchParen(Cur) Highlight persists in virtual fold text
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-matchup.