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

Emmet preferences config not working and get notice box! #15

Closed
ngoncom opened this issue Apr 7, 2018 · 11 comments
Closed

Emmet preferences config not working and get notice box! #15

ngoncom opened this issue Apr 7, 2018 · 11 comments

Comments

@ngoncom
Copy link

ngoncom commented Apr 7, 2018

Hi,

I type "mr" and using key trigger (Ctrl + `) many time, I get this:

1

I want update some Emmet preferences (https://docs.emmet.io/customization/preferences/) inside:
%appdata%\Notepad++\plugins\config\emmet.settings.json but it not work, ex:

{
	"preferences": {
		"css.valueSeparator": ":",
		"css.propertyEnd": "; "
	},
	"enableTabExpensionByFileType": true,
	"enableTabExpensionUnder": ["html", "css"]
}

Thank so much!

P/S: with long css file, it take some seconds for Emmet working!

@eight04
Copy link
Owner

eight04 commented Apr 7, 2018

I type "mr" and using key trigger (Ctrl + `) many time, I get this:

I can't reproduce it with this example:

body {
  mr|
}

I want update some Emmet preferences

Try to create this file:

%appdata%\Notepad++\plugins\config\emmet.preferences.json 

With following content:

{
  "css.valueSeparator": ":",
  "css.propertyEnd": "; "
}

This feature should be documented. See #16.

with long css file, it take some seconds for Emmet working!

I think the problem is that Emmet is too slow (we had already rewritten the HTML matcher). Could you post the steps to reproduce? I can't promise when to rewrite the CSS matcher though.

@ngoncom
Copy link
Author

ngoncom commented Apr 7, 2018

I can't reproduce it with this example:

In my case, I open a .css file and type "mr" it will expand with "margin-right: ;".

The error (see image above) will appear if I type "Ctrl + E" twice again (or using Ctrl + E multi times), after error notice I can't "mr" to expand text any more!

2

Notice that: sometime it work properly, I don't know why!

%appdata%\Notepad++\plugins\config\emmet.preferences.json

After create "emmet.preferences.json", the preferences work well!

Thank so much!

P/S: I am using

  • Windows 7 (64 bits)
  • Notepad++ v7.5.6 (32 bits) (fresh install to test)
  • jn-npp-plugin: jN_2.2.185.2_x86.zip
  • jn-npp-emmet: v1.2.0.zip

@eight04
Copy link
Owner

eight04 commented Apr 8, 2018

The error (see image above) will appear if I type "Ctrl + E" twice again (or using Ctrl + E multi times), after error notice I can't "mr" to expand text any more!

Which command would be executed when you type "Ctrl + E"? Also, uploading the CSS file which generates the error would help.

@ngoncom
Copy link
Author

ngoncom commented Apr 8, 2018

Which command would be executed when you type "Ctrl + E"?

I am using default keymap: Expand Abbreviation (Ctrl +E), and I check it not conflict with any another in Notepad++ Shortcut Mapper

Also, uploading the CSS file which generates the error would help.

Here it is: http://www.mediafire.com/file/epwtiaw5qcli2ew/style.css

Thank for your support!

@eight04
Copy link
Owner

eight04 commented Apr 8, 2018

OK, I can reproduce the bug with following example:

body {
  margin-top|
}

After expanding the expression (no matter which shortcut is used), Emmet stopped working.

@eight04
Copy link
Owner

eight04 commented Apr 8, 2018

Could you try #17?

@ngoncom
Copy link
Author

ngoncom commented Apr 8, 2018

After add some code as you mention, it work more properly!

In the rare case, if I using unicode and click Ctrl+E it will notice, ex: typing "ôa" and Ctrl+E. It will be perfect if you can fix this, but I think it is not important!

Another problem is much more keymap have been assigned, so that it conflict with Notepad++ core function, ex: Ctrl+D (duplicate line in Notepad++), I think you should set it is "null" as default value in /config/emmet.keymap.json. Because if I click "Ctrl+/" (toggle comment) in .css file (not in .html file), it will open notice pop-up.

Thank so much for your hard working!

@eight04
Copy link
Owner

eight04 commented Apr 8, 2018

Here is the issue for "out of stack space" bug: eight04/emmet#1.

Another problem is much more keymap have been assigned, so that it conflict with Notepad++ core function, ex: Ctrl+D (duplicate line in Notepad++)

How about Ctrl+Alt+D? It looks pretty consistent with "Balance inward" (Ctrl+Shift+D).

@ngoncom
Copy link
Author

ngoncom commented Apr 9, 2018

How about Ctrl+Alt+D? It looks pretty consistent with "Balance inward" (Ctrl+Shift+D).

Thank for your suggestion and your time, that is useful keymap!

@eight04
Copy link
Owner

eight04 commented Apr 9, 2018

#18

@eight04
Copy link
Owner

eight04 commented Apr 9, 2018

Released v1.2.2.

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