Skip to content
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

Add the ability to temporarily toggle vimium on/off for a page #428

Closed
jwmann opened this issue Dec 30, 2011 · 29 comments
Closed

Add the ability to temporarily toggle vimium on/off for a page #428

jwmann opened this issue Dec 30, 2011 · 29 comments

Comments

@jwmann
Copy link

jwmann commented Dec 30, 2011

It would be nice if I could do a key combination that would disable vimium on the current page temporarily; furthermore it would be nice to have an editable list of domains in the settings that vimium would not run on.

@philc
Copy link
Owner

philc commented Dec 31, 2011

There is already an editable list of domains in the settings that vimium does not run on.

Regarding temporarily disabling vimium, does typing "i" (insert mode) fit the bill?

@DeadDork
Copy link

@philc I dig your suggestion. It doesn't happen often, but I'll sometimes find myself on a site that has its own keyboard navigation, and it always goes splat with vimium. Yes, the simple solution is to add an exception, but that's a disruption to the browsing experience (and oh so much commitment from a site I'll only visit once).

I tested it out, and Insert mode definitely does the job on super AJAXed sites like GMail. Thanks!

@dankessler
Copy link

@DeadDork do you find that GMail sometimes causes Vimium to leave insert mode? For example, suppose you have two chat windows open.

Hit "i" to enter insert mode
Enter C-. (GMail shortcut to focus on next window, in this case chat 1)
Enter C-. (focus chat 2)

At this point for me, Insert mode is no longer invoked. Any ideas why this is happening?

Is GMail's change focus field somehow triggering an "escape" like event that's canceling insert mode?

Similarly, most times (but not always) hitting "/" to jump to the GMail search bar while in insert mode will pull me out of insert mode.

@philc I'd love it if in addition to insert mode we there was another mappable keystroke (probably a pretty fancy chord) that would toggle vimium to off, and stay off, until it was toggled back on. That would let me use escapes and things like that in GMail without vimium sometimes canceling insert mode. This seems similar to #186

@beatgammit
Copy link

The insert-mode workaround works, but it would be very nice to have a disable feature. Vimperator on Firefox uses Shift+Esc, which is super convenient for sites like Google docs. Shift+Esc toggles Vimperator on and off, and this would be great for Vimium, especially for sites that use Esc as a hotkey (HTML5 games and whatnot).

@dankessler
Copy link

@beatgammit that seems like a pretty nice feature. I wonder how much code you'd have to refactor though...

@beatgammit
Copy link

@dankessler I'm not familiar with the vimium code-base, so I have no idea. It should just be as easy as:

if (shift && escape) enabled = !enabled;
if (!enabled) return;

I'm also not familiar with Chromium extensions, so it could be more complicated than this...

@OrangeTux
Copy link

I took a look in the code and I found an isEnabled flag. I'll try to implement the feature when I've time and nobody else implemented it.

@ramiroaraujo
Copy link
Contributor

Just landed a PL with this functionality: #959
Hope you like it!

@tylercollier
Copy link

+1

@philc philc changed the title The ability to temporarily disable vimium + more Add the ability to temporarily toggle vimium on/off for a page Aug 21, 2014
@philc
Copy link
Owner

philc commented Aug 21, 2014

I reading through the various duplicate issues, one of the main use cases seems to be using this on Gmail. We're going to ship #491 soon; would that alleviate the need for this global toggle, or is the toggle still important even with site-specific mappings?

@beatgammit
Copy link

@philc

It's not just sites like gmail though. I am interested in writing WebGL games, so I play a lot of demos. These demos are frequently on sites that I'll only visit once, so excluding these sites manually is tedious and not exactly what I want to do. Temporarily disabling, however, would solve the problem quite nicely.

Aside from games, sites are getting more complex. I work on an HTML5 app (complete with shortcuts) on an embedded platform, so I frequently need to access the same app on different IP addresses. Just like the game thing, adding exceptions for each of these IP addresses takes far too much effort, and I usually try to just hobble through by going into insert mode (which isn't a real solution).

@idf
Copy link

idf commented Apr 28, 2015

@philc
Same issue on google doc.

@tmlangley
Copy link

It's certainly not just gmail. Any website has the ability to bind custom shortcuts. Additionally, other Chrome plugins have the ability to map any of these keys. For example, the Vimsert plugin, allows you to open a vim editor within any text area. This does not work with Vimium because both bind to the same keys. I can't imagine a user disabling Vimium for each site that might have a form they could fill out, but I could see a user simply hitting shift + escape and disabling Vimium before using Vimsert. This might seem like an unlikely scenario, but in my opinion it seems likely that Vimium users might have other plugins that provide greater "vim-like" functionality and and would run into these types of conflicts.

This is just one example, but I'm sure there are many others. The bottom line is that I don't think it makes sense to assume the user will have the foresight to know when Vimium will conflict with a site or plugin.

@smblott-github
Copy link
Collaborator

@tandroid1. Perhaps check here?

Edit: Ah, ok. I took a look at vimsert. Your problem is with Escape, yes?

@tmlangley
Copy link

@smblott-github Yes, the escape key is one of the issues, but since it uses the ace vim editor, I would imagine most key bindings would conflict.

@mrmr1993
Copy link
Contributor

mrmr1993 commented Jun 8, 2015

@tandroid1 the extension you linked looks like it uses a <textarea>, and so we automatically enter insert mode when it is focused. The only binding in insert more is <esc>/<c-[>, so this should be the only (but significant) clash.

@drwl
Copy link

drwl commented Aug 16, 2015

@philc @idf Even though google docs is an excluded page:
https?://docs.google.com/* with * keys excluded, escape still does not work as intended. This behavior resumes back to normal when vimium is disabled.

@smblott-github
Copy link
Collaborator

@drwl. To completely disable Vimium, you should leave the "Keys" empty. Could that be your problem? If not, perhaps open a new issue and explain what you expect to happen and what actually happens.

@drwl
Copy link

drwl commented Aug 16, 2015

@smblott-github It's interesting behavior to exclude * (all keys) versus leaving it blank that disables Vimium on a page. Nonetheless leaving it blank works!

@smblott-github
Copy link
Collaborator

Great, @drwl.

We should probably close this issue.
It covers a variety of features and issues which have been implemented since the tread began.
If there are specific issues with specific features, open a new issue.

@idf
Copy link

idf commented Aug 16, 2015

Thank @drwl @smblott-github for the fix.

When will there be a new vimium release for this fix?

@drwl
Copy link

drwl commented Aug 18, 2015

@idf If you want to turn off Vimium for Google docs, just leave the exclude keys field blank.

screen shot 2015-08-18 at 4 04 00 pm

Otherwise are you asking about something else?

@idf
Copy link

idf commented Aug 20, 2015

@drwl is there a key combination to toggle vimium rather than disable it by URL entirely. I have tried ESC, it works in Google spreadsheet but not in google word.

@es6Test
Copy link

es6Test commented Mar 2, 2016

Even if its disabled the css and js for vimium is spamming my network tab in dev tools.

@smblott-github
Copy link
Collaborator

Even if its disabled the css and js for vimium is spamming my network tab in dev tools.

@philc has raised this previously... #1838.

@es6Test
Copy link

es6Test commented Mar 2, 2016

ah, ok thanks!

@masaeedu
Copy link

@smblott-github As far as I can see the original feature requested is still not available. It isn't possible to enable vimium on a page where it is currently disabled without reloading the page. Being able to toggle it by clicking on the vimium extension icon would be useful.

@stevesan
Copy link

Another +1 for this. I just uninstalled vimium again because of this issue... insert mode works ok, but it shows the "insert mode" toast. Also, very annoying when making my own webGL games. A simple global temporary-disable would make me happy (effectively a quicker uninstall/reinstall I guess, keeping settings)! I'm gonna try the exclude trick I guess..but it's pretty heavy-weight for a common use case.

@nicoandmee
Copy link

+1 for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests