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

auto-restore manual folds when vim starts ?

Expand Messages
  • Yakov
    Manual folds are lost when vim is restarted. Is there trick to restore my manual folds when vim starts ? Example. vim somefile.c ... quit and restart vim ...
    Message 1 of 2 , Jun 3, 2008
    • 0 Attachment
      Manual folds are lost when vim is restarted. Is there
      trick to restore my manual folds when vim starts ?
      Example.
      vim somefile.c
      " create manual fold:
      :1,1000fold
      :1150,$fold
      "quit and restart vim
      :q
      vim somefile.c
      I want my manual folds reinstalled.

      Thanks
      Yakov

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Jürgen Krämer
      Hi, ... you might want to execute ... before quitting and execute its counterpart ... after restarting Vim, e.g. in you case: vim somefile.c ... quit and
      Message 2 of 2 , Jun 3, 2008
      • 0 Attachment
        Hi,

        Yakov wrote:
        > Manual folds are lost when vim is restarted. Is there
        > trick to restore my manual folds when vim starts ?
        > Example.
        > vim somefile.c
        > " create manual fold:
        > :1,1000fold
        > :1150,$fold
        > "quit and restart vim
        > :q
        > vim somefile.c
        > I want my manual folds reinstalled.

        you might want to execute

        :mkview

        before quitting and execute its counterpart

        :loadview

        after restarting Vim, e.g. in you case:

        vim somefile.c
        " create manual fold:
        :1,1000fold
        :1150,$fold
        :mkview
        "quit and restart vim
        :q
        vim somefile.c
        :loadview

        Regards,
        Jürgen

        --
        Sometimes I think the surest sign that intelligent life exists elsewhere
        in the universe is that none of it has tried to contact us. (Calvin)

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.