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

Re: Stop vim from adding closing " in HTML omni-completion

Expand Messages
  • David Fishburn
    I had a quick look at the code and didn t see a way to turn it off. Though, I am not familiar with the code for that plugin, so it was more of a cursory
    Message 1 of 4 , Jan 22, 2013
    • 0 Attachment
      I had a quick look at the code and didn't see a way to turn it off.
      Though, I am not familiar with the code for that plugin, so it was more of a cursory inspection.

      David


      On Tue, Jan 22, 2013 at 12:00 PM, Martin Lundberg <martin.lundberg@...> wrote:
      Hi!

      In HTML omnicompletion vim searches <style> and included stylesheets when you are adding classes to tags like <div class="| but when it adds the values it also adds an ending ". That ending " clashes with my auto-pairs functionality (plugin) which has already added an ending " so the result becomes class="classname"|" which is not very nice. Can you stop vim from adding the ending "? It would be nice if it could be changed with an option.

      Best regards,

      Martin Lundberg

      --
      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
    • Benjamin R. Haskell
      ... It can t be changed with an option, but it appears to be easily disabled through manually editing the htmlcomplete file. On line 380 (or so) of
      Message 2 of 4 , Jan 23, 2013
      • 0 Attachment
        On Tue, 22 Jan 2013, Martin Lundberg wrote:

        > Hi!
        >
        > In HTML omnicompletion vim searches <style> and included stylesheets
        > when you are adding classes to tags like <div class="| but when it
        > adds the values it also adds an ending ". That ending " clashes with
        > my auto-pairs functionality (plugin) which has already added an ending
        > " so the result becomes class="classname"|" which is not very nice.
        > Can you stop vim from adding the ending "? It would be nice if it
        > could be changed with an option.

        It can't be changed with an option, but it appears to be easily
        disabled through manually editing the htmlcomplete file.

        On line 380 (or so) of $VIMRUNTIME/autoload/htmlcomplete.vim, replace:

        let classquote = matchstr(classbase, '.$')

        with:

        let classquote = ''

        It worked in cursory testing. Perhaps someone should add it as an
        option.

        And, as always, you shouldn't actually edit files in $VIMRUNTIME.
        (Changes will be wiped out if you upgrade Vim.) Save the modified copy
        in your own ~/.vim/autoload/ directory.

        --
        Best,
        Ben

        --
        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
      • Martin Lundberg
        ... Thanks, works great. ... That would be nice since now that I ve added this file to my autoload folder it will shadow newer htmlcomplete.vim files that
        Message 3 of 4 , Jan 23, 2013
        • 0 Attachment
          On Wednesday, January 23, 2013 9:32:10 AM UTC+1, Benjamin R. Haskell wrote:
          > On line 380 (or so) of $VIMRUNTIME/autoload/htmlcomplete.vim, replace:
          > let classquote = matchstr(classbase, '.$')
          > with:
          > let classquote = ''

          Thanks, works great.

          > It worked in cursory testing. Perhaps someone should add it as an
          > option.

          That would be nice since now that I've added this file to my autoload folder it will shadow newer htmlcomplete.vim files that comes with vim, will it not?

          -Martin

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