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

Re: How to keep folds intact when the file is sent over mail

Expand Messages
  • Tim Chase
    ... You d need to coordinate your configurations. You say that you re using marks , which I presume means you re using fold markers ( :set
    Message 1 of 4 , Mar 21, 2013
    • 0 Attachment
      On 2013-03-21 00:15, sheetal wrote:
      > I don't konw if this is possible, but i've a text file on which
      > i've applied fold cmd using the marks, Now when i send the file to
      > over email, I want to keep the fold intact so that the other person
      > viewing the file should also see the folds, Current behaviour is
      > the person viewing the file will see all the fold extended and also
      > if we try fold using 'zc' Error saying fold not defined pops up.
      > Any pointers on this would be appreciated.

      You'd need to coordinate your configurations. You say that you're
      using "marks", which I presume means you're using fold markers
      (":set foldmethod=marker", note that you might have to also change
      'commentstring' to something appropriate for the language you're
      using) rather than "set foldmethod=manual".

      According to

      :help fold-marker

      you can manually specify the fold-level after the markers. You can
      then have the other person set the fold-method to "marker" and then
      use "zM" to close all the folds you want closed. This gets pretty
      close to what you want, though it breaks down if you want to send
      folds that don't get closed.

      -tim


      --
      --
      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.
    • Christian Brabandt
      Hi Tim! ... I am not exactly sure, since I have never used it, but using :mkview should create a script that when applied by the other user, he should be able
      Message 2 of 4 , Mar 21, 2013
      • 0 Attachment
        Hi Tim!

        On Do, 21 Mär 2013, Tim Chase wrote:

        > On 2013-03-21 00:15, sheetal wrote:
        > > I don't konw if this is possible, but i've a text file on which
        > > i've applied fold cmd using the marks, Now when i send the file to
        > > over email, I want to keep the fold intact so that the other person
        > > viewing the file should also see the folds, Current behaviour is
        > > the person viewing the file will see all the fold extended and also
        > > if we try fold using 'zc' Error saying fold not defined pops up.
        > > Any pointers on this would be appreciated.
        >
        > You'd need to coordinate your configurations. You say that you're
        > using "marks", which I presume means you're using fold markers
        > (":set foldmethod=marker", note that you might have to also change
        > 'commentstring' to something appropriate for the language you're
        > using) rather than "set foldmethod=manual".
        >
        > According to
        >
        > :help fold-marker
        >
        > you can manually specify the fold-level after the markers. You can
        > then have the other person set the fold-method to "marker" and then
        > use "zM" to close all the folds you want closed. This gets pretty
        > close to what you want, though it breaks down if you want to send
        > folds that don't get closed.

        I am not exactly sure, since I have never used it, but using :mkview
        should create a script that when applied by the other user, he should be
        able to view it exactly like the author did see it.

        regards
        Christian
        --
        Wie man sein Kind nicht nennen sollte:
        Axel Zucken

        --
        --
        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.
      • Ben Fritz
        ... If you re just sending them something to view, but not really intending them to edit it, you can also use :TOhtml (especially with dynamic folding enabled)
        Message 3 of 4 , Mar 21, 2013
        • 0 Attachment
          On Thursday, March 21, 2013 2:15:27 AM UTC-5, sheetal wrote:
          > Hello All,
          >
          > I don't konw if this is possible, but i've a text file on which i've applied fold cmd using the marks, Now when i send the file to over email, I want to keep the fold intact so that the other person viewing the file should also see the folds, Current behaviour is the person viewing the file will see all the fold extended and also if we try fold using 'zc' Error saying fold not defined pops up.
          > Any pointers on this would be appreciated.
          >
          > Thank you.

          If you're just sending them something to view, but not really intending them to edit it, you can also use :TOhtml (especially with dynamic folding enabled) to create an HTML representation of your file including the fold information.

          This is one of the things I actually use :TOhtml for, especially when I'm sharing with non-Vim users.

          --
          --
          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.