Add rules for Vim script to insert comments/strings #30

kana opened this Issue Mar 7, 2012 · 2 comments

1 participant


In vim filetype, " has two roles. One is a string literal, and the other is a comment sign. So that the ideal behavior is to:

  • Insert "" if a string can be inserted into the cursor position, or
  • Insert " as a comment otherwise.

The current default rules doesn't care about inserting comments.


Since the syntax of Vim script is too arbitrary as a programming language, it's hard to guess the current context perfectly. Therefore we have to use a simple-but-imperfect method to cover practical usage as much as possible.


An idea: Most comments are written in their own lines. Inline comments such as :foo " bar are not frequently used.

@kana kana added a commit that closed this issue Mar 30, 2012
@kana Merge branch 'for-authoring-vim-script'
Close gh-30.
@kana kana closed this in 5280b35 Mar 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment