Comments (12)
@adamryman 's hack is really helpful.
If somebody doesn't want to modify your local vimperator, add the following code hook in .vimperatorrc file.
" To Enable map <Space>
js <<EOM
window.addEventListener('keypress',function (event) {
var code=event.charCode;
if ((liberator.mode === modes.INSERT && modes.extended === modes.MENU)
||(liberator.mode ==modes.NORMAL && code==32)
||(liberator.mode ==modes.COMMAND_LINE && code !=32)){
let map = mappings.get(liberator.mode, events.toString(event));
if (map) {
event.preventDefault();
event.stopPropagation();
map.execute();
}
}
},false);
EOM
" My Customization
map <Space> <Leader>
from vimperator-labs.
That is interesting, those do not work for me either.
I realize now that I use leaders in a very nonstandard way. In vim, I leave let mapleader="\"
by default and then I map <Space> <Leader>
because this allows me to see a \
with set showcmd
when I press space, rather than just seeing a space (i.e. nothing).
I did the same in vimperator without realizing it. But it does work if you want this functionality.
So follow my instructions and to use space as a leader key do the following
:let mapleader="\"
:map <space> <leader>
" And as an example, feel free to try something else
:map <leader>j :echo "Hello, World; Leader is now Space"<Return>
Then try pressing <space>j
and seeing if it worked.
Let me know if this is functionality you wanted. It works for everything I wanted it to.
from vimperator-labs.
I modified one line in my local zipped copy of vimperator and I seem to have the functionality I want.
https://github.com/vimperator/vimperator-labs/blob/master/vimperator/content/config.js#L305
"<Space>": modes.NORMAL | modes.INSERT,
To
"<Space>": modes.INSERT,
And now I can map leader to Space.
If anyone else wants to do this just navigate to your firefox profile/extensions (i.e. ~/.mozilla/firefox/$YOURPROFILE.default/extensions
) and edit your vimperator zip. (vim can do this if you have zip
and unzip
installed)
Then modify content/config.js
as I did, save, quit, and restart firefox. Bam, you can map space.
What problems may I have by doing this? If I do run into any, I will post them here.
from vimperator-labs.
Space (and a few other keys like Enter) unfortunately has some places where
it is hard coded, so I agree with you about the bug, but there is nothing
simple we can fix that without testing it properly for accessibility.
On Sun, Jul 20, 2014 at 6:52 PM, pevu [email protected] wrote:
This doesn't work:
noremap f
This does:
noremap F
They both show up as mapped keys, meaning I can :unmap afterwards,
but the issue remains.Space is a very conveniently placed key for just about everything, would
be a shame to give it up to scrolling. And the default F is not in a
convenient location for me (using Dvorak).(Firefox 30, Windows 8.1 x64)
—
Reply to this email directly or view it on GitHub
#10.
from vimperator-labs.
This has been frustrating me in Muttator as well; I use Space in Vim to toggle folds, and I'd expect Enter to open the currently-selected email; however, with the following key mappings, neither key has any effect:
nnoremap <Space> za
nnoremap <CR> M
from vimperator-labs.
I've been trying out vimperator and this issue isn't letting me pass space through to videos, is there a way that we can make space pass through to the webpage (but not remapping it, as per this issue), so that we can play/pause videos and other things? Firefox handles scrolling too in this case.
from vimperator-labs.
Is there a good way for me to find all the places where Space is hard coded? I would like a make a fork where space can be mapped. I use space for leader in vim and I would really love the same in vimperator.
from vimperator-labs.
@adamryman no repro here. Perhaps one of us is missing something necessary?
I made the change you described to content/config.js, updated my .vimperatorrc
leader mapping aslet mapleader="<space>"
, and restarted Firefox. I also tried let mapleader="\<space>"
, in case Vimperator carries over Vim's syntax here. Neither way caused my <leader>
mappings to work with space -- hitting space just paged down in FF (39.0).
from vimperator-labs.
@adamryman Brilliant! That does it. It's a complete hack, but it does the job for now. The mental switching of <leader>
between Vim and Vimperator has been a major pain; I haven't created any <leader>
bindings that I actually use in Vimperator as a result. Thanks.
from vimperator-labs.
@jwhitley Glad it worked for you! As far as the mental switch between <leader>
in vim and vimperator, I agree completely. I did not create any <leader>
bindings until now either.
Very happy that my little hack helped someone else out.
If anyone wants to know how I did this, I just searched the codebase for "<space>
" and "<Space>
" and changed the only line that seemed to be related.
@jwhitley if you come across any weird issues that are related to this, please post them here. Also I will be studying your .vimrc
, I see you have nice fugitive leader bindings that I may borrow haha.
from vimperator-labs.
I'm used to map my Key to / for searching. Using the tip from @adamryman worked like a charm.
from vimperator-labs.
Brilliant work: @adamryman @fx-kirin .
@fx-kirin I'm using your patch in my .vimperatorrc at it works a treat. Thank you.
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.