En/Je/On 2013-04-25 11:27, Hannes Schüller escribió / skribis / wrote :
> > It would be nice to use any (ASCII?) letter as quickmark
>
> I fear you're underestimating the necessary changes for this; the
> current quickmark is not that flexible. Check out keymap.h
I had searched main.c for the quickmarks functions, just to get a little
idea how the thing works, but of course you're right, I see it's not so
simple.
Anyway, keep the idea for the future; alphanumeric quickmarks would be
more ergonomic.
> The whole thing about other parameters, I'm not sure what we'd need
> them for. Could you sketch some basic scenarios when they would prove
> useful?
I've never needed more than one parameter with Elinks' shortcuts, but I
think the feature is useful in certain cases. Examples:
shortcut arlbn http://areallylongblogname.com/%0/%1/
Then you can access any year and month of the blog archives:
:open arlbn 2013 07
:open arlbn 2009 01
Or say a multilingual dictionary, where the searched language is a
subdomain or a directory. Then you can use two parameters as well: the
language and the term:
shortcut adic http://%0.anydictionary.com/?term=%1
:open adic en englisword
:open adic eo esperantoword
Or say a library with several sections:
shortcut lib http://mylibrary.com/?section=%0&subsection?=%1&lang=%2
:open lib history europe french
But probably in most cases one single parameter can be used instead
without drawback:
shortcut arlbn http://areallylongblogname.com/%0/
:open arlbn 2013/07
:open arlbn 2009/01
shortcut adicen http://en.anydictionary.com/?term=%0
shortcut adiceo http://eo.anydictionary.com/?term=%0
:open adicen englisword
:open adiceo esperantoword
(I have not used %s as first parameter in the examples because %0..%9
seems a better option.)
I think one optional parameter is enough in most cases; and it's easier
to implement. More parameters could be implemented later, if they are
found useful enough.
Marcos
--
http://programandala.net
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Vimprobable-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vimprobable-users