-
Notifications
You must be signed in to change notification settings - Fork 970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'%' not working #271
Comments
Hey @davidmaxwaterman, I never new about the match-pairs.mov |
Here are the versions I tried it on. maximum-awesome on master
❯ vi -version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep 30 2022 03:10:57)
Garbage after option argument: "-version"
More info with: "vim -h" maximum-awesome on master
❯ vim -version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Mar 8 2021 07:21:32)
Garbage after option argument: "-version"
More info with: "vim -h" |
Ah, so it is supposed to work...that's good to know at least. You video, I think, shows it working, as you say. I normally use % to jump between the beginning/end of blocks in code, so I had to try it on function params too...and it doesn't work. So, I'm wondering how to debug this further. One thing I noticed with your video is that it appear to be the terminal version rather than the GUI version....and, indeed, if I just invoke using
and try to jump between those two...it doesn't work. [EDIT - I should add that this test also applies in the terminal, so totally nothing to do with vim/mvim] So, something to do with javascript files? What to try next? [EDIT] I added a video of my own, showing it working in tmp.txt but not tmp.js |
I had a suggestion from:
Another observation that came out of that experiment is that the '%' key does actually work the very first time...but not subsequent times. I wonder if there's any way I can further investigate this issue to move towards a fix. Suggestions welcome. |
Any more thoughts on this? I find that ']}' and '[{' are good enough, but I do miss '%'. |
Unfortunately, I don't know what's causing it, nor can I reproduce it. |
Oh, I didn't realise that. You mean % works for you even on a js file? |
Ah, sorry I missed that. 🤦🏼 I'm wondering if there's something wrong with JSHint. I went to open React's dangerfile.js as an example, and I got this error.
Look like commenting out diff --git a/vimrc.bundles b/vimrc.bundles
index 104b587..f2eb343 100644
--- a/vimrc.bundles
+++ b/vimrc.bundles
@@ -19,7 +19,7 @@ Plugin 'tomtom/tlib_vim'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'nono/vim-handlebars'
Plugin 'pangloss/vim-javascript'
-Plugin 'wookiehangover/jshint.vim'
+" Plugin 'wookiehangover/jshint.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'scrooloose/syntastic'
Plugin 'slim-template/vim-slim' With that I can now use |
Oddly enough, in my ~/.vimrc.bundles file, that line is already commented out....as is the syntastic line. I was curious how you managed to get that error output. I tried running Any thoughts? |
Any more thoughts on this? |
Unfortunately, I don't. I tried debugging this earlier and ran out of patience with it. Because it seems minor (to me), I haven't been able to push myself to work on this in my free time. I know this isn't the answer you're hoping for, but I wanted to give you an update. |
LOL, indeed, fair enough. |
I have ~recently switched to Mac from Linux and was looking for a config that 'just works' and so I picked this setup.
After having used it for some time, I'm finding that the '%' key doesn't work...it's supposed to do 'matchpairs' - ie if it is on a '[' it should jump to the matching ']'.
If I 'set matchpairs' is shows
matchpairs=(:),{:},[:]
which looks correct.Am I missing something special in maximum-awesome that means '%' isn't the same as regular vi?
The text was updated successfully, but these errors were encountered: