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

Re: How to eliminate $-> from php words

Expand Messages
  • sc
    ... first, test my theory by testing iskeyword with ... then, if i m right, create a ~/.vim/after/syntax/php.vim ok, scratch that -- i just looked and php.vim
    Message 1 of 9 , Nov 2, 2010
    • 0 Attachment
      On Tuesday 02 November 2010 18:48:30 Tim Johnson wrote:

      > using vim huge version with GTK2 GUI on ubuntu 10.04

      > I mean to eliminate the following characters:

      > '$' , '-', and '>' (ascii 36,45,62)
      > from php word syntax.

      > Neither

      > :setlocal iskeyword-=$->

      > as an ex command nor
      > autocmd BufRead,BufNewFile *.php setlocal iskeyword-=$->
      > in .vimrc
      > has the effects that I am looking for.

      > to test my efforts I invoke : set iskeyword and see the
      > following

      > :iskeyword=38,42,43,45,47-58,60-62,64-90,97-122,_,&

      > where ascii 45 and 62 are still present.

      > What am I doing wrong?

      first, test my theory by testing iskeyword with

      :verbose set iskeyword?

      then, if i'm right, create a

      ~/.vim/after/syntax/php.vim

      ok, scratch that -- i just looked and php.vim does not tamper
      with iskeyword -- perhaps you have a plugin installed that is
      setting it -- so tell us what you see when you do the verbose
      query

      sc

      --
      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
    • Tim Johnson
      ... ... ... Here you go... iskeyword=38,42,43,45,47-58,60-62,64-90,97-122,_,& And I don t recall the vim command to list out plugins, but If I
      Message 2 of 9 , Nov 2, 2010
      • 0 Attachment
        * sc <toothpik@...> [101102 16:20]:
        > On Tuesday 02 November 2010 18:48:30 Tim Johnson wrote:
        <.....>
        > first, test my theory by testing iskeyword with
        >
        > :verbose set iskeyword?
        <..>
        > ok, scratch that -- i just looked and php.vim does not tamper
        > with iskeyword -- perhaps you have a plugin installed that is
        > setting it -- so tell us what you see when you do the verbose
        > query
        Here you go...
        iskeyword=38,42,43,45,47-58,60-62,64-90,97-122,_,&

        And I don't recall the vim command to list out plugins, but
        If I invoke the following:
        gvim --noplugin hello.php
        and then run
        :verbose set iskeyword?
        I get
        iskeyword=@,48-57,_,192-255
        Last set from ~/.vimrc
        .... and you are correct: A plugin is doing it.
        And which is it?
        --
        Tim
        tim at johnsons-web.com or akwebsoft.com
        http://www.akwebsoft.com

        --
        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
      • sc
        ... the verbose query will tell you, by providing a Last set from line -- you have not shown us that, you ve only shared the verbose query from your
        Message 3 of 9 , Nov 2, 2010
        • 0 Attachment
          On Tuesday 02 November 2010 19:51:49 Tim Johnson wrote:

          > * sc <toothpik@...> [101102 16:20]:
          > > On Tuesday 02 November 2010 18:48:30 Tim Johnson wrote:

          > <.....>

          > > first, test my theory by testing iskeyword with
          > >
          > > :verbose set iskeyword?

          > <..>

          > > ok, scratch that -- i just looked and php.vim does not
          > > tamper with iskeyword -- perhaps you have a plugin installed
          > > that is setting it -- so tell us what you see when you do
          > > the verbose query

          > Here you go...
          > iskeyword=38,42,43,45,47-58,60-62,64-90,97-122,_,&

          > And I don't recall the vim command to list out plugins, but
          > If I invoke the following:
          > gvim --noplugin hello.php
          > and then run

          > :verbose set iskeyword?

          > I get
          > iskeyword=@,48-57,_,192-255
          > Last set from ~/.vimrc
          > .... and you are correct: A plugin is doing it.
          > And which is it?

          the verbose query will tell you, by providing a "Last set
          from" line -- you have not shown us that, you've only shared
          the verbose query from your --noplugin session

          sc

          --
          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
        • Tim Johnson
          ... I apologize for the oversight. I think the problem was coming from my session file. I have placed the following: setlocal iskeyword=@,48-57,_,192-255 in
          Message 4 of 9 , Nov 2, 2010
          • 0 Attachment
            * sc <toothpik@...> [101102 17:11]:
            > On Tuesday 02 November 2010 19:51:49 Tim Johnson wrote:
            >
            > the verbose query will tell you, by providing a "Last set
            > from" line -- you have not shown us that, you've only shared
            > the verbose query from your --noplugin session
            I apologize for the oversight. I think the problem was coming from
            my session file.
            I have placed the following:
            setlocal iskeyword=@,48-57,_,192-255
            in
            ~/.vim/after/syntax/php.vim
            As well, I ran the command above from ex, and then saved my
            session file.

            Thanks for getting me on track here.
            I think I have the solution.
            cheers
            --
            Tim
            tim at johnsons-web.com or akwebsoft.com
            http://www.akwebsoft.com

            --
            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
          • John Little
            ... (I see others are getting you where you want to go, but they didn t answer this question directly). That ll never work, for at least two reasons. 1.
            Message 5 of 9 , Nov 2, 2010
            • 0 Attachment
              On Nov 3, 12:48 pm, Tim Johnson <t...@...> wrote:

              > :setlocal iskeyword-=$->
              > What am I doing wrong?

              (I see others are getting you where you want to go, but they didn't
              answer this question directly).
              That'll never work, for at least two reasons.

              1. iskeyword is a comma separated list of items. The above attempts
              to remove one item "$->".
              2. Even if the setting of iskeyword had separate items for $, -, and
              >, unless they appear in the setting *in that order* :set -= would not
              remove them; one has to remove them one at a time. F.ex.,
              :set isk=a,b,c,d,e,f,g,h,i,j
              :set isk-=b,c " works, "b,c" is found
              :set isk-=e,g " doesn't work silently
              :set isk-=e isk-=g " works
              3. :set doesn't have the intelligence to convert to ascii, say a minus
              to 62.
              4. :set doesn't have the intelligence to split up 60-62 into 60,61,62
              then remove the 62.

              You can see that :set has some general mechanisms for setting options,
              but no smarts for a particular option... though I'd not be surprised
              if there are exceptions to that.

              Regards, John

              --
              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
            • Tim Johnson
              ... Hi John: Thank you for clarifying that. Some time after submitting the post, I did discover that myself. I find that it is generally a real stretch to
              Message 6 of 9 , Nov 3, 2010
              • 0 Attachment
                * John Little <john.b.little@...> [101102 21:04]:
                > On Nov 3, 12:48 pm, Tim Johnson <t...@...> wrote:
                >
                > > :setlocal iskeyword-=$->
                > > What am I doing wrong?
                >
                > (I see others are getting you where you want to go, but they didn't
                > answer this question directly).
                > That'll never work, for at least two reasons.
                >
                > 1. iskeyword is a comma separated list of items. The above attempts
                > to remove one item "$->".
                > 2. Even if the setting of iskeyword had separate items for $, -, and
                > >, unless they appear in the setting *in that order* :set -= would not
                > remove them; one has to remove them one at a time. F.ex.,
                > :set isk=a,b,c,d,e,f,g,h,i,j
                > :set isk-=b,c " works, "b,c" is found
                > :set isk-=e,g " doesn't work silently
                > :set isk-=e isk-=g " works
                > 3. :set doesn't have the intelligence to convert to ascii, say a minus
                > to 62.
                > 4. :set doesn't have the intelligence to split up 60-62 into 60,61,62
                > then remove the 62.
                >
                > You can see that :set has some general mechanisms for setting options,
                > but no smarts for a particular option... though I'd not be surprised
                > if there are exceptions to that.
                Hi John:

                Thank you for clarifying that. Some time after submitting the
                post, I did discover that myself. I find that it is generally a
                real stretch to offer any criticism of vim, but I did find that
                the command :h isk did not provide me with much edification.

                BTW: How would add or remove the comma itself from the keyword
                string?

                thanks again
                --
                Tim
                tim at johnsons-web.com or akwebsoft.com
                http://www.akwebsoft.com

                --
                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
              • John Little
                ... A variety of things work; all of these are accepted: set isk=a,b,c,d,e,f,, comma at end set isk=a,b,c,d,,,e,f three commas set isk=a,b,c,d, ,,e,f
                Message 7 of 9 , Nov 4, 2010
                • 0 Attachment
                  On Nov 4, 11:44 am, Tim Johnson <t...@...> wrote:
                  >   BTW: How would add or remove the comma itself from the keyword
                  >   string?

                  A variety of things work; all of these are accepted:

                  set isk=a,b,c,d,e,f,, "comma at end
                  set isk=a,b,c,d,,,e,f "three commas
                  set isk=a,b,c,d,\,,e,f "escape with backslash
                  set isk-=,
                  set isk+=,
                  set isk-=\,
                  set isk+=\,

                  I suppose I'd use the backslash consistently.

                  Regards, John

                  --
                  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
                • Tim Johnson
                  ... Thanks, John. -- Tim tim at johnsons-web.com or akwebsoft.com http://www.akwebsoft.com -- You received this message from the vim_use maillist. Do not
                  Message 8 of 9 , Nov 5, 2010
                  • 0 Attachment
                    * John Little <john.b.little@...> [101104 16:55]:
                    > On Nov 4, 11:44 am, Tim Johnson <t...@...> wrote:
                    > >   BTW: How would add or remove the comma itself from the keyword
                    > >   string?
                    >
                    > A variety of things work; all of these are accepted:
                    >
                    > set isk=a,b,c,d,e,f,, "comma at end
                    > set isk=a,b,c,d,,,e,f "three commas
                    > set isk=a,b,c,d,\,,e,f "escape with backslash
                    > set isk-=,
                    > set isk+=,
                    > set isk-=\,
                    > set isk+=\,
                    >
                    > I suppose I'd use the backslash consistently.
                    Thanks, John.
                    --
                    Tim
                    tim at johnsons-web.com or akwebsoft.com
                    http://www.akwebsoft.com

                    --
                    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.