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

Re: Gurus - does/can Vim have a functionality resembling Info?

Expand Messages
  • Philip Rhoades
    lith, ... That was quick! and a lot of stuff to look at too - thanks! Regards, Phil. -- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail:
    Message 1 of 11 , Feb 14, 2013
    • 0 Attachment
      lith,


      On 2013-02-15 18:31, lith wrote:
      >> the functionality of the "info" utility to enable easy navigation
      >
      > You could use one of vim's personal wikis: vimwiki or viki, or a
      > plugin for markdown/rst (restructured text) that enables hyperlinks,
      > or an outliner plugin, or an orgmode clone, or plain text + utl
      > plugin, or plain text + vim's own gf shortcut (see :h gf).
      >
      > Some of the plugins mentioned above can be used in conjunction with
      > the voom plugin in order to facilitates navigation.
      >
      > There are also some plugins that generate "tables of contents" like,
      > e.g., ttoc -- no need to write the toc (aka top node) yourself.


      That was quick! and a lot of stuff to look at too - thanks!

      Regards,

      Phil.
      --
      Philip Rhoades

      GPO Box 3411
      Sydney NSW 2001
      Australia
      E-mail: phil@...

      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Erik Christiansen
      ... The same thing happened to me as my sysadmin, text_tools, sw_development, gnu_tools survival notes grew to 300 pages. I ve found that Vim s folding does
      Message 2 of 11 , Feb 15, 2013
      • 0 Attachment
        On 15.02.13 17:56, Philip Rhoades wrote:
        > I write my own README files for stuff that is used infrequently enough to
        > need written reminders about how to do just the things that I want to do -
        > however some of these files have now grown largish and finding the bit of
        > text I want in them is getting slow and tedious. I want to keep these files
        > as standard txt files but I would be good to have something like the
        > functionality of the "info" utility to enable easy navigation of the file
        > "nodes" from a table of contents at the top of the file. I did think about
        > just using "info" itself but that is overkill and too much of a pain . .

        The same thing happened to me as my sysadmin, text_tools,
        sw_development, gnu_tools survival notes grew to 300 pages. I've found
        that Vim's folding does the job of providing hierarchy. The ability to
        nest folds is perfect for that, and allowed significant improvements in
        cohesiveness of the information, since it revealed sections in
        suboptimal places.

        To instantly zap to sections nested several levels down, I've
        capitalised keywords, and suffixed a colon. e.g. The default view is:

        UNIX USER ENVIRONMENT & TOOLS 56 P

        TEXT TOOLS & PRINTING 42 P

        LINUX SYSTEM ADMINISTRATION 133 P

        PROGRAMMING & EMBEDDED TOOLS 105 P


        ATTIC: ~/misc/unix/Obsolete_Help

        but typing "/VIM:" gives:

        VIM:--------------------------------------------------------------- {{{

        Build & Install: 26 L
        Assorted TIPS: 3 L
        ASCII: CHARACTER CODE 3 L
        ASSORTED EDITING ACCELERATION HINTS: 1 P
        ABBREVIATIONS: 12 L
        AUTOCOMMAND: 10 L
        BACKSPACE: 9 L
        BINARY FILES: 4 L
        BUFFERS: 4 L

        The length count for each section is just eye candy, generated by an
        additional function. (These are just details of stuff I've had to look
        up, and want quick access to when needed again one day, but I've
        forgotten the keystrokes.)

        The commands for opening and closing folds is simple and intuitive, I
        find. Folding and foldmethod could be set by modelines or filetype, or
        autocommands, as desired.

        My notes on folding begin with some Vim :help topics and a hint:

        FOLDING: FOLDS: {{{
        :h usr_28.txt :h 28.8 :h fold-expr :h folds
        :h pattern.txt :h 'foldtext :h fold-foldtext :h foldmarker

        :h syn-fold # Syntax folding

        fdm (foldmethod): <--[ A quote from Vim's :help ]
        The kind of folding used for the current window. Possible values:
        |fold-manual| manual Folds are created manually.
        |fold-indent| indent Lines with equal indent form a fold.
        |fold-expr| expr 'foldexpr' gives the fold level of a line.
        |fold-marker| marker Markers are used to specify folds.
        |fold-syntax| syntax Syntax highlighting items specify folds.
        |fold-diff| diff Fold text that is not changed.

        Debugging: :verbose set foldopen?

        Hints:
        The easiest way to create a fold, at least with foldmethod=marker, is to
        visually highlight the block, then type "zf".

        ...

        Next to 'n' and '.', folding is Vim's most glittering jewel in the
        crown, I reckon.

        Erik


        --
        We are drowning in information but starved for knowledge.
        - John Naisbitt, Megatrends

        --
        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Benji Fisher
        On Fri, Feb 15, 2013 at 5:55 AM, Erik Christiansen ... It may be silly to argue about vim s best features, but I have been getting a lot of mileage out of diff
        Message 3 of 11 , Feb 15, 2013
        • 0 Attachment
          On Fri, Feb 15, 2013 at 5:55 AM, Erik Christiansen <dvalin@...> wrote:
             Next to 'n' and '.', folding is Vim's most glittering jewel in the
             crown, I reckon.

          It may be silly to argue about vim's best features, but I have been getting a lot of mileage out of diff mode lately.  Has anyone set up a site where we can vote for the most useful built-in feature, the way we can vote for scripts?

          -- 
          Benji Fisher 

          --
          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
           
          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
           
           
        • Philip Rhoades
          Erik, ... Thanks for all that - I was familiar with a some of it. I ended up using the VOom plugin which makes use of a lot what you suggested but in a nice
          Message 4 of 11 , Feb 16, 2013
          • 0 Attachment
            Erik,


            On 2013-02-22 17:56, dvalin@... wrote:
            > On 15.02.13 17:56, Philip Rhoades wrote:
            >> I write my own README files for stuff that is used infrequently
            >> enough to
            >> need written reminders about how to do just the things that I want to
            >> do -
            >> however some of these files have now grown largish and finding the
            >> bit of
            >> text I want in them is getting slow and tedious. I want to keep these
            >> files
            >> as standard txt files but I would be good to have something like the
            >> functionality of the "info" utility to enable easy navigation of the
            >> file
            >> "nodes" from a table of contents at the top of the file. I did think
            >> about
            >> just using "info" itself but that is overkill and too much of a pain
            >> . .
            >
            > The same thing happened to me as my sysadmin, text_tools,
            > sw_development, gnu_tools survival notes grew to 300 pages. I've found
            > that Vim's folding does the job of providing hierarchy. The ability to
            > nest folds is perfect for that, and allowed significant improvements
            > in
            > cohesiveness of the information, since it revealed sections in
            > suboptimal places.
            >
            > To instantly zap to sections nested several levels down, I've
            > capitalised keywords, and suffixed a colon. e.g. The default view is:
            >
            > UNIX USER ENVIRONMENT & TOOLS 56 P
            >
            > TEXT TOOLS & PRINTING 42 P
            >
            > LINUX SYSTEM ADMINISTRATION 133 P
            >
            > PROGRAMMING & EMBEDDED TOOLS 105 P
            >
            >
            > ATTIC: ~/misc/unix/Obsolete_Help
            >
            > but typing "/VIM:" gives:
            >
            > VIM:---------------------------------------------------------------
            > {{{
            >
            > Build & Install: 26 L
            > Assorted TIPS: 3 L
            > ASCII: CHARACTER CODE 3 L
            > ASSORTED EDITING ACCELERATION HINTS: 1 P
            > ABBREVIATIONS: 12 L
            > AUTOCOMMAND: 10 L
            > BACKSPACE: 9 L
            > BINARY FILES: 4 L
            > BUFFERS: 4 L
            >
            > The length count for each section is just eye candy, generated by an
            > additional function. (These are just details of stuff I've had to look
            > up, and want quick access to when needed again one day, but I've
            > forgotten the keystrokes.)
            >
            > The commands for opening and closing folds is simple and intuitive, I
            > find. Folding and foldmethod could be set by modelines or filetype, or
            > autocommands, as desired.
            >
            > My notes on folding begin with some Vim :help topics and a hint:
            >
            > FOLDING: FOLDS: {{{
            > :h usr_28.txt :h 28.8 :h fold-expr :h folds
            > :h pattern.txt :h 'foldtext :h fold-foldtext :h foldmarker
            >
            > :h syn-fold # Syntax folding
            >
            > fdm (foldmethod): <--[ A quote from Vim's :help ]
            > The kind of folding used for the current window. Possible values:
            > |fold-manual| manual Folds are created manually.
            > |fold-indent| indent Lines with equal indent form a fold.
            > |fold-expr| expr 'foldexpr' gives the fold level of a line.
            > |fold-marker| marker Markers are used to specify folds.
            > |fold-syntax| syntax Syntax highlighting items specify folds.
            > |fold-diff| diff Fold text that is not changed.
            >
            > Debugging: :verbose set foldopen?
            >
            > Hints:
            > The easiest way to create a fold, at least with foldmethod=marker, is
            > to
            > visually highlight the block, then type "zf".


            Thanks for all that - I was familiar with a some of it. I ended up
            using the VOom plugin which makes use of a lot what you suggested but in
            a nice two panel setup - allows easy block shuffling around etc.


            > Next to 'n' and '.', folding is Vim's most glittering jewel in the
            > crown, I reckon.


            I would probably agree about the folding I think but does anyone make
            use of ALL of Vim's amazing stuff? - it would take a lifetime to learn
            it all! Another opportunity to say thanks to all the Open Source
            contributors!

            Regards,

            Phil.
            --
            Philip Rhoades

            GPO Box 3411
            Sydney NSW 2001
            Australia
            E-mail: phil@...

            --
            --
            You received this message from the "vim_use" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • Erik Christiansen
            ... It s worth noting that Vim provides easy block shuffling without further ado. Just close a fold with zc, then cut it with dd (whatever its length in lines,
            Message 5 of 11 , Feb 16, 2013
            • 0 Attachment
              On 16.02.13 20:48, Philip Rhoades wrote:
              > Thanks for all that - I was familiar with a some of it. I ended up using
              > the VOom plugin which makes use of a lot what you suggested but in a nice
              > two panel setup - allows easy block shuffling around etc.

              It's worth noting that Vim provides easy block shuffling without further
              ado. Just close a fold with zc, then cut it with dd (whatever its length
              in lines, it's treated as one while closed.), then paste with p
              somewhere else in the document. If you want to move three consecutive
              closed folds, use 3dd.

              That suffices for me, zooming multi-page multi-level nested folds around
              a 300+ page document - effortlessly. It has transformed my editing, and
              the quality of the structure of the document.

              Erik

              --
              The eagle may soar, but the weasel never gets sucked into a jet engine.

              --
              --
              You received this message from the "vim_use" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php

              ---
              You received this message because you are subscribed to the Google Groups "vim_use" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            • Philip Rhoades
              Erik, ... More useful tips - thanks! Phil. -- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail: phil@pricom.com.au -- -- You received this message
              Message 6 of 11 , Feb 17, 2013
              • 0 Attachment
                Erik,


                On 2013-02-16 23:33, Erik Christiansen wrote:
                > On 16.02.13 20:48, Philip Rhoades wrote:
                >> Thanks for all that - I was familiar with a some of it. I ended up
                >> using
                >> the VOom plugin which makes use of a lot what you suggested but in a
                >> nice
                >> two panel setup - allows easy block shuffling around etc.
                >
                > It's worth noting that Vim provides easy block shuffling without
                > further
                > ado. Just close a fold with zc, then cut it with dd (whatever its
                > length
                > in lines, it's treated as one while closed.), then paste with p
                > somewhere else in the document. If you want to move three consecutive
                > closed folds, use 3dd.
                >
                > That suffices for me, zooming multi-page multi-level nested folds
                > around
                > a 300+ page document - effortlessly. It has transformed my editing,
                > and
                > the quality of the structure of the document.


                More useful tips - thanks!

                Phil.
                --
                Philip Rhoades

                GPO Box 3411
                Sydney NSW 2001
                Australia
                E-mail: phil@...

                --
                --
                You received this message from the "vim_use" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php

                ---
                You received this message because you are subscribed to the Google Groups "vim_use" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              • Anthony Campbell
                ... Interesting, but why is it better than just marking a block in Visual and cutting and pasting it? Anthony -- Anthony Campbell - ac@acampbell.org.uk
                Message 7 of 11 , Feb 17, 2013
                • 0 Attachment
                  On 16 Feb 2013, Erik Christiansen wrote:
                  > On 16.02.13 20:48, Philip Rhoades wrote:
                  > > Thanks for all that - I was familiar with a some of it. I ended up using
                  > > the VOom plugin which makes use of a lot what you suggested but in a nice
                  > > two panel setup - allows easy block shuffling around etc.
                  >
                  > It's worth noting that Vim provides easy block shuffling without further
                  > ado. Just close a fold with zc, then cut it with dd (whatever its length
                  > in lines, it's treated as one while closed.), then paste with p
                  > somewhere else in the document. If you want to move three consecutive
                  > closed folds, use 3dd.
                  >
                  > That suffices for me, zooming multi-page multi-level nested folds around
                  > a 300+ page document - effortlessly. It has transformed my editing, and
                  > the quality of the structure of the document.
                  >
                  > Erik
                  >


                  Interesting, but why is it better than just marking a block in Visual
                  and cutting and pasting it?

                  Anthony

                  --
                  Anthony Campbell - ac@...
                  http://www.acampbell.org.uk
                  http://www.reviewbooks.org.uk
                  http://www.skepticviews.org.uk
                  http://www.acupuncturecourse.org.uk
                  http://www.smashwords.com/profile.view/acampbell
                  https://itunes.apple.com/ca/artist/anthony-campbell/id73235412





                  --
                  --
                  You received this message from the "vim_use" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php

                  ---
                  You received this message because you are subscribed to the Google Groups "vim_use" group.
                  To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                  For more options, visit https://groups.google.com/groups/opt_out.
                • Erik Christiansen
                  ... A look back at my first post on this thread¹ shows that the top level folded view provided a table of contents for the whole document, while the closed
                  Message 8 of 11 , Feb 17, 2013
                  • 0 Attachment
                    On 17.02.13 08:58, Anthony Campbell wrote:
                    > On 16 Feb 2013, Erik Christiansen wrote:
                    > > It's worth noting that Vim provides easy block shuffling without further
                    > > ado. Just close a fold with zc, then cut it with dd (whatever its length
                    > > in lines, it's treated as one while closed.), then paste with p
                    > > somewhere else in the document. If you want to move three consecutive
                    > > closed folds, use 3dd.
                    > >
                    > > That suffices for me, zooming multi-page multi-level nested folds around
                    > > a 300+ page document - effortlessly. It has transformed my editing, and
                    > > the quality of the structure of the document.

                    > Interesting, but why is it better than just marking a block in Visual
                    > and cutting and pasting it?

                    A look back at my first post on this thread¹ shows that the top level
                    folded view provided a table of contents for the whole document, while
                    the closed folds in the opened "VIM:" fold provided an in-situ TOC for
                    that section. Since the (potentially) pages of text in a fold is already
                    presented as a line-equivalent unit, directly manipulable by simple
                    familiar vim commands, it would be a backward step to open the fold and
                    then begin to manually muck about constructing a matching visual block,
                    to define the text which is already defined by the fold. It is less
                    effort to use what is already there, neatly folded into one line.

                    As mentioned in that other post, a visual block, then zf, is the easiest
                    way to initially create the fold, but afterwards it need not ever be
                    done again.

                    Trying it out might be the best way to come to grips with what it can do
                    - proof of the pudding, and all that.

                    Erik

                    ¹ Don't want to clutter the list with that again, if it's not needed.

                    --
                    The tools we use have a profound and devious influence on our thinking
                    habits, and therefore on our thinking abilities.
                    -Edsgar W. Dijkstra

                    --
                    --
                    You received this message from the "vim_use" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php

                    ---
                    You received this message because you are subscribed to the Google Groups "vim_use" group.
                    To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                    For more options, visit https://groups.google.com/groups/opt_out.
                  • Anthony Campbell
                    ... [snip] Sorry, I lost track of how this thread started. Yes, I see why folding is an advantage in this case, and I expect I shall use it to keep track of my
                    Message 9 of 11 , Feb 17, 2013
                    • 0 Attachment
                      On 17 Feb 2013, Erik Christiansen wrote:
                      >
                      > > Interesting, but why is it better than just marking a block in Visual
                      > > and cutting and pasting it?
                      >
                      > A look back at my first post on this threadน shows that the top level
                      > folded view provided a table of contents for the whole document, while
                      > the closed folds in the opened "VIM:" fold provided an in-situ TOC for
                      > that section. Since the (potentially) pages of text in a fold is already
                      > presented as a line-equivalent unit, directly manipulable by simple
                      > familiar vim commands, it would be a backward step to open the fold and
                      > then begin to manually muck about constructing a matching visual block,
                      > to define the text which is already defined by the fold. It is less
                      > effort to use what is already there, neatly folded into one line.
                      >

                      [snip]

                      Sorry, I lost track of how this thread started. Yes, I see why folding
                      is an advantage in this case, and I expect I shall use it to keep track
                      of my own files that remind me of how to do things, as well as addresses
                      etc.

                      My last comment was relative to 'ordinary' text files, such as articles
                      or books, although even there I can see a use for folding occasionally,
                      e.g. for writing notes to myself and keeping track of deleted sections.
                      The equivalent of marginal notes in the old days of typewriters. I don't
                      know why I didn't think of that - I never found a use for folding
                      previously. Thanks for making me reflect - you have probably improved my
                      writing habits quite a bit.

                      Anthony


                      --
                      Anthony Campbell - ac@...
                      http://www.acampbell.org.uk
                      http://www.reviewbooks.org.uk
                      http://www.skepticviews.org.uk
                      http://www.acupuncturecourse.org.uk
                      http://www.smashwords.com/profile.view/acampbell
                      https://itunes.apple.com/ca/artist/anthony-campbell/id73235412





                      --
                      --
                      You received this message from the "vim_use" maillist.
                      Do not top-post! Type your reply below the text you are replying to.
                      For more information, visit http://www.vim.org/maillist.php

                      ---
                      You received this message because you are subscribed to the Google Groups "vim_use" group.
                      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                      For more options, visit https://groups.google.com/groups/opt_out.
                    Your message has been successfully submitted and would be delivered to recipients shortly.