Mercurial > vim
annotate runtime/syntax/taskedit.vim @ 34636:c94ef9458309 v9.1.0204
patch 9.1.0204: Backspace inserts spaces with virtual text and 'smarttab'
Commit: https://github.com/vim/vim/commit/0185c7701434f1fbbf83fecd6384a19c1d2fc44e
Author: zeertzjq <zeertzjq@outlook.com>
Date: Mon Mar 25 16:34:51 2024 +0100
patch 9.1.0204: Backspace inserts spaces with virtual text and 'smarttab'
Problem: Backspace inserts spaces with virtual text and 'smarttab'.
Solution: Ignore virtual text and wrapping when backspacing.
(zeertzjq)
related: neovim/neovim#28005
closes: #14296
Co-authored-by: VanaIgr <vanaigranov@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 25 Mar 2024 16:45:04 +0100 |
parents | 43efa4f5a8ea |
children |
rev | line source |
---|---|
2034 | 1 " Vim syntax file |
2 " Language: support for 'task 42 edit' | |
3 " Maintainer: John Florian <jflorian@doubledog.org> | |
4 " Updated: Wed Jul 8 19:46:32 EDT 2009 | |
5 | |
6 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3496
diff
changeset
|
7 " quit when a syntax file was already loaded. |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3496
diff
changeset
|
8 if exists("b:current_syntax") |
2034 | 9 finish |
10 endif | |
3496
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
11 let s:keepcpo= &cpo |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
12 set cpo&vim |
2034 | 13 |
14 syn match taskeditHeading "^\s*#\s*Name\s\+Editable details\s*$" contained | |
15 syn match taskeditHeading "^\s*#\s*-\+\s\+-\+\s*$" contained | |
16 syn match taskeditReadOnly "^\s*#\s*\(UU\)\?ID:.*$" contained | |
17 syn match taskeditReadOnly "^\s*#\s*Status:.*$" contained | |
18 syn match taskeditReadOnly "^\s*#\s*i\?Mask:.*$" contained | |
19 syn match taskeditKey "^ *.\{-}:" nextgroup=taskeditString | |
20 syn match taskeditComment "^\s*#.*$" | |
21 \ contains=taskeditReadOnly,taskeditHeading | |
22 syn match taskeditString ".*$" contained contains=@Spell | |
23 | |
24 | |
25 " The default methods for highlighting. Can be overridden later. | |
26 hi def link taskeditComment Comment | |
27 hi def link taskeditHeading Function | |
28 hi def link taskeditKey Statement | |
29 hi def link taskeditReadOnly Special | |
30 hi def link taskeditString String | |
31 | |
32 let b:current_syntax = "taskedit" | |
33 | |
3496
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
34 let &cpo = s:keepcpo |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
35 unlet s:keepcpo |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
36 |
2034 | 37 " vim:noexpandtab |