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

Re: Patch 7.2.356

Expand Messages
  • Chris Sutcliffe
    ... It is indeed an issue in my config, in particular this line: au BufWritePost * nested filetype detect Which I use to re-read the ctags file so that
    Message 1 of 10 , Feb 4, 2010
    • 0 Attachment
      > Thinking maybe something in my config was compensating for something,
      > I tried again:
      >
      > gvim -N -u NONE -i NONE
      > :set rtp-=$HOME/vimfiles
      > :set rtp-=$HOME/vimfiles/after
      > :filetype plugin indent on
      > :syntax on
      > :e test.c
      > :set fdm=syntax
      >
      > I then open a fold for a function, edit the function, and :w.
      >
      > The fold continues to stay open.
      >
      > Maybe there's something in YOUR config causing the issue? Can you
      > reproduce with none of your customizations, as I have tried?

      It is indeed an issue in my config, in particular this line:

      au BufWritePost * nested filetype detect

      Which I use to re-read the ctags file so that Omni-complete has the
      latest information after a file is written. This worked without issue
      prior to this patch. Is there an alternate implementation I could use
      that would play nicely with this new implementation?

      Thank you,

      Chris

      --
      Chris Sutcliffe
      http://emergedesktop.org

      --
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Chris Sutcliffe
      ... I ve sorted it out... I originally had: Create tags file au FileType cpp call CreateTags() au BufWritePost * nested filetype detect Where: Create
      Message 2 of 10 , Feb 4, 2010
      • 0 Attachment
        >> It is indeed an issue in my config, in particular this line:
        >>
        >>        au BufWritePost * nested filetype detect
        >>
        >> Which I use to re-read the ctags file so that Omni-complete has the
        >> latest information after a file is written.
        >
        > You shouldn't need to do this.  If you have something automatically
        > updating the tags database, Vim will always be up-to-date.  Vim doesn't
        > cache tags info.  It always reads from the file.  If you're seeing
        > otherwise, then it may be that the omnicompletion script is caching the
        > tag information and I'd consider that a bug.

        I've sorted it out... I originally had:

        " Create tags file
        au FileType cpp call CreateTags()
        au BufWritePost * nested filetype detect

        Where:

        " Create CTags for all files in the current directory
        function! CreateTags()
        let currdir = expand('%:p:h')
        let currtags = currdir.'/tags'
        if getftime(expand('%')) > getftime(currtags)
        silent execute '!ctags *'
        endif
        endfunction

        Which would create a tags file in the current directory if the tags
        file was older than the age of the file being opened (based on the
        file type detection). In order to update the tags file when the file
        was written, I had to force a file type detection again.

        I've now changed it to:

        " Create tags file
        au FileType cpp call CreateTags()
        au BufWritePost * if &ft == 'cpp' | silent execute '!ctags *' | endif

        Which works in similar fashion but doesn't cause the undesired fold collapsing.

        Chris

        --
        Chris Sutcliffe
        http://emergedesktop.org

        --
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • Ben Fritz
        The original problem may have been solved, but take a look at this current vim_use thread. A new one seems to have popped up:
        Message 3 of 10 , Feb 4, 2010
        • 0 Attachment
          The original problem may have been solved, but take a look at this
          current vim_use thread. A new one seems to have popped up:

          http://groups.google.com/group/vim_use/browse_thread/thread/9f4c69b6693e8838

          --
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
        • Chris Sutcliffe
          ... Additionally, now doing a refresh with Ctrl-L also causes all the folds to collapse (which didn t happen before). Chris -- Chris Sutcliffe
          Message 4 of 10 , Feb 5, 2010
          • 0 Attachment
            > The original problem may have been solved, but take a look at this
            > current vim_use thread. A new one seems to have popped up:
            >
            > http://groups.google.com/group/vim_use/browse_thread/thread/9f4c69b6693e8838

            Additionally, now doing a refresh with Ctrl-L also causes all the
            folds to collapse (which didn't happen before).

            Chris

            --
            Chris Sutcliffe
            http://emergedesktop.org

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