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

picking up changes to indent file without restarting MacVim

Expand Messages
  • Thruston
    I m developing an indent file for the Rexx language. I have it working fine and installed in ~/.vim/indent/rexx.vim as directed by the help. It s working OK,
    Message 1 of 2 , Jan 26, 2010
    • 0 Attachment
      I'm developing an indent file for the Rexx language.

      I have it working fine and installed in ~/.vim/indent/rexx.vim as
      directed by the help.

      It's working OK, but it's very simple, so I want to keep adding things
      to it until I get it right.

      But when I make a change, MacVim ignores the change until I restart.

      How do I get MacVim to re-read my indent file without a complete
      restart?

      I've tried "source ~/.vim/indent/rexx.vim" and "runtime indent/
      rexx.vim" but they don't seem to work...

      Thanks, T

      --
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • John Beckett
      ... Most indent files (and plugins) start with some code that ensures they only execute once. You just have to defeat that ... However, you would need to have
      Message 2 of 2 , Jan 26, 2010
      • 0 Attachment
        Thruston wrote:
        > How do I get MacVim to re-read my indent file without a
        > complete restart?
        >
        > I've tried "source ~/.vim/indent/rexx.vim" and "runtime
        > indent/ rexx.vim" but they don't seem to work...

        Most indent files (and plugins) start with some code that
        ensures they only execute once. You just have to defeat that
        code. In Vim, you might need something like this:

        :unlet b:did_indent

        However, you would need to have the code designed so that it
        won't do anything bad when sourced the second time (often that
        just means using "function!" rather than "function" so that a
        function definition can be replaced with a second function).

        John

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