1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in
 
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #128: Enable folding of comments in html embedded scripts

Written by stille the 6 Jan 10 at 12:08. Category: Syntax highlighting & folding. Related project: Nothing/Others. Status: New
Rationale
While editing html embedded scripts like php or js, the folding of comments is disabled. I can't see why this should be done and would greatly appreciate if it wouldd be enabled globally or by a setting.
Tags: (none)

6
votes
up equal down
Solution #1: Enable fold.hypertext.comment
Written by stille the 6 Jan 10 at 12:08.
As documented for Scite at http://www.scintilla.org/SciTEDoc.html this can
be easily done by setting "fold.hypertext.comment" to 1. For Npp this would
be done in ScintillaEditView.cpp .

--- PATCH


diff U3 PowerEditor/src/ScitillaComponent/ScintillaEditView.orig.cpp PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp
--- PowerEditor/src/ScitillaComponent/ScintillaEditView.orig.cpp Fri Nov 27 20:00:42 2009
+++ PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp Sat Dec 12 12:28:04 2009
@@ -201,6 +201,7 @@
execute(SCI_SETPROPERTY, reinterpret_cast("fold.html"), reinterpret_cast("1"));
execute(SCI_SETPROPERTY, reinterpret_cast("fold.comment"), reinterpret_cast("1"));
execute(SCI_SETPROPERTY, reinterpret_cast("fold.preprocessor"), reinterpret_cast("1"));
+ execute(SCI_SETPROPERTY, reinterpret_cast("fold.hypertext.comment"), reinterpret_cast("1"));
execute(SCI_SETFOLDFLAGS, 16);
execute(SCI_SETSCROLLWIDTHTRACKING, true);
execute(SCI_SETSCROLLWIDTH, 1); //default empty document: override default width of 2000


Propose your solution


Duplicates


Comments
cchris (Administrator) wrote on the 6 Jan 10 at 13:54
Can do this in Npp code on loading the relevant lexer.


Post your comment
Syndicate content