From 5e77ca37e89c873e4490b42ff556370dc5c6ba4f Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Fri, 10 Feb 2023 06:12:04 +0200 Subject: More consistent scoping in commands section in Manpages --- assets/syntaxes/02_Extra/Manpage.sublime-syntax | 11 +++--- assets/syntaxes/02_Extra/syntax_test_man.man | 49 +++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 5 deletions(-) (limited to 'assets') diff --git a/assets/syntaxes/02_Extra/Manpage.sublime-syntax b/assets/syntaxes/02_Extra/Manpage.sublime-syntax index 02e933aa..2475da8a 100644 --- a/assets/syntaxes/02_Extra/Manpage.sublime-syntax +++ b/assets/syntaxes/02_Extra/Manpage.sublime-syntax @@ -185,15 +185,16 @@ contexts: push: command-line-option-or-pipe commands-start: - - match: '^[ ]{7}(?=.*(?:[ ]<|[|]))' + - match: (?=^[ ]{7}.*(?:[ ]<|[|])) push: commands commands: - - match: '[-\w]+' - scope: entity.name.command.man + - match: '^[ ]{7}([a-z_\-]+)(?=[ ]|$)' + captures: + 1: entity.name.command.man + push: expect-parameter + - match: '^[ ]{7}(?=[\[<]|\w+[|\]])' push: expect-parameter - - match: $ - pop: true environment-variables: - match: '^[ ]{7}([A-Z_]+)\b' diff --git a/assets/syntaxes/02_Extra/syntax_test_man.man b/assets/syntaxes/02_Extra/syntax_test_man.man index 3535d350..01ce1c55 100644 --- a/assets/syntaxes/02_Extra/syntax_test_man.man +++ b/assets/syntaxes/02_Extra/syntax_test_man.man @@ -210,6 +210,55 @@ COMMANDS wordexp(3) for details). The same include file can only be included once; subsequent attempts will be ignored. + The following commands cannot be used directly in the configuration +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - variable - entity + file. They are expected to be used with bindsym or at runtime through +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - variable - entity + swaymsg(1). + + border none|normal|csd|pixel [] + Set border style for focused window. normal includes a border of + thickness n and a title bar. pixel is a border without title bar n + pixels thick. Default is normal with border thickness 2. csd is + short for client-side-decorations, which allows the client to draw + its own decorations. + + border toggle +# ^^^^^^ entity.name.command + Cycles through the available border styles. + + exit +# ^^^^ entity.name.command + Exit sway and end your Wayland session. + + floating enable|disable|toggle + Make focused view floating, non-floating, or the opposite of what + it is now. + + focus +# ^ punctuation.definition.generic.begin +# ^^^^^^^^ variable.parameter +# ^ punctuation.definition.generic.end +# ^^^^^ variable.parameter + Moves focus to the container that matches the specified criteria. + + gaps inner|outer|horizontal|vertical|top|right|bottom|left all|current + set|plus|minus|toggle +# ^^^ variable.parameter +# ^ keyword.operator.logical + Changes the inner or outer gaps for either all workspaces or the + current workspace. outer gaps can be altered per side with top, + right, bottom, and left or per direction with horizontal and vertiā€ + cal. + + layout toggle [split|tabbed|stacking|splitv|splith] + [split|tabbed|stacking|splitv|splith]... +# ^ punctuation.section.brackets.begin +# ^^^^^ variable.parameter +# ^ keyword.operator.logical + Cycles the layout mode of the focused container through a list of + layouts. + SEE ALSO The systemd Homepage[11], systemd-system.conf(5), locale.conf(5) # ^^^^^^^^^^^^^^^^^^^ entity.name.function -- cgit v1.2.3