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

Re: Vim Regina: tragedy in .5 act

Expand Messages
  • Gary Holloway
    Ok, let me try this again (taking my own suggestion...) / FROM: Austy Garhi (n. d i-b.) , Oct 31 17:10 2001 ... END: Austy Garhi (n.
    Message 1 of 19 , Nov 1, 2001
    • 0 Attachment
      Ok, let me try this again (taking my own suggestion...)

      / FROM: "Austy Garhi (n. d'i-b.)" <tgal@...>, Oct 31 17:10 2001
      | ABOUT: Vim Regina: tragedy in .5 act
      |
      ...
      | try to find help in the helpfiles to answer the user's question
      | "how do i save a `selected` block of text to a new file?" V.g.:
      ...
      |
      \ END: "Austy Garhi (n. d'i-b.)"

      [assuming a visually-selected block]
      You should be able to select the text, and use ":w filename".

      Note that this will write entire, complete lines, starting from the first line
      where the selection starts through the last line containing the selection.

      See help v_:

      How I found this help:
      :help block<tab> (blockwise-visual)

      Scrolling down, you'll find section #4, Operation on the Visual area.

      The first entry under "Additionally the following commands can be used:"
      is:

      : start ex command for highlighted lines (1) |v_:|

      (Here is where it certainly isn't obvious this is what you want...unless
      you're thinking ":w").

      On the far right is a help "tag" where more information can be found on
      this. You can either double-click on the |v_:|, or type :help v_: which
      elaborates, and explains why you would suddenly see ":'<,'>" on your
      command line when you press ":" while there is a visual selection.

      In general, the "intuitive" thing will often do what you'd expect...of course
      not much is intuitive when first learning vim. :(

      i.e.,
      The ":w" is the basic method for writing a file (in it's entirety).

      To write to a different file name, ":w filename" is used.

      To write specific lines, you add a range, e.g.: ":1,20w filename".

      Extrapolating that, if there is a visual block selected, the line number
      range is automatically entered for you, as you enter :w.

      So, that's why I tried :w first, and it worked. The "hard" part (for me too)
      was finding the the help that explains it.

      If you have specific suggestions for improving the help (changes in text,
      for clarity, etc.), please feel free to submit them.

      I know I've spent my fair share of time digging through help looking for some
      thing or another. Rest assured I eventually do find it...so it's all there,
      albeit sometimes burried.

      -gary
    • Florentin Ionescu
      Vim help is there, and is structured on operations syntax hilighting , new menus etc. What I was wondering is if would be difficult to make a general INDEX
      Message 2 of 19 , Nov 1, 2001
      • 0 Attachment
        Vim help is there, and is structured on operations "syntax hilighting",
        "new menus" etc. What I was wondering is if would be difficult to make
        a general INDEX titles/sub-titles which would cover what help is available
        in all files. Basically would be a summary.


        Thank you,
        Florentin.


        On Wed, 31 Oct 2001, Austy Garhi (n. d'i-b.) wrote :

        tgal)Date: Wed, 31 Oct 2001 17:10:28 -0800 (PST)
        tgal)From: "Austy Garhi (n. d'i-b.)" <tgal@...>
        tgal)To: "vim@..." <vim@...>
        tgal)Subject: Vim Regina: tragedy in .5 act
        tgal)
        tgal)Vim is like King Oedipus: a King rendered useless, castrated, by
        tgal)his self-gouging of his own eyes, a walking dead. If eyes are
        tgal)what allows the individual to find his way around the world of
        tgal)objects, then the HELPFILES of Vim are the eyes that allow the
        tgal)user to find her way through the forest of mechanisms that Vim
        tgal)offers. Ohhh... ohhh... but how sad! The Vim HELPFILES are a
        tgal)FORREST OF CONFUSION themselves! They do not let the user see
        tgal)how to use the Vim capabilities. They are a maze of dangling
        tgal)modifiers, double negations, coma-spliced sentences, ran-in
        tgal)clauses, misnomers of features, etc., etc., etc.
        tgal)
        tgal)A veritable tragedy.
        tgal)
        tgal)TEST CASE: using the intrinsic terms "save saveas selected block",
        tgal)try to find help in the helpfiles to answer the user's question
        tgal)"how do i save a `selected` block of text to a new file?" V.g.:
        tgal)
        tgal)==> :h sav<tab>
        tgal)==> :h select<tab>
        tgal)==> :h block<tab>
        tgal)
        tgal). . . nothing!
        tgal)
        tgal)
        tgal)
        tgal)---
        tgal)__Austy Garhi__ (n. d'i-b.)
        tgal)
        tgal)"We should take care not to make the intellect
        tgal) our god; it has, of course, powerful muscles,
        tgal) but no personality." --Albert Einstein
        tgal)

        --





        Have a nice day on the planet earth....
        Florentin.
      • Janakiraman .S
        ... The original poster s been whining about the help files in most posts. Search the archives if you need proof. A comment like Vim is like King Oedipus: a
        Message 3 of 19 , Nov 1, 2001
        • 0 Attachment
          * Christian J. Robinson (infynity@...) wrote thusly :

          > Today, Gary Holloway wrote:
          >
          > ... *Exceedingly rude reply snipped.*

          The original poster's been whining about the help files in most posts.
          Search the archives if you need proof. A comment like "Vim is like King
          Oedipus: a King rendered useless, castrated, by his self-gouging of his
          own eyes, a walking dead." sounded like a bait to me. Also note that,
          there was NO QUESTION. The act of replying to such a post instead of
          ignoring it is in itself, a polite act.

          > You know, for a new user these things are not obvious. It took me some
          > time to get a feel for the Vim help system so that I could find answers,
          > and I'm not surprised to see the original poster mentioning the same
          > thing. There's nothing wrong with saying it in a creative and
          > entertaining way.

          I agree. I dont think this post belongs to the category you are
          describing though.

          Regards,
          Janakiraman.
        • Kesteloot, Lawrence
          ... I agree. Although the helpfiles have answers to all the questions, you need to know how to ask the questions, which is sometimes the problem. For a week
          Message 4 of 19 , Nov 2, 2001
          • 0 Attachment
            Austy Garhi (n. d'i-b.) [tgal@...] wrote:
            > The Vim HELPFILES are a
            > FORREST OF CONFUSION themselves! They do not let the user see
            > how to use the Vim capabilities.

            I agree. Although the helpfiles have answers to all the questions,
            you need to know how to ask the questions, which is sometimes
            the problem.

            For a week I've been looking for the little window that you can
            type ex commands in. I know it exists because I started it once
            by accident. Turns out I have to type ":help cmdline-window".
            I tried all the obvious combinations of "command" and "window"
            and "ex" and so on. I ended up just going through the tags file of
            the help system and grepping for "window".

            I've been using vim for 7 years, so I'm not a newbie, but I still
            find it hard to find a particular option or feature just by
            its description. (Another one I had trouble with is the margin
            at the top and bottom of the window to stop the cursor from going
            too close to the edge. It's 'scrolloff'. You want to tell me how
            to find that without knowing the word 'scrolloff'?)

            What I found very useful when I was first using Unix was a
            "permuted index", which basically means that you take each
            feature, describe it in a sentence using as many keywords
            as possible, and put it in the index under each word of the sentence.
            The formatting aligns the indexed word in the middle. This is easiest
            to explain with an example, which I found with Google:

            http://www.math.sc.edu/~sjohnson/g3d/permutedIndex.html

            (Use the above link to find out how to load a config file.)

            Do we have one-sentence descriptions of commands and options? If so,
            then generating such an index would be relatively easy.

            Lawrence
            For optimum solutions that save you time, visit www.ds-s.com.
          • Zdenek Sekera
            ... Yes. ... This is why find using invaluable. One must, of course *guess close* in the first place. ... Often I find that I get the right one from that
            Message 5 of 19 , Nov 2, 2001
            • 0 Attachment
              "Kesteloot, Lawrence" wrote:
              >
              ...
              > I agree. Although the helpfiles have answers to all the questions,
              > you need to know how to ask the questions, which is sometimes
              > the problem.
              >

              Yes.

              > For a week I've been looking for the little window that you can
              > type ex commands in. I know it exists because I started it once
              > by accident. Turns out I have to type ":help cmdline-window".
              > I tried all the obvious combinations of "command" and "window"
              > and "ex" and so on.

              This is why find using <C-D> invaluable. One must, of course
              *guess close* in the first place.

              :h window<C-D> will show all tags having 'window' in it.

              Often I find that I get the right one from that list on the first try,
              sometimes it needs two or three. Occassionally I can't get one
              at all. But mostly I can get by with it.
              I never use the <TAB> completion and walk through with this, too slow
              when the <C-D> list more than 2-3 tags long.

              > I ended up just going through the tags file of
              > the help system and grepping for "window".
              >

              That's exactly what I do when *all else fails*.

              > I've been using vim for 7 years, so I'm not a newbie, but I still
              > find it hard to find a particular option or feature just by
              > its description. (Another one I had trouble with is the margin
              > at the top and bottom of the window to stop the cursor from going
              > too close to the edge. It's 'scrolloff'. You want to tell me how
              > to find that without knowing the word 'scrolloff'?)
              >

              Good example. Yes this can't be guessed.

              > What I found very useful when I was first using Unix was a
              > "permuted index", which basically means that you take each
              > feature, describe it in a sentence using as many keywords
              > as possible, and put it in the index under each word of the sentence.

              Interesting idea. Looks similar to 'man -k word' on *ix.

              > The formatting aligns the indexed word in the middle. This is easiest
              > to explain with an example, which I found with Google:
              >
              > http://www.math.sc.edu/~sjohnson/g3d/permutedIndex.html
              >
              > (Use the above link to find out how to load a config file.)
              >

              Couldn't find one...;-(

              > Do we have one-sentence descriptions of commands and options? If so,
              > then generating such an index would be relatively easy.

              The closest I know of could be the Oleg Raisky Vim Reference Guide
              http://physlab.sci.ccny.cuny.edu/~orycc/vim-main.html
              (can't access it, though...). I haven't seen 6.0 version (yet?), maybe
              it is at works. It would still be a work, convert to readable ascii,
              etc...

              On the other hand, the :h word<C-D> isn't bad at all, though not 100%
              fool-proof, but doc search issues rarely are.

              ---Zdenek
            • Kesteloot, Lawrence
              ... I took the option list from |option-list| and ran it through a makeshift Java program to get the permuted index attached. It s pretty wide (about 106
              Message 6 of 19 , Nov 2, 2001
              • 0 Attachment
                Zdenek Sekera [mailto:zs@...] wrote:
                > "Kesteloot, Lawrence" wrote:
                > > What I found very useful when I was first using Unix was a
                > > "permuted index", which basically means that you take each
                > > feature, describe it in a sentence using as many keywords
                > > as possible, and put it in the index under each word of the sentence.
                >
                > Interesting idea. Looks similar to 'man -k word' on *ix.

                I took the option list from |option-list| and ran it through a
                makeshift Java program to get the permuted index attached. It's
                pretty wide (about 106 characters) -- if we really want to restrict
                it to 80 characters we'll have to compromise the formatting.

                I ignore 38 words ("and", "the", etc.) that don't need to be
                indexed. Let me know if you find some that I've missed. If
                people consider this useful we can add it to the standard help
                files.

                To use, drop the file into "$VIM/vimfiles/doc/permuted-index.txt"
                (or equivalent Unix directory) and run ":helptags $VIM/vimfiles/doc".
                After that, typing ":help permuted-index" gives the full list.

                Lawrence

                For optimum solutions that save you time, visit www.ds-s.com.
              • Alan G. Isaac
                ... Alan Isaac
                Message 7 of 19 , Nov 2, 2001
                • 0 Attachment
                  On Fri, 2 Nov 2001, Kesteloot, Lawrence wrote:
                  > For a week I've been looking for the little window that you can
                  > type ex commands in. I know it exists because I started it once
                  > by accident. Turns out I have to type ":help cmdline-window".
                  > I tried all the obvious combinations of "command" and "window"
                  > and "ex" and so on. I ended up just going through the tags file of
                  > the help system and grepping for "window".

                  :h window<ctrl-d>

                  Alan Isaac
                • Zdenek Sekera
                  ... I tried that, yes it s too wide (doesn t matter for now), but there is something I am not getting: what is the icing on the cake compared to e.g. what is
                  Message 8 of 19 , Nov 2, 2001
                  • 0 Attachment
                    "Kesteloot, Lawrence" wrote:
                    >
                    > Zdenek Sekera [mailto:zs@...] wrote:
                    ...
                    > > Interesting idea. Looks similar to 'man -k word' on *ix.
                    >
                    > I took the option list from |option-list| and ran it through a
                    > makeshift Java program to get the permuted index attached. It's
                    > pretty wide (about 106 characters) -- if we really want to restrict
                    > it to 80 characters we'll have to compromise the formatting.
                    >

                    I tried that, yes it's too wide (doesn't matter for now), but there
                    is something I am not getting: what is the 'icing on the cake'
                    compared to e.g. what is in doc/index.txt? I know your's is list
                    of options (I don't think there is such a comprehensive, yet short,
                    listing anyway, I like it), but what I thought the next step would be
                    to have some mechanism that would understand each word in that permuted
                    index as a tag so when you do :h disp you get out (somehow) all
                    references
                    to commands/options/what_have_you containing string 'disp' (display,
                    etc...). This was my comparison with 'man -k ...'.

                    You don't seem to be elaborating on this part at all.
                    Am I badly misunderstanding your intentions or that's
                    part of your next mail?

                    So far I think this permuted-index is useful but not
                    more than that. If all commands were somehow added to it,
                    it would become huge and I wouldn't like to browse this
                    every time I'm looking for something, I'd like some
                    better mechanism. Have you got anything in mind?

                    ---Zdenek
                  • Gary Holloway
                    / FROM: Kesteloot, Lawrence , Nov 2 10:09 2001 ... [snip] PLEASE don t take this reply they wrong way; trust me, I ve spent
                    Message 9 of 19 , Nov 2, 2001
                    • 0 Attachment
                      / FROM: "Kesteloot, Lawrence" <Lawrence.Kesteloot@...>, Nov 2 10:09 2001
                      | ABOUT: RE: Vim Regina: tragedy in .5 act
                      |
                      | Austy Garhi (n. d'i-b.) [tgal@...] wrote:
                      | > The Vim HELPFILES are a
                      | > FORREST OF CONFUSION themselves! They do not let the user see
                      | > how to use the Vim capabilities.
                      |
                      | I agree. Although the helpfiles have answers to all the questions,
                      | you need to know how to ask the questions, which is sometimes
                      | the problem.
                      |
                      | For a week I've been looking for the little window that you can
                      | type ex commands in. I know it exists because I started it once
                      | by accident. Turns out I have to type ":help cmdline-window".
                      | I tried all the obvious combinations of "command" and "window"
                      | and "ex" and so on. I ended up just going through the tags file of
                      | the help system and grepping for "window".
                      [snip]

                      PLEASE don't take this reply they wrong way; trust me, I've spent pleanty of
                      time looking for things too, and don't always find them quickly.

                      In fact, when I moved to vim6, I had the exact same issue, I accidentally
                      brought up the cmdline-window several times, and couldn't quite figure out
                      how I'd done it (I think I actually figured out the keystrokes I was making --
                      "q:" -- and got help on that, voila!).

                      Certainly an index would be helpful.

                      SUGGESTION FOR PATCH:
                      "command-line-window" help tag.

                      In this particular case, a tag of command-line-window would be *extremely*
                      useful. Since "command-line" shows up in the status line, it would be a
                      logical token to try to get help on -- but if you try to get help on
                      "command-line" (even tabbing through the matches), you don't hit a match
                      for help on the command-line window; you'll get in the right help *file*,
                      but nowhere near section 6.

                      But, still, Ugh! (especially for someone as experienced as yourself)

                      If you type ":help window<tab>..." (... == keep hitting tab), you'll
                      eventually get to "cmdline-window", which sounds like a good candidate...

                      If nothing else, get help on command-line (which gets you into cmdline.txt),
                      and read (or at least scan) the *whole* document. Yes that's a pain, but
                      would have been faster than what you went through (a week?).

                      -gary
                    Your message has been successfully submitted and would be delivered to recipients shortly.