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

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

Expand Messages
  • Benjamin R. Haskell
    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
    • Show all 4 messages in this topic