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

help settings copied to new buffer

Expand Messages
  • Thorsten Maerz
    Happened with gvim60ar/win2k and gvim60au/linux. When creating a new buffer inside the BufRead event, this has a strange behaviour on :help : The autocreated
    Message 1 of 2 , Sep 3, 2001
    • 0 Attachment
      Happened with gvim60ar/win2k and gvim60au/linux.

      When creating a new buffer inside the BufRead event, this has a strange
      behaviour on :help :
      The autocreated buffer has also nomodifiable set and is marked as [help]
      (but not [ro]). I also receive an "E434:Can't find tag pattern" (changed
      directory ?)
      The helpfile gets no syntax highlighting in this example (in a bigger
      script it gets, but I could not figure out, why).

      Did I make a mistake (except leaving that window open) ?

      >>>>> cut
      function! Deepthought()
      let @z = 42
      new
      "set modifiable " still E434, no syntax
      norm "zP " gives E21:..modifiable is off
      endfunction

      au BufRead *.txt call Deepthought()
      <<<<< cut

      Thanks in advance

      Thorsten
    • Bram Moolenaar
      ... Yes, you should not jump to another buffer in a BufRead command, weird things will result... -- When I die, I want a tombstone that says GAME OVER - Ton
      Message 2 of 2 , Sep 3, 2001
      • 0 Attachment
        Thorsten Maerz wrote:

        > Happened with gvim60ar/win2k and gvim60au/linux.
        >
        > When creating a new buffer inside the BufRead event, this has a strange
        > behaviour on :help :
        > The autocreated buffer has also nomodifiable set and is marked as [help]
        > (but not [ro]). I also receive an "E434:Can't find tag pattern" (changed
        > directory ?)
        > The helpfile gets no syntax highlighting in this example (in a bigger
        > script it gets, but I could not figure out, why).
        >
        > Did I make a mistake (except leaving that window open) ?
        >
        > >>>>> cut
        > function! Deepthought()
        > let @z = 42
        > new
        > "set modifiable " still E434, no syntax
        > norm "zP " gives E21:..modifiable is off
        > endfunction
        >
        > au BufRead *.txt call Deepthought()
        > <<<<< cut

        Yes, you should not jump to another buffer in a BufRead command, weird
        things will result...

        --
        "When I die, I want a tombstone that says "GAME OVER" - Ton Richters

        /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
        ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
        \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
      Your message has been successfully submitted and would be delivered to recipients shortly.