Hi Daniel, Thanks for your input so far. I know how to trigger the input mode (gi) but I still cannot fathom how to make an imap mapping work.
Specifically, these two statements look at odds: > the :imap mappings work only if you do not keep in input mode > The imap action are always applied if vimb is in -- INPUT -- mode Could you provide an example and/or step-by-step instructions to have an action triggered through imap? Thank you for your work. Best, R. On 20/01/2015 9:32 p.m., Daniel Carl wrote: > roboh...@anche.no <roboh...@anche.no> wrote: >> So I am trying to have vimb hash passwords with pwdhash.rb. I do not know if >> vimb makes it possible to inject a string in a field but I am ok with >> pasting for now. In the future maybe I will try to understand how the >> formfiller works and autopaste. So I have tried: > > The formfiller example scripts do only work if vimb is compiles with SOCKET > feature and the instance ist started with the --socket/-s option. Maybe I > missed that to mention. > The formfiller consists of two parts, a shell script that takes the current > URI and looks up passwordfiles in the $VIMB_KEY_DIR. And if there are multiple > marching found display dmenu to select them and if selected or there was only > one file, the file contents is read. > If the file is a gpg encrypted file the data are decrypted first. Maybe this > fails for you, because this requires the have the gpg-agent running that has > the key already used or added (because there is no way to enter the password > to open the gpg key). > The data found are then put via socket to the calling vimb instance and call a > JavaScript to insert them into the form. > >> imap @@ :shellcmd urxvt -e 'pwdhash $VIMB_URI | xsel -b'<CR> >> >> This incurs in two problems. First, vimb does not like the pipe for some >> reason and greets me wit an "Unknown command: xsel" at startup. This is >> annoying but a small script packaging the two commands does the job. This >> leaves me with: >> imap @@ :shellcmd urxvt -e pwd2xsel.sh $VIMB_URI<CR> >> >> >> So here are my questions: >> 1) Why does vimb not allow pipes with :shellcmd? > > I thought I've fixed this in > https://github.com/fanglingsu/vimb/commit/680684ecad219c5e72c7bef12f5c2e60cf6be2cf. > But I'll check it if I have some time. > >> The second problem is that I do not understand how imap works. Is the {lhs} >> (i.e. "@@" ) supposed to go in the text area? Because this does nothing. If >> I turn it into a nmap, it works, but annoyingly enough, I have to go from >> input to normal mode and then switch back again to input mode to paste the >> password. >> 2) How to trigger an imap action? > > I must admit that, this is not easy to understand nor to describe. I have no > idea how to make this working like everybody expects it. At the moment the > :imap mappings work only if you do not keep in input mode. The challenge is > not the mapping, but the input modes key handling. > The imap action are always applied if vimb is in -- INPUT -- mode. This is > shown in the inputbox or if :set input-autohide=on is set on the left of the > statusbar. > ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ vimb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vimb-users