Loading ...
Sorry, an error occurred while loading the content.
 

Re: Vim php interface.

Expand Messages
  • François Pinard
    [Aaron Griffin] ... I m always striving for the feeling of freedom. One might be quite happy with an editor as Emacs, but I got to use for each and every
    Message 1 of 80 , Aug 1, 2005
      [Aaron Griffin]

      > On 8/1/05, Ligesh <gxlists@...> wrote:

      > > On the subject of vim being MERELY an editor: I think it is time
      > > that we stop this charade. Vim is too good, and it can do EVERYTHING

      > There are differing views here. Emacs is *made* to do everything
      > [...] it goes against the unix philosphy of "do one thing and do it
      > well".

      I'm always striving for the feeling of freedom. One might be quite
      happy with an editor as Emacs, but I got to use for each and every
      aspect of my work (organising email, doing statistical studies, handling
      my own schedule, etc.) to point I became overly dependent on it, and
      somehow disconnected from the rich diversity in the free software field.
      Breaking the link with Emacs had been a painful adventure, as there were
      so many aspects of it for which I needed simultaneous replacement.

      Now, I enjoy a much more modular set of tools, with Vim currently
      dedicated to editing tasks. I learned to much like Vim many virtues,
      and would undoubtedly be sad if I had no choice but give up on using it.
      Yet, choosing another editor would be much less painful, and this is
      comforting. It is even thinkable with Vim that I try another editor for
      a few weeks, for fun, without my computer world falling apart! :-)

      > The problem is, you're talking about rendering HTML. Now we get into
      > feature creep.

      In these days, I see myself suggesting various tricks and recipes! :-)
      Take it as an illustration that many other avenues are possible, not
      at all that my own ways are the necessary way to go. Of course...

      I use `openbox' for a window manager. Simple, fast, effective,
      unobtrusive, sober, but configurable, that's perfect for me. In my
      case, the Ctrl-Alt-Digit commands switch between ten desktops (and I
      even have strong habits about the purpose of each). Ctrl-Alt-7, in
      particular, brings me to Mozilla. I configured Ctrl-Alt-Letter keys so
      they all call the single Python script `openbox-helper', yet forwarding
      each letter as an option `-Letter'. So, I got 26 user commands to the
      window manager, easily callable with keys, that I may program in Python.
      Many of these commands use `xselection' (the tool) for recovering the
      primary selection, or use `xprompt' to get supplementary arguments.

      So, whenever I see an URL in a message, in Vim, or anywhere, which
      I want to see, I merely use the mouse for selecting that URL
      (double-clicking is often sufficient to get it without any dragging),
      then do either Ctrl-Alt-l (a small L) for launching `links -g' on it, or
      Ctrl-Alt-o (usually followed with Ctrl-Alt-7) for triggering the already
      running Mozilla to open a new Tab for this URL. I use `links -g' for
      quick, yet simpler rendering in the current desktop, or Mozilla for more
      complex things. For both these commands, if I mouse select a file name
      instead of an URL, my openbox-helper script builds a "file:/..." with
      the file name made absolute, so the mechanics work equally good for
      browsing local HTML, all rendered. (I have some trickery for knowing
      which is the current directory, to interpret relative file names).

      With a bit of imagination, and combining a few common tools, one can
      give oneself fairly effective and speedy environments. Many things
      could be done before it becomes necessary to bloat Vim.


      P.S. - Ctrl-Alt-v launches Vim on the mouse-selected file name. :-)

      --
      François Pinard http://pinard.progiciels-bpi.ca
    • François Pinard
      [Bram Moolenar] ... Even faster, the last two lines could read (untested): aobject.__dict__.update(a) -- François Pinard http://pinard.progiciels-bpi.ca
      Message 80 of 80 , Aug 3, 2005
        [Bram Moolenar]

        > Python can do this, of course:

        > a = {'first': 'first', 'second' : 'second'}

        > class Strange:
        > """doesn't do anytning"""

        > aobject = Strange()

        > for key in a.keys():
        > aobject.__dict__[key] = a[key]

        Even faster, the last two lines could read (untested):

        aobject.__dict__.update(a)

        --
        François Pinard http://pinard.progiciels-bpi.ca
      Your message has been successfully submitted and would be delivered to recipients shortly.