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

How to make _vimrc turn spell checker on for .txt files?

Expand Messages
  • wolfv
    How to make _vimrc turn spell checker on for .txt files? Here is the pseudo code: if filename ends in .txt setlocal spell on else setlocal spell off endif
    Message 1 of 7 , Dec 4, 2011
    • 0 Attachment
      How to make _vimrc turn spell checker on for .txt files?


      Here is the pseudo code:


      if filename ends in ".txt"
      setlocal spell on
      else
      setlocal spell off
      endif

      Thank you,
      wolfv

      --
      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
    • Rich Healey
      Au BufRead,BufNewFile *.txt setlocal spell on Alternately, you can do it with ftdetect and ftplugin files, which is how I ve taken to doing it, you can see the
      Message 2 of 7 , Dec 4, 2011
      • 0 Attachment
        Au BufRead,BufNewFile *.txt setlocal spell on

        Alternately, you can do it with ftdetect and ftplugin files, which is how I've taken to doing it, you can see the approach at github.com/richoH/dotfiles

        --
        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
      • wolfv
        Thanks Rich. After adding the code to my vimrc file and opening Vim, a pop-up message says: E492: Not an editor command: Au BufRead,BufNewFile *.txt setlocal
        Message 3 of 7 , Dec 4, 2011
        • 0 Attachment
          Thanks Rich. After adding the code to my vimrc file and opening Vim,
          a pop-up message says:

          E492: Not an editor command: Au BufRead,BufNewFile *.txt setlocal
          spell on


          On Dec 4, 10:29 pm, Rich Healey <healey.r...@...> wrote:
          > Au BufRead,BufNewFile *.txt setlocal spell on
          >
          > Alternately, you can do it with ftdetect and ftplugin files, which is how
          > I've taken to doing it, you can see the approach at
          > github.com/richoH/dotfiles

          --
          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
        • Jürgen Krämer
          Hi, ... use a lowercase au : au BufRead,BufNewFile *.txt setlocal spell on Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists
          Message 4 of 7 , Dec 4, 2011
          • 0 Attachment
            Hi,

            wolfv wrote:
            > Thanks Rich. After adding the code to my vimrc file and opening Vim,
            > a pop-up message says:
            >
            > E492: Not an editor command: Au BufRead,BufNewFile *.txt setlocal
            > spell on

            use a lowercase "au":

            au BufRead,BufNewFile *.txt setlocal spell on

            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.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php
          • Zind
            ... -- 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
            Message 5 of 7 , Dec 5, 2011
            • 0 Attachment
              :h au

              On Mon, Dec 5, 2011 at 2:48 PM, wolfv <wolfvolpi@...> wrote:
              Thanks Rich.  After adding the code to my vimrc file and opening Vim,
              a pop-up message says:

              E492: Not an editor command: Au BufRead,BufNewFile *.txt setlocal
              spell on


              On Dec 4, 10:29 pm, Rich Healey <healey.r...@...> wrote:
              > Au BufRead,BufNewFile *.txt setlocal spell on
              >
              > Alternately, you can do it with ftdetect and ftplugin files, which is how
              > I've taken to doing it, you can see the approach at
              > github.com/richoH/dotfiles

              --
              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
            • Rich Healey
              My apologies. Bashing out mail quickly and not proofreading, shame on me. -- You received this message from the vim_use maillist. Do not top-post! Type your
              Message 6 of 7 , Dec 5, 2011
              • 0 Attachment
                My apologies. Bashing out mail quickly and not proofreading, shame on me.

                --
                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
              • wolfv
                Thanks rgen and Zind. Lowercase au fixed it. It s good to use :h. ... -- You received this message from the vim_use maillist. Do not top-post! Type your
                Message 7 of 7 , Dec 5, 2011
                • 0 Attachment
                  Thanks rgen and Zind. Lowercase "au" fixed it. It's good to use :h.

                  On Dec 5, 12:03 am, Jürgen Krämer <jottka...@...> wrote:
                  > Hi,
                  >
                  > wolfv wrote:
                  > > Thanks Rich.  After adding the code to my vimrc file and opening Vim,
                  > > a pop-up message says:
                  >
                  > > E492: Not an editor command: Au BufRead,BufNewFile *.txt setlocal
                  > > spell on
                  >
                  > use a lowercase "au":
                  >
                  >   au BufRead,BufNewFile *.txt setlocal spell on
                  >
                  > 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.
                  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.