What does Ctrl-Backslash

Copy / paste Vimperator


I'm trying out Vimperator. I wanted it mainly for hjkl scrolling, and I like its "hint" system for following links. Those two functions are really all I need; I believe.

The other functions don't bother me, they just get in my way sometimes.

What annoys me the most is the copy / paste. I'm used to + / +, I don't mind using a different shortcut, but ..

indicates that the selected text is copied with Y, but the only method mentioned for pasting is the middle mouse button!

This is so ridiculous against the spirit of Vim!

How can I insert Vimperator without using the mouse?


Reply:


The best and easiest thing to do is to remap the buttons. It is not difficult. Paste this into your _vimperatorrc (or .vimperatorrc in Linux)

is assigned to the "Next" mode by default. This means that the next pressed button will be sent directly to Firefox without being processed and eaten by vimperator. The above assignments simply activate the "Next" mode and send the corresponding link.

There's even a Vimperator plugin that extends this plugin and remaps all common Windows shortcuts to make them behave as expected.






I am surprised that no more specific answer has been given to this question. The plugin link of the chosen answer solved the problem of the OP, but no one explained how to paste something into a text box without using the passthrough mode (Cv).

If you are in INSERT mode in a text field and want to insert something, the obvious thing to do in vi-land is to press ESC and p to insert. In vimperator this doesn't work - ESC completely exits INSERT mode and switches to the mode in which you are working with the page / tab overall.

Vimperator solves this problem with an additional BASIC mode TEXTAREA. In TEXTAREA mode, you can use the supported commands that you would use in vi.

Etc.

This doesn't seem to be well documented - I ended up finding it out mostly by mistake. This also works in multi-line and single-line text fields.




At the moment vimperator is remapping both Ctrl + C (from "Copy" to "Cancel") and Ctrl + V (from "Paste" to "Forward"). On Linux, middle mouse button copy / paste is the preferred method, so this is not a problem. On Windows, this is a UI disaster and needs to be addressed urgently.

You can copy in three places: text from a web page, text from a form field, and text from an external application. You can copy in two places: into a form field and into an external application. The address and command bars work like form fields.

Normal users will not remember this table. They'll never find out because it's not explicitly documented and they wouldn't read it even if they did. Instead, they use the right-click menu, the only thing that works everywhere. In fact, a few weeks after I started using Vimperator, I caught myself doing exactly what I had never done before, in a completely standalone application.

We need to reset ^ C and ^ V to their original, legitimate functions as copy and paste, which means that the keyboard shortcuts ^ C = Cancel and ^ V = Pass through need to be replaced. In fact, these two hotkeys are only available for vimperator and will not appear in vim. ^ V means 'block visualization' in vim, which is not the case in vimperator, so the forwarding can easily be assigned to a different key. I recommend a backslash in command mode and Ctrl + backslash in both command and insert mode. That leaves ^ C. I think that should be moved to ^ S. This has two good mnemonics: it's 'stop' and it's also the Unix hotkey for XOFF, which is useless but semantically similar. ^ S is currently in vimperator "save page as", which is rarely used and can still be called with: save or: saveas.

Undo is broken too; It was ^ Z, but ^ Z is not a pass-through mode and there is no way to undo changes in a form field without using the mouse. I don't see any reason not to move this to another hotkey, especially since ^ Z in vim means suspend which is completely independent and unexpectedly in pass-through mode is extremely disoriented. I can't think of a non-arbitrary hotkey I could change this to, but ^ Z was pretty arbitrary at first, so any unused hotkey will do.

Soruce: http://www.mozdev.org/pipermail/vimperator/2008-October/002359.html


I've been looking for a way to do this for a while. Nice. But user4126's noremap solution wasn't entirely perfect when I wanted to paste into the command line or into a text field, as Joe points out. So I optimized it with inoremap and cnoremap at http://charlieharvey.org.uk/page/vimperator_cut_and_paste. It doesn't look like vnoremap is supported.

So you can paste into the command line and into text boxes by using the Ctrl-V keyboard shortcut just once. Paste the following into your .vimperatorrc and restart Firefox.


I didn't find the answers given useful as I can't see + anywhere. I am using the SecureCRT shortcut. That is, to copy from the page:

+

To insert: + twice (as someone says elsewhere in the answers).



If you'd rather have a mouseless experience than a full-fledged experience, try the following:



For a quick answer - ^ V ^ V (i.e. Ctrl-V Ctrl-V)

The first Ctrl-V key executes the "next key press". The second Ctrl-V key inserts the text. I do that for most of the text fields.

If you are using vi mode for multiline text fields (set noinsertmode), you can also use p. So if I want to put another tab's url in that tag, I can switch to that tab, use y, and then switch back to that tab. It says TEXTAREA on the bottom bar of the browser and I can press p to paste the url.


I would suggest using that

Because if you have an external text editor open, a simple Cc at FF window will exit the external editor and you will lose everything.

BR

We use cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By continuing, you consent to our use of cookies and other tracking technologies and affirm you're at least 16 years old or have consent from a parent or guardian.

You can read details in our Cookie policy and Privacy policy.