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

[Bug] Auto close double quote after letter "x" #12

Open
Brookg opened this issue May 7, 2019 · 2 comments
Open

[Bug] Auto close double quote after letter "x" #12

Brookg opened this issue May 7, 2019 · 2 comments
Labels
language-config Relates to the VSCode language configuration file

Comments

@Brookg
Copy link

Brookg commented May 7, 2019

OS Version: Windows 10 1809
VS Code Version: 1.33.1
Extension Version: 0.0.7

First of all, thank you for your job.
Suppose there is a signal, whose type is std_logic_vector:
signal a : std_logic_vector (15 downto 0);
Then I want to assign a constant value x"1234" to it:
a <= x"1234";
Sorry for my English. So I attach a gif:
before
As show before, the double quote after letter x is not auto closed.
My suggestion is add following snippet:
(snippets/vhdl.yml)

hex_std_logic_vector:
  prefix: x"
  description: x"nnnn"
  scope: source.vhdl
  body: "x\"$1\"$0"

(snippets/vhdl.json)

	"hex_std_logic_vector": {
		"prefix": "x\"",
		"description": "x\"nnnn\"",
		"scope": "source.vhdl",
		"body": "x\"$1\"$0"
	}

Result as shown below:
after

By the way, this issue may depend on every one's typing habits.

@jacopoabramo
Copy link
Contributor

Looks neat to me, I also use the hexadecimal assigning a lot. Would be cool to be able to do it also for upper case characters, i.e.

a <= X"FFFF";

@richjyoung
Copy link
Owner

richjyoung commented May 7, 2019

That's interesting, I think in @Brookg 's first example the quotes should auto-close, which means this is a bug. I'll look into this and update the thread.

@richjyoung richjyoung added the language-config Relates to the VSCode language configuration file label Nov 8, 2019
@richjyoung richjyoung changed the title [Suggestion] Auto close double quote after letter "x" [Bug] Auto close double quote after letter "x" Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language-config Relates to the VSCode language configuration file
Projects
None yet
Development

No branches or pull requests

3 participants