Comments (9)
There's probably some way around it but it's super tricky, probably. Someone will need to investigate.
from vimperator-labs.
This also applies to the new GitHub editor which will insert __
. How about an additional, secondary keybinding that is unlikely to be used by sites?
from vimperator-labs.
Heh, interesting. This isn't an issue on OSX because the shortcut is still <C-i>
for the editor but github uses <Command-i>
for the markdown insertion.
I'm not against adding another key combo, the question is whether something is available? I wouldn't want to just keep adding combos in insert mode.
You can also create your own mapping for it:
inoremap <C-g> <C-i>
from vimperator-labs.
While there is no guarantee, I assume it is rare that both <C-i>
and <C-S-i>
are bound in a text field.
inoremap <C-S-i> <C-i>
And to be consistent:
inoremap <C-S-t> <C-t>
At least these are easy to remember and might have a higher chance to work compared to a second binding like <C-g>
.
from vimperator-labs.
Using inoremap <C-S-i> <C-i>
is not a complete work around, as using the remapped shortcut to open the external editor interfere with other shortcuts, e.g.:
- click on text field
- press
<C-S-i>
: external editor appears - give focus back to the browser, unfocus the text field with
<Esc>
and press<:>
to open the command line: nothing happens - close the external editor: now Vimperator is in command line mode
Note: using @blueyed editor configuration with an additional shortcut to work around those sites that use <C-i>
does work fine however.
from vimperator-labs.
@benoit-pierre
So the key is to use another mapping (<F4>
in my case), right? (https://github.com/blueyed/dotfiles/blob/f4634c1371e3e7553509e0632fe65a6ddd6758ff/vimperatorrc#L309)
(I mean: you do not have to use the whole advanced function.)
(I might have misunderstood that part)
from vimperator-labs.
In my case, <C-S-i>
interferes with closing the dev tools. Instead of closing them, I sometimes end up editing a CSS property in gVim externally.
A second default shortcut for sites that intercept <C-i>
should be:
- cross-platform,
- unused,
- convenient (function keys are far away from the home row and might require pressing the
Fn
key), - easy to remember.
How about <C-S-e
for “edit” or “external”?
from vimperator-labs.
My problem is not about the choice of alternate shortcut, but how mapping this alternate shortcut using inoremap <C-S-i> <C-i>
result in a different behavior when using it. Using
js mappings.addUserMap([modes.INSERT], ["<C-S-i>"], "Launch the external editor.", function() { editor.editFieldExternally(); })
to setup the alternate mapping does however work fine.
from vimperator-labs.
I've found that the following Greasemonkey script, which I based on this, successfully undoes site-specific bindings of C-i
, allowing Vimperator's C-i
to work as normal. Add @include
lines to taste. Also, there may be a way to implement this in one's .vimperatorrc
rather than Greasemonkey.
// ==UserScript==
// @name Disable site keyboard shortcuts
// @description Stop websites from hijacking keyboard shortcuts
// @version 1
//
// @run-at document-start
// @include https://github.com/*
// @include https://www.gamefaqs.com/boards/*
// @include /^https://[a-z0-9]+.stackexchange.com/
// @grant none
// ==/UserScript==
keycodes = [73]; // Keycode for 'i'
(window.opera ? document.body : document).addEventListener('keydown',
function(e)
{if (keycodes.indexOf(e.keyCode) != -1 && e.ctrlKey)
{e.cancelBubble = true;
e.stopImmediatePropagation();}
return false;},
!window.opera);
from vimperator-labs.
Related Issues (20)
- Favicon (site icons in search) are not resized correctly HOT 4
- Hide scrollbars stopped working on Firefox 56 HOT 1
- styles.removeSheet not working
- Bookmark indicator not updated automatically HOT 1
- Can't change colourscheme, firefox error returned HOT 1
- vim vixen is good for ff-57+ HOT 4
- Can I emulate the action of clicking on the icon for "Add-ons"? Or, say, to have an extension run through a shortcut? HOT 1
- Support for basilisk browser HOT 3
- hlsearch documentation has incorrect default and should be updated
- Muttator Edit message Insert-Link via "Ctrl-K" is broken HOT 2
- Muttator on Thunderbird 52.5.2 broken? HOT 2
- Surfingkeys- a remarkable vimperator alternative for firefox 57+
- Compatibility issue with Waterfox 56.0.4 HOT 13
- open popup renders wrong HOT 3
- Muttator does not work in thunderbird-54.0a1.en-US.win64 HOT 4
- FF 60 HOT 3
- the Native / vim window does not follow UI scaling on Gnome3 HOT 1
- Can we config to make the hint stand behind the link?
- Vimperator is not dead : use the browser Waterfox-classic HOT 12
- Some issues on PaleMoon 28.6 HOT 9
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 vimperator-labs.