SourceForge.net wrote:
Feature Requests item #1358203, was opened at 2005-11-16 16:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=352439&aid=1358203&group_id=2439
Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Piotr Fusik (pfusik)
Assigned to: Nobody/Anonymous (nobody)
Summary: Match C#'s #region and #endregion with Ctrl+J/K
Initial Comment:
I would like Ctrl+J and Ctrl+K jump between C#'s
directives #region and #endregion. Example:
#region RegionName
// some code here
#endregion RegionName // name optional here
Regions can be nested.
Hint: this might be actually closer to matching XML
tags (my older RFE), because there are no #elif/#else
equivalents here, just opening and closing directive,
so invoking it with Ctrl+E is fine, too.
A long, long time ago, I thought it would be cool to have in SciTE a
feature like one in Visual Studio, to be able to jump between (nested)
preprocessor directives (#if[[n]def], #{else|elif}, #endif), using Ctrl+J/K.
So I coded it. Since I hard-coded it in SciTE, I tried to make it quite
generic, ie. usable in other languages. For example, at the time, Lua
has pre-processor directives starting with $
So, to make it more generic, I defined a number of properties:
preprocessor.symbol.$(file.patterns.c.like)=#
preprocessor.start.$(file.patterns.c.like)=if ifdef ifndef
preprocessor.middle.$(file.patterns.c.like)=else elif
preprocessor.end.$(file.patterns.c.like)=endif
I added region to preprocessor.start and endregion to preprocessor.end
and a quick test in a C++ file shown it works.
So add this to $(file.patterns.cs) and your wish should be fulfilled.
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest