guillermooo / Vintageous

Vi/Vim emulation for Sublime Text 3
http://guillermooo.bitbucket.org/Vintageous/
Other
1.64k stars 115 forks source link

How to disable in specific Views #820

Open lmartins opened 9 years ago

lmartins commented 9 years ago

While i've seen an article about this situation in the Wiki, still can't figure out how I can have Vintageous automatically disabled in views from SublimeGit or Sublime File Browser.

Can you give some guidance please?

guillermooo commented 9 years ago

Vintageous need cooperation from the other plugin so that the described feature works. However, I don't use it and it's never been tested, so I don't know whether it works. Unfortunately, I've never needed it, so I'm not likely to spend time on it any time soon.

vovkkk commented 9 years ago

What kind of cooperation you @guillermooo talking about? Wouldn’t it be easy just check

if self.view.settings().get('vintageous_disable', False):
    return

So ppl could add "vintageous_disable": true into syntax-specific settings file(s).

I am collaborator in mentioned FileBrowser, btw, so feel free to talk to me about cooperation because I really don’t get what you meant, but mind you I know nothing about Vim and anything related to it.

guillermooo commented 9 years ago

Hi @vovkkk,

I think it works something like that, but it's been a long time, so I can't really remember.

Here's the relevant code:

https://github.com/guillermooo/Vintageous/blob/master/vi/utils.py#L45

I don't know if it works, though.

vovkkk commented 9 years ago

Aye, seems to work. Thank you @guillermooo

@altintx @andradei @lmartins add "__vi_external_disable": true into settings file, for FileBrowser it is PreferencesPackage SettingsFileBrowserSettings — User