Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commentstring not set for gohtmltmpl #810

Closed
louwers opened this issue Apr 22, 2016 · 2 comments
Closed

commentstring not set for gohtmltmpl #810

louwers opened this issue Apr 22, 2016 · 2 comments

Comments

@louwers
Copy link

louwers commented Apr 22, 2016

Actual behavior

Vim's fold-markers and external plugins such as vim-commentary use commentstring (see :h commentstring) to determine how to comment out a block of text for the current filetype. This is set for html, but not for gohtmltmpl.

The actual behavior is that vim inserts C-style comments in gohtmltmpl files.

      /* <div class="collapsed linky block"> */

Expected behavior

  <!-- <div class="collapsed linky block"> -->

Steps to reproduce:

  1. Enable tpope/vim-commentary.
  2. Open gohtmltmpl file.
  3. Press gcc.

Alternatively, create a fold-marker. I am not familiar with them.

Solution

Include this line in vim-go:

autocmd FileType gohtmltmpl setlocal commentstring=<!--\ %s\ -->
fatih added a commit that referenced this issue Apr 24, 2016
@fatih
Copy link
Owner

fatih commented Apr 24, 2016

Hi @louwers

Thanks for the feedback. Can you please try #813 and report if it works for you? Thanks.

@louwers
Copy link
Author

louwers commented Apr 30, 2016

Sorry for the late reply. Yes, it absolutely does. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants