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

someone is messing with iskeyword...

Expand Messages
  • Matteo Cavalleri
    i ve noticed that the underscore is no longer part of the iskeyword variable, both in php and ruby/rails files. this obviously messes up the * operator and
    Message 1 of 7 , Sep 24, 2013
    • 0 Attachment
      i've noticed that the underscore is no longer part of the "iskeyword" variable, both in php and ruby/rails files. this obviously messes up the * operator and in some cases even the syntax highlighting (e.g. when in a rails project a method starts with 'flash_')

      if i run vim and give the command "verbose set iskeyword?" the culprit is:

      iskeyword=@,48-57,192-255,$
      Last set from /usr/local/share/vim/vim74/syntax/css.vim

      what's strange (at least according to my tiny knowledge of vim) is:

      1) why the css file gets loaded if i have no css files open?
      2) in that file there's this command:

      setlocal iskeyword-=_

      so why "setlocal" affects all buffers?

      --
      --
      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 because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Tony Mechelynck
      ... It should only affect the buffers for which css.vim is sourced; but if syntax/php.vim sources syntax/html.vim (which doesn t depend on whether there
      Message 2 of 7 , Sep 24, 2013
      • 0 Attachment
        On 24/09/13 13:00, Matteo Cavalleri wrote:
        > i've noticed that the underscore is no longer part of the "iskeyword" variable, both in php and ruby/rails files. this obviously messes up the * operator and in some cases even the syntax highlighting (e.g. when in a rails project a method starts with 'flash_')
        >
        > if i run vim and give the command "verbose set iskeyword?" the culprit is:
        >
        > iskeyword=@,48-57,192-255,$
        > Last set from /usr/local/share/vim/vim74/syntax/css.vim
        >
        > what's strange (at least according to my tiny knowledge of vim) is:
        >
        > 1) why the css file gets loaded if i have no css files open?
        > 2) in that file there's this command:
        >
        > setlocal iskeyword-=_
        >
        > so why "setlocal" affects all buffers?
        >

        It should only affect the buffers for which css.vim is sourced; but if
        syntax/php.vim sources syntax/html.vim (which doesn't depend on whether
        there _actually_ is HTML code in your PHP script, but on whether the
        _language_ can include HTML elements), then syntax/html.vim will, in
        turn, source syntax/css.vim (because any HTML source *may* contain CSS
        code). Indeed, when I do "vim foobar.php", then ":scriptnames" (both
        without the quotes), I see that syntax/php.vim is immediately followed
        by syntax/html.vim, and after that the sub-languages which can exist
        within HTML: syntax/javascript.vim, syntax/vb.vim, syntax/css.vim; I
        suspect that the ones after that (syntax/sql.vim and
        syntax/sqloracle.vim) are for other sub-languages which can exist within
        PHP source.

        I don't know Ruby, but maybe what I said above for PHP might help you.

        If you want to mark back the underscore as an 'iskeyword' character
        (with all the risks thereto appertaining), you could create a
        ~/.vim/after/syntax/php.vim (and create the directories if they don't
        exist yet) with the line

        setlocal isk+=_

        Similarly for Ruby. Doing it this way avoids changing it for other CSS
        (or HTML) sources.


        Best regards,
        Tony.
        --
        A young man enters the New York branch of Tiffany's on a Friday evening and
        walks up to a display case full of pearl necklaces. He turns to a gorgeous
        woman, who is obviously windowshopping, looks her straight in the eye and
        says, "I can tell by your eyes that you really want that necklace. If
        you'll
        allow me, I'd like to buy it for you."
        The woman looks him up and down; he's wearing a nice suit and some
        pretty nice jewelry, but she has trouble believing this story.
        "Look, this is some kind of put on, right?"
        "No, really. You see, I've got quite a lot of money -- so much that
        I could never spend it all. I'd really like for you to have it."
        The guys whips out his checkbook, writes a check for five figures,
        calls over a clerk and hands it to him. The clerk peers at the check, looks
        at the young man, looks at the check again. "Very good, sir. I'm afraid I
        can't release the necklace immediately, would Monday be all right?"
        "That'll be fine, she'll pick it up." the man replies, and walks out
        of the store with the woman following him in a daze.
        The next Monday the man comes back in and walks up to the counter.
        The same clerk hurries over to him and says, "Sir, I'm sorry to have to tell
        you this, but your check was returned for insufficient funds."
        "I know," the man replies. "I just wanted to thank you for a
        terrific weekend."

        --
        --
        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 because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Christian Brabandt
        ... That is a recent regression (see the discussion at http://article.gmane.org/gmane.editors.vim.devel/42742) I am sure, this will be fixed soon. regards,
        Message 3 of 7 , Sep 24, 2013
        • 0 Attachment
          On Tue, September 24, 2013 13:00, Matteo Cavalleri wrote:
          > i've noticed that the underscore is no longer part of the "iskeyword"
          > variable, both in php and ruby/rails files. this obviously messes up the *
          > operator and in some cases even the syntax highlighting (e.g. when in a
          > rails project a method starts with 'flash_')
          >
          > if i run vim and give the command "verbose set iskeyword?" the culprit is:
          >
          > iskeyword=@,48-57,192-255,$
          > Last set from /usr/local/share/vim/vim74/syntax/css.vim
          >
          > what's strange (at least according to my tiny knowledge of vim) is:
          >
          > 1) why the css file gets loaded if i have no css files open?
          > 2) in that file there's this command:
          >
          > setlocal iskeyword-=_
          >
          > so why "setlocal" affects all buffers?

          That is a recent regression (see the discussion at
          http://article.gmane.org/gmane.editors.vim.devel/42742)

          I am sure, this will be fixed soon.

          regards,
          Christian

          --
          --
          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 because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Matteo Cavalleri
          thanks guys. tony was right about the cause (the rails plugin indeed loads the html syntax) but i was still curious why i experienced this problem only
          Message 4 of 7 , Sep 24, 2013
          • 0 Attachment
            thanks guys. tony was right about the cause (the rails plugin indeed loads the html syntax) but i was still curious why i experienced this problem only recently. thanks to christian now i know why :)

            i'll apply tony's suggestion while i wait for the fix

            --
            --
            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 because you are subscribed to the Google Groups "vim_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • Ike Devolder
            ... It is already fixed in he git repository [1][2] so when the runtime files will be updated, all will be fine again. [1]
            Message 5 of 7 , Sep 24, 2013
            • 0 Attachment
              Op dinsdag 24 september 2013 15:29:47 schreef Christian Brabandt:
              > On Tue, September 24, 2013 13:00, Matteo Cavalleri wrote:
              > > i've noticed that the underscore is no longer part of the "iskeyword"
              > > variable, both in php and ruby/rails files. this obviously messes up the *
              > > operator and in some cases even the syntax highlighting (e.g. when in a
              > > rails project a method starts with 'flash_')
              > >
              > > if i run vim and give the command "verbose set iskeyword?" the culprit is:
              > > iskeyword=@,48-57,192-255,$
              > >
              > > Last set from /usr/local/share/vim/vim74/syntax/css.vim
              > >
              > > what's strange (at least according to my tiny knowledge of vim) is:
              > >
              > > 1) why the css file gets loaded if i have no css files open?
              > > 2) in that file there's this command:
              > >
              > > setlocal iskeyword-=_
              > >
              > > so why "setlocal" affects all buffers?
              >
              > That is a recent regression (see the discussion at
              > http://article.gmane.org/gmane.editors.vim.devel/42742)
              >
              > I am sure, this will be fixed soon.
              >
              > regards,
              > Christian

              It is already fixed in he git repository [1][2] so when the runtime files will
              be updated, all will be fine again.

              [1] https://github.com/JulesWang/css.vim/pull/16#issuecomment-25000414
              [2]
              https://github.com/JulesWang/css.vim/commit/999ddfdc3ba9a8d806c10a037f2f886cb07f604c

              --
              Ike

              --
              --
              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 because you are subscribed to the Google Groups "vim_use" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            • Matteo Cavalleri
              ... it s already in the official hg repo, i pulled it today. thanks :) -- -- You received this message from the vim_use maillist. Do not top-post! Type your
              Message 6 of 7 , Sep 25, 2013
              • 0 Attachment
                > It is already fixed in he git repository [1][2] so when the runtime files will
                >
                > be updated, all will be fine again.
                >

                it's already in the official hg repo, i pulled it today. thanks :)

                --
                --
                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 because you are subscribed to the Google Groups "vim_use" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              • Tony Mechelynck
                ... Yes, so did I, and since it s only a runtime file update there is no new patchlevel (and no Mercurial tag) going with it. On Unix-like systems, running
                Message 7 of 7 , Sep 25, 2013
                • 0 Attachment
                  On 25/09/13 09:33, Matteo Cavalleri wrote:
                  >
                  >> It is already fixed in he git repository [1][2] so when the runtime files will
                  >>
                  >> be updated, all will be fine again.
                  >>
                  >
                  > it's already in the official hg repo, i pulled it today. thanks :)
                  >
                  Yes, so did I, and since it's only a runtime file update there is no new
                  patchlevel (and no Mercurial tag) going with it.

                  On Unix-like systems, running "make installruntime" (or "make install"
                  which calls it) in the top or src/ directory (after setting your
                  make-time defines, e.g. by means of environment variables) will be
                  enough to install it. ("make" with no target will answer "nothing to do"
                  or some equivalent, since none of the source files required to compile
                  the executable has changed.)


                  Best regards,
                  Tony.
                  --
                  Yours is not to reason why,
                  Just to Sail Away.
                  And when you find you have to throw
                  Your Legacy away;
                  Remember life as was it is,
                  And is as it were;
                  Chasing sounds across the galaxy
                  'Till silence is but a blur.
                  -- QYX.

                  --
                  --
                  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 because you are subscribed to the Google Groups "vim_use" group.
                  To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                  For more options, visit https://groups.google.com/groups/opt_out.
                Your message has been successfully submitted and would be delivered to recipients shortly.