yasnippet-snippets icon indicating copy to clipboard operation
yasnippet-snippets copied to clipboard

Go: Use Unique key For import and var

Open sshaw opened this issue 6 years ago • 1 comments
trafficstars

Currently import and import( both use imp. Same with var. This is a bit annoying as these are used often and result in a prompt to pick the desired one.

I propose:

  1. var = var N
  2. var( = var ( N )

Or maybe:

  1. va = var N
  2. var = var ( N )

mnemonic: var results in a longer definition than va.

Same pattern for import.

Really the key for var ( N ) should support a list of vars as this is the common use case.

Interested? Thoughts? I can submit a PR.

sshaw avatar Apr 21 '19 21:04 sshaw

Uhm that's quite a funny syntax, I didn't know you could do that. Anyway which one do you think it's more common @sshaw ?

I would be fine with var and var( for example I think.

AndreaCrotti avatar May 28 '19 09:05 AndreaCrotti