Comments (5)
Thanks for the update. My setup if I have matchup installed is now:
" let g:matchup_matchparen_enabled = 1 "(default) enable on startup and disable it immediately again with autocmd VimeEnter * NoMatchParen
let g:matchup_matchparen_fallback = 0 " never use matchparen.vim
augroup vimenter
autocmd!
autocmd VimEnter * NoMatchParen
augroup END
nnoremap [op :DoMatchParen<CR>
nnoremap ]op :NoMatchParen<CR>
" commented matchparen.vim version:
" nnoremap cop :<C-R>=exists("g:loaded_matchparen") ? 'NoMatchParen' : 'DoMatchParen'<CR><CR>
nnoremap cop :<C-R>=exists("g:matchup_matchparen_enabled") ? ( (g:matchup_matchparen_enabled == 1) ? 'NoMatchParen': 'DoMatchParen'): 'DoMatchParen'<CR><CR>
It does what I wanted.
I just want to say that moving by keeping hjkl pressed with matchup enabled is really slow, not better than the original matchparen.vim
from vim-matchup.
Are you requesting that commands DoMatchParen
and NoMatchParen
to affect match-up, or are you requesting similar commands, for example, DoMatchupMatchParen
or NoMatchupMatchParen
?
Do you know you can freely toggle highlighting globally with g:matchup_matchparen_enabled = 0
and per buffer as let b:matchup_matchparen_enabled=0
and let b:matchup_matchparen_fallback=0
? But I am willing to add shortcut commands; should be an easy change.
BTW, are you aware of the pull request..
Funny! I was not aware but I actually already implemented something similar. I have been waiting on releasing it for a few reasons. 1) I find the slight delay annoying personally, and match-up hasn't been too slow for me to warrant it. 2) It adds another option which I don't want to make the default but then people won't be aware of it. 3) has('timers')
is pretty new. Tracking progress here: #6.
from vim-matchup.
Do you know you can freely toggle highlighting globally with g:matchup_matchparen_enabled = 0 and per buffer as let b:matchup_matchparen_enabled=0 and let b:matchup_matchparen_fallback=0?
I am not sure that changing the value of the variable enables dynamically matchup_matchparen.
I mean I have added to my vimrc let g:matchup_matchparen_enabled = 0
so matchup is disabled on startup. However, I want to enable it with cop
and switch it off again with cop
.
Following toggles the value of the variable but does not enable or disable matchup_matchparen:
vimrc
...
let g:matchup_matchparen_enabled = 0
nnoremap cop :<C-R>=exists("g:matchup_matchparen_enabled") ? (g:matchup_matchparen_enabled == 1? 'let g:matchup_matchparen_enabled = 0': 'let g:matchup_matchparen_enabled = 1'): 'let g:matchup_matchparen_enabled = 0'<CR><CR>
...
from vim-matchup.
Ah, I see the issue with g:matchup_matchparen_enabled
now.
I've added DoMatchParen and NoMatchParen which should do what you want.
from vim-matchup.
with matchup enabled is really slow, not better than the original matchparen.vim
match-up is necessarily going to be slower at highlighting than matchparen since it's looking for many more things. However, I am happy to try to improve the performance as much as possible. What language(s) do you see the slowdown with?
Would you be willing to try out the feature-deferred branch, which enables lazy/deferred/delayed highlighting? If so, you can do let g:matchup_matchparen_deferred = 1
with that branch. Also note that the times in milliseconds are configurable but you must reload for the new values to take effect. Feel free to report comments at #6.
from vim-matchup.
Related Issues (20)
- Matchup treesitter support doesn't work in certain Sublanguage situations HOT 2
- Options fail to work, like g:matchup_enabled and others HOT 2
- vim.treesitter.query.get_query is deprecated HOT 2
- Improper output for MatchupWhereAmI HOT 1
- Off screen match displaying as popup causes error in Neovim HOT 2
- performance problems in Go code with large number of tree-sitter grammars installed HOT 9
- No virtual text with Python HOT 2
- The plugin doesn't match Ruby's method rescue/ensure keywords HOT 4
- Tree-sitter quotes tracking HOT 7
- How to jump to end of python if else block? HOT 1
- Completely breaks in my Ubuntu 22.04 in WSL2 HOT 12
- matchup broke after treesitter update HOT 9
- FR: Optional Highlight the position `%` would jump to HOT 1
- .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
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.