Hi! Leonardo Taccari <iaml...@gmail.com> wrote: > Hello Daniel and all! > > Thank you for this new release... I hope to use the new keybinding > features soon. > However, it seems that a lot of commands are removed in this release. > Why that? Is it done in order to just reduce SLOCs?
Oh I didn't mention that. In the last releases vimb used commands for every possible action to perform independent from the current mode. Now, with the change keybinding stuff, it's no required to have ex-commands (so called in vim) for all actions. The possible action are still available in vimb 2.0. But now we distinguish between normal mode commands that are more like keybindings and the ex-commands that can be called from inputbox. > I think that this discourage the use of custom keybindings... For > example previously if I had in my .config/vimb/config: > > nmap b back > nmap B forward These are axamples of those commands that exists only in normal mode. To map them you could use something like (<C-O> and <C-I> are vimb normal mode commands and are known from vim). nmap b <C-O> nmap B <C-I> > now (and in my case that does not work too): > > nmap b normal! <Up> > nmap b normal! <Down> The 'normal' command is an ex-command and should be written with ':' in the binding. nmap :normal! ... But this isn't necessary, the 'normal' commands is only a way to call normal mode commands from none normal modes. For example if multiple ex-commands are chained together ':set scripts=on|normal! r'. I'm not sure what the intension of 'nmap b normal! <Up>' is, but if you want to scroll the page up, 'nmap b k' should to the thing. The <Up> and <Down> keys are handled from gtk or webkit and not from vimb. That means if you bind those keys to 'b' and press key, vimb translates the 'b' into <Up> and writes the <Up> into the internal key queue. But vimb does not know what <Up> means. And at the moment there exists no logic to convert such unknown commands into fake key event that are fired to force webkit or gtk to some actions. And I'm not sure if this is a useful thing to have or if this will be possible to implement in a clean way. > The 0.10.0 configuration file is readable while the 2.0 is not, IMO. Do you mean readable for humans or can vimb not read it? Yes, the keybindings aren't so verbose like before, but the vim users should be familiar with the most of the normal mode commands, all other commands (that vim does not know nor need) are similar to those used by pentadactyl. > And what happens if I would like to reassing <Up> and <Down> too? That's possible and you can do what you want with them. :nnoremap <Up> :o http://fanglingsu.github.io/vimb/<CR> :nmap <Down> :o !<Tab><Tab> Second example starts completion for bookmarked URI and selects the second item (I know, this isn't useful, it's only an example). > I prefer to have all commands that was present in the previous releases, > they make vimb usage simpler (...and if, for example, I forget the > keybinding I can always type ":back" or whatever!...). Hm, this could be a useful feature. I've seem it for pentadactyl that you can alias ex-commands and vim has also a way to define new ex-commands. But I've never seen the need for such a feature. I think you are faster if you learn the most common normal mode commands instead of waiting that the command alias feature will be implemented:) > It would be great to listen what the vimb community thinks about that. The community is only small, I'm interested in their opinion too. Daniel ------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk _______________________________________________ vimb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vimb-users