:setglobal ignorecase?
:edit test.ada
:setglobal ignorecase?
Global ignorecase should be unaffected by opening the file.
9.1 With patches 1-16, 647, 678
Ubuntu, xterm, TERM=xterm-256color.
Don't believe this matters.
I think this is simply a misconfiguration in the `ada` ftplugin. Looks like the same problem is in the `hamster` ftplugin as well, while the `baan` ftplugin has a comment specifically about why it's not doing the same thing. vim [17:39:13] % grep -A8 "\*'ignorecase'" runtime/doc/options.txt *'ignorecase'* *'ic'* *'noignorecase'* *'noic'* 'ignorecase' 'ic' boolean (default off) global Ignore case in search patterns, |cmdline-completion|, when searching in the tags file, and non-|Vim9| |expr-==|. Also see 'smartcase' and 'tagcase'. Can be overruled by using "\c" or "\C" in the pattern, see |/ignorecase|. vim [17:39:18] % git grep -n 'setlocal.*ignorecase' runtime/ftplugin/ada.vim:52:setlocal ignorecase runtime/ftplugin/hamster.vim:60:setlocal ignorecase runtime/syntax/baan.vim:15:"setlocal ignorecase "This is not a local yet ;-( vim [17:39:28] %
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Seems both ada.vim and hamster.vim also do not correctly setup b:undo_ftplugin. we can ignore syntax/baan.vim as this one is commented out.
ping the maintainers: @dfishburn and @krischik
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Seems both ada.vim and hamster.vim also do not correctly setup b:undo_ftplugin
Both ignorecase and smartcase are global. ftplugin should not touch them in the first place.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Both ignorecase and smartcase are global. ftplugin should not touch them in the first place.
Yes thanks, I was just noting an additional problem here.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Are we talking about the current version (https://github.com/krischik/vim-ada) or the 15 year old version bundled with the vim?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
The one bundled with Vim. I am not sure why you created a PR against vim-scripts repository. That has nothing to do with our project and used to be just a scraper for the scripts distributed at www.vim.org/scripts
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Problem is that long ago I managed to get an updated accepted but that was a one off. So while I continued to work on the ada support I never managed to get another update through. So the one bundled with vim is outdated by 15 years.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
BTW it seems your current version has the same problem (setting ignorecase, which should be a user setting)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
How about to create a PR then here with your maintained version?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
BTW it seems your current version has the same problem (setting ignorecase, which should be a user setting)
But Ada is an ignore case language so that would be annoying for ada programmer. It would be helpful, especially for those who use multiple languages, if it was possible to set the ignore case depending on language.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Then it should be put behind a configuration switch
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
ignorecase is basically for command-line stuff/searching. This is why it is global. Programming language syntax is a different thing. It should never rely on ignorecase setting.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
ignorecaseis basically for command-line stuff/searching. This is why it is global. Programming language syntax is a different thing. It should never rely onignorecasesetting.
I found some time to look at it and this is problem “If the option does not have a local value the global value is set.”. Implicit operations like this are always bad. Of course when using setlocal I expected that only the current buffer is affected. I have a lot of setlocal in the ftplugin for Ada — how do I know which are actually local as desired and which I have to remove or make optional because they are secretly global?
Also, please print a waning for every setlocal which is actually global.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.![]()
@krischik "How do I know..." Read the help for each option you set. Caps on. Always read help. Caps off.
Vim never complains in runtime for setlocal/setglobal mismatched. It simply chooses "the lesser evil" silently.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
@krischik "How do I know..." Read the help for each option you set. Caps on. Always read help. Caps off.
I did read manual. I checked the ingnorecase option. I could not find it. If it's there it's well hidden. Well, figured it out anyway and I found three of setlocal which where setglobal in disguise. Fixed it.
However: I'm don't really want to send the fix upstream any more. I was unsure about this before because it would be quite a large pull request including the update to Ada 2022, the Alire package manager and a lot of other improvements from more helpful vim users. Only today I merged in 4 pull requests.
Preparing a pull request that size will be a lot of work and if you are that unhelpful and smug on a simple question I don't want to deal with you with pull request several hundred lines large.
Vim never complains in runtime for setlocal/setglobal mismatched. It simply chooses "the lesser evil" silently.
As mentioned: I consider that bad. I consider choosing silently a bad idea. Ada, for example, doesn't do that.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
You can see it here:
:h 'ignorecase'
Note it says global, while e.g. for buffer-local options, it say (example for 'fileencoding'):
https://github.com/vim/vim/blob/e15cbc1af47e9dea90448c714eb4908e5d4302fc/runtime/doc/options.txt#L3297
I can understand your frustration. I'd still suggest to prepare a PR which supports the minimum needed required to fix this issue and perhaps includes the Ada 2022 features? So that all Vim users benefit from it. And for a more feature-rich solution, people can continue to use your ada-script plugin?
Thanks,
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
Can someone explain to me how to make sure ada.vim never loads? In addition to this issue, this script defines insert mode bindings making vim unusable if your leader key is space. Author is very opinionated, against standards and is not willing to change any of that.
If it's not possible to prevent it from loading, I'm in great favor of stopping to ship it with vim. No one will complain. Users can still put it in their vimrc; how it should've been from the beginning.
See #1347.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
What mappings are those? If I read ftplugin/ada.vim correctly, it should those should only be set, when g:ada_extended_completion is set.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
fixed as of dfcd9ac
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()