Report issues, odd behaviors or submit a detailed bug report.
Alextp
Posts: 69 Joined: 23 Aug 2014 23:36
Post
by Alextp » 24 Apr 2020 17:09
! expands to
<!DOCTYPE html>
<html lang="${1:lang}">
<head>
<meta charset="${1:charset}"/>
<title>${1:Document}</title>
</head>
<body>
</body>
</html>
via emmet.pas. this is not ok, my code makes 3 multi-carets (index 1). 3 carets with different content:
lang
charset
Document
Rickard Johansson
Site Admin
Posts: 6041 Joined: 19 Jul 2006 14:29
Post
by Rickard Johansson » 26 Apr 2020 13:52
It seems I fixed this in the editor code before inserting the expanded code in RJ TextEd. I'll see if I can do this in emmet.pas instead.
Alextp
Posts: 69 Joined: 23 Aug 2014 23:36
Post
by Alextp » 29 Apr 2020 19:13
with Emmet.pas 1.14 I see
Code: Select all
<!DOCTYPE html>
<html lang="${1:lang}">
<head>
<meta charset="${2:charset}"/>
<title>${2:Document}</title>
</head>
<body>
|
</body>
</html>
2 tab stops with index=2.
Rickard Johansson
Site Admin
Posts: 6041 Joined: 19 Jul 2006 14:29
Post
by Rickard Johansson » 29 Apr 2020 19:21
There is a typo in the snippets file.
doc=html>(head>meta[charset=${1:charset}]+title{${1:Document}})+body
should be
doc=html>(head>meta[charset=${1:charset}]+title{${2:Document}})+body
Alextp
Posts: 69 Joined: 23 Aug 2014 23:36
Post
by Alextp » 30 Apr 2020 22:31
now ! gives
Code: Select all
<!DOCTYPE html>
<html lang="${1:lang}">
<head>
<meta charset="${2:charset}"/>
<title>${3:Document}</title>
</head>
<body>
|
</body>
</html>
not good, cause | and numbered stops. my program cannot handle | and numbered stops, it wants only | or only numbered stops 1,2,3,4...
Rickard Johansson
Site Admin
Posts: 6041 Joined: 19 Jul 2006 14:29
Post
by Rickard Johansson » 01 May 2020 11:54
Added an option to always return indexed tab stops ${x} in v1.15.
Only HTML, XML ... are affected by this option because you can combine abbreviations. E.g. CSS only expand a snippet - so indexed tab stops and cursor positions are never mixed.
Alextp
Posts: 69 Joined: 23 Aug 2014 23:36
Post
by Alextp » 06 May 2020 08:17
thanks. can you add the option for this please? - if snippet has several tabstops and tabstops are mixed | and ${n} - like for abbrev "!" (it has mixed index=1 index=2 and | )- then engine returns all tabstops as ${n}.
Alextp
Posts: 69 Joined: 23 Aug 2014 23:36
Post
by Alextp » 14 May 2020 20:14
sorry, I still see not resolved tabstops for "!", emmet.pas, ie result has | and ${x}.
using version 1.16 which must resolve it. and option is on
Code: Select all
function AppEmmetOptions(const ASyntax: string): TExpandOptions;
begin
FillChar(Result, SizeOf(Result), 0);
Result.AlwaysAddNewLine:= ASyntax = 'xml';
Result.AddSlashToEmptyTags:= UiOps.Emmet_AddSlashToEmptyTags;
Result.CommentTags:= UiOps.Emmet_CommentTags;
Result.IndentChilds:= UiOps.Emmet_IndentNested;
Result.SingleLine:= UiOps.Emmet_SingleLine;
Result.TabSize:= EditorOps.OpTabSize;
Result.TrimLineMarkers:= UiOps.Emmet_TrimLineMarkers;
Result.Wordwrap:= UiOps.Emmet_WordWrap;
Result.WordwrapAt:= EditorOps.OpMarginFixed;
Result.AlwaysReturnIndexedTabStops:= true;
end;
Alextp
Posts: 69 Joined: 23 Aug 2014 23:36
Post
by Alextp » 20 May 2020 18:59
ops, mixed tabstops are fixed. sorry.
I have new issue with ! abbrev.
video shows it.
i press Expand btn several times. and -- tabstops 2nd and 3rd are change on EACH PRESS.
it is demo for Lazarus from
https://github.com/alexey-t/emmet-pascal
Attachments
emmet-bg.zip
(283.56 KiB) Downloaded 107 times
Rickard Johansson
Site Admin
Posts: 6041 Joined: 19 Jul 2006 14:29
Post
by Rickard Johansson » 22 May 2020 13:13
Fixed in Emmet Pascal v1.17.
Version 1.17
* Fixed a Lazarus (Free Pascal) string issue in ResolveTabStopsIndex()