VSChina/vscode-ansible

Remove comments from Ansible snippets

Opened this issue · 2 comments

When using Ansible snippets all modules variables has comments behind them explaining what they do. My problem is that these comments are not easily removed when I have edited my needed variables.

Flow

  1. I type in the Ansible module I want and let the snippet create the structure for the module.
  2. I use tab to edit my needed variables.
  3. I now need to delete majority (mostly) of not needed variables.
  4. I now need to remove comments from variables I have left.
    Somehow this workflow need to be improved.

I would like comments not to even be there from the start. The Ansible modules variable names themselves are enough for me to understand what they do. If not I use Ansible documentation online.

Personally I find the comments in the snippets very helpful. If I am using a module and have the module documentation pulled up on another screen then I usually just add the needed variables individually. The snippets become useful when I don't want to have to reference them or refer to the docs and move back and forth between screens. It can get tedious in VScode to delete the comments once they are there but its not terrible. I suspect like me many people are going to want the comments when they are utilizing snippets.

Maybe it would be helpful to have some option for snippets without comments but realistically Shift + End and then hit delete takes care of comments pretty quickly.

There should be a config option to disable them.