Code Monkey home page Code Monkey logo

Comments (3)

andymass avatar andymass commented on May 30, 2024

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.

kiryph avatar kiryph commented on May 30, 2024

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:
untitled

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.

andymass avatar andymass commented on May 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.