annotate runtime/syntax/swayconfig.vim @ 30821:a57e6da5860f v9.0.0745

patch 9.0.0745: wrong cursor position when using "gj" and "gk" in a long line Commit: https://github.com/vim/vim/commit/4b6172e108fe06be47c09f8690dc54608be3ee80 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 13 20:23:28 2022 +0100 patch 9.0.0745: wrong cursor position when using "gj" and "gk" in a long line Problem: Wrong cursor position when using "gj" and "gk" in a long line. Solution: Adjust computations for the cursor position and skipcol. Re-enable tests that pass now, disable failing breakindent test.
author Bram Moolenaar <Bram@vim.org>
date Thu, 13 Oct 2022 21:30:03 +0200
parents 2acb87ee55fc
children a7801222c9c5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29533
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: sway window manager config
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Original Author: James Eapen <james.eapen@vai.org>
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Maintainer: James Eapen <james.eapen@vai.org>
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29533
diff changeset
5 " Version: 0.11.1
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29533
diff changeset
6 " Last Change: 2022 Aug 08
29533
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 " References:
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 " http://i3wm.org/docs/userguide.html#configuring
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 " https://github.com/swaywm/sway/blob/b69d637f7a34e239e48a4267ae94a5e7087b5834/sway/sway.5.scd
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 " http://vimdoc.sourceforge.net/htmldoc/syntax.html
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 "
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 "
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 " Quit when a syntax file was already loaded
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 if exists("b:current_syntax")
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 finish
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 endif
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 runtime! syntax/i3config.vim
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 scriptencoding utf-8
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 " Error
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 "syn match swayConfigError /.*/
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 " Group mode/bar
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 syn keyword swayConfigBlockKeyword set input contained
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 syn region swayConfigBlock start=+.*s\?{$+ end=+^}$+ contains=i3ConfigBlockKeyword,swayConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 " binding
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 syn keyword swayConfigBindKeyword bindswitch bindgesture contained
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 syn match swayConfigBind /^\s*\(bindswitch\)\s\+.*$/ contains=i3ConfigVariable,i3ConfigBindKeyword,swayConfigBindKeyword,i3ConfigVariableAndModifier,i3ConfigNumber,i3ConfigUnit,i3ConfigUnitOr,i3ConfigBindArgument,i3ConfigModifier,i3ConfigAction,i3ConfigString,i3ConfigGapStyleKeyword,i3ConfigBorderStyleKeyword
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 " bindgestures
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 syn keyword swayConfigBindGestureCommand swipe pinch hold contained
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 syn keyword swayConfigBindGestureDirection up down left right next prev contained
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 syn keyword swayConfigBindGesturePinchDirection inward outward clockwise counterclockwise contained
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 syn match swayConfigBindGestureHold /^\s*\(bindgesture\)\s\+hold\(:[1-5]\)\?\s\+.*$/ contains=swayConfigBindKeyword,swayConfigBindGestureCommand,swayConfigBindGestureDirection,i3ConfigWorkspaceKeyword,i3ConfigAction
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29533
diff changeset
39 syn match swayConfigBindGestureSwipe /^\s*\(bindgesture\)\s\+swipe\(:[3-5]\)\?:\(up\|down\|left\|right\)\s\+.*$/ contains=swayConfigBindKeyword,swayConfigBindGestureCommand,swayConfigBindGestureDirection,i3ConfigWorkspaceKeyword,i3ConfigAction
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29533
diff changeset
40 syn match swayConfigBindGesturePinch /^\s*\(bindgesture\)\s\+pinch\(:[2-5]\)\?:\(up\|down\|left\|right\|inward\|outward\|clockwise\|counterclockwise\)\(+\(up\|down\|left\|right\|inward\|outward\|clockwise\|counterclockwise\)\)\?.*$/ contains=swayConfigBindKeyword,swayConfigBindGestureCommand,swayConfigBindGestureDirection,swayConfigBindGesturePinchDirection,i3ConfigWorkspaceKeyword,i3ConfigAction
29533
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 " floating
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 syn keyword swayConfigFloatingKeyword floating contained
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 syn match swayConfigFloating /^\s*floating\s\+\(enable\|disable\|toggle\)\s*$/ contains=swayConfigFloatingKeyword
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 syn clear i3ConfigFloatingModifier
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 syn keyword swayConfigFloatingModifier floating_modifier contained
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 syn match swayConfigFloatingMouseAction /^\s\?.*floating_modifier\s.*\(normal\|inverted\)$/ contains=swayConfigFloatingModifier,i3ConfigVariable
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 " Gaps
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 syn clear i3ConfigSmartBorderKeyword
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 syn clear i3ConfigSmartBorder
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 syn keyword swayConfigSmartBorderKeyword on no_gaps off contained
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 syn match swayConfigSmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\|off\)\s\?$/ contains=swayConfigSmartBorderKeyword
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 " Changing colors
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 syn keyword swayConfigClientColorKeyword focused_tab_title contained
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 syn match swayConfigClientColor /^\s*client.\w\+\s\+.*$/ contains=i3ConfigClientColorKeyword,i3ConfigColor,i3ConfigVariable,i3ConfigClientColorKeyword,swayConfigClientColorKeyword
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 " set display outputs
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61 syn match swayConfigOutput /^\s*output\s\+.*$/ contains=i3ConfigOutput
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63 " set display focus
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64 syn keyword swayConfigFocusKeyword focus contained
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 syn keyword swayConfigFocusType output contained
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66 syn match swayConfigFocus /^\s*focus\soutput\s.*$/ contains=swayConfigFocusKeyword,swayConfigFocusType
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68 " xwayland
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
69 syn keyword swayConfigXwaylandKeyword xwayland contained
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70 syn match swayConfigXwaylandModifier /^\s*xwayland\s\+\(enable\|disable\|force\)\s\?$/ contains=swayConfigXwaylandKeyword
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
71
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
72 "hi def link swayConfigError Error
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
73 hi def link i3ConfigFloating Error
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
74 hi def link swayConfigFloating Type
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75 hi def link swayConfigFloatingMouseAction Type
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
76 hi def link swayConfigFocusKeyword Type
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
77 hi def link swayConfigSmartBorderKeyword Type
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
78 hi def link swayConfigBindGestureCommand Identifier
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
79 hi def link swayConfigBindGestureDirection Constant
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
80 hi def link swayConfigBindGesturePinchDirection Constant
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
81 hi def link swayConfigBindKeyword Identifier
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
82 hi def link swayConfigBlockKeyword Identifier
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
83 hi def link swayConfigClientColorKeyword Identifier
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
84 hi def link swayConfigFloatingKeyword Identifier
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
85 hi def link swayConfigFloatingModifier Identifier
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
86 hi def link swayConfigFocusType Identifier
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
87 hi def link swayConfigSmartBorder Identifier
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
88 hi def link swayConfigXwaylandKeyword Identifier
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
89 hi def link swayConfigXwaylandModifier Type
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
90 hi def link swayConfigBindGesture PreProc
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
91
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
92 let b:current_syntax = "swayconfig"