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

file-persistent settings plugin ?

Expand Messages
  • Lena
    Is this possible, such hypothetic plugin: file-persistent settings : the plugin would save (automatically) and restore (automatically) settings per
    Message 1 of 3 , May 1, 2011
      Is this possible, such hypothetic plugin:
      "file-persistent settings":
      the plugin would save (automatically) and restore (automatically)
      settings per file-name(pathname). Namely, those settings that were
      different from default vim settings (or from global vim settings).
      By analogy with "persistent line-numbers" (.viminfo), this
      must be possible, because.viminfo does something similar.

      For example. My "set nu" is normally off.
      Let's say I do "set nu" on buffr ~/hello.c.
      Then I quit vim, then restart vim ~/hello.c.
      Then vim would starts with "set nu" turned on only on this
      buffer, because vim(plugin) recorded
      that setting "set nu" was != default on this buffer(pathname).

      Just like .viminfo is automatically saves and restores
      line# per per-pathname.

      Thanks
      L

      --
      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
    • Harsh J
      I believe you may be looking to use modelines, or vim s session feature (:mksession). ... -- Harsh J http://harshj.com -- You received this message from the
      Message 2 of 3 , May 1, 2011
        I believe you may be looking to use modelines, or vim's session
        feature (:mksession).

        On Mon, May 2, 2011 at 12:20 AM, Lena <ririna10@...> wrote:
        > Is this possible, such hypothetic plugin:
        >   "file-persistent settings":
        > the plugin would save (automatically) and restore (automatically)
        > settings per file-name(pathname). Namely, those settings that were
        > different from default vim settings (or from global vim settings).
        > By analogy with "persistent line-numbers" (.viminfo), this
        > must be possible, because.viminfo does something similar.
        >
        > For example. My "set nu" is normally off.
        > Let's say I do "set nu" on buffr ~/hello.c.
        > Then I quit vim, then restart vim ~/hello.c.
        > Then vim would starts with "set nu" turned on only on this
        > buffer, because vim(plugin) recorded
        > that setting "set nu" was != default on this buffer(pathname).
        >
        > Just like .viminfo is automatically saves and restores
        > line# per per-pathname.
        >
        > Thanks
        > L
        >
        > --
        > 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
        >



        --
        Harsh J
        http://harshj.com

        --
        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
      • Ben Schmidt
        Or perhaps less wholescale than :mksession, just :mkview. Read the section ... in its entirety to get some ideas; right at the end there is some magic to
        Message 3 of 3 , May 2, 2011
          Or perhaps less wholescale than :mksession, just :mkview.

          Read the section
          :help views-sessions
          in its entirety to get some ideas; right at the end there is some magic
          to automatically save and load views, but I think you need to do some
          setup that is described before it to really make it work.

          I believe someone/s have written a plugin that automatically does this,
          perhaps a bit more comprehensively. Maybe have a Google and particularly
          check out the Vim tips wiki.

          Hope this helps,

          Ben.



          On 2/05/11 6:11 AM, Harsh J wrote:
          > I believe you may be looking to use modelines, or vim's session
          > feature (:mksession).
          >
          > On Mon, May 2, 2011 at 12:20 AM, Lena<ririna10@...> wrote:
          >> Is this possible, such hypothetic plugin:
          >> "file-persistent settings":
          >> the plugin would save (automatically) and restore (automatically)
          >> settings per file-name(pathname). Namely, those settings that were
          >> different from default vim settings (or from global vim settings).
          >> By analogy with "persistent line-numbers" (.viminfo), this
          >> must be possible, because.viminfo does something similar.
          >>
          >> For example. My "set nu" is normally off.
          >> Let's say I do "set nu" on buffr ~/hello.c.
          >> Then I quit vim, then restart vim ~/hello.c.
          >> Then vim would starts with "set nu" turned on only on this
          >> buffer, because vim(plugin) recorded
          >> that setting "set nu" was != default on this buffer(pathname).
          >>
          >> Just like .viminfo is automatically saves and restores
          >> line# per per-pathname.
          >>
          >> Thanks
          >> L
          >>
          >> --
          >> 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 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
        Your message has been successfully submitted and would be delivered to recipients shortly.