mirror of
https://github.com/gechandesu/todolist-syntax.git
synced 2024-11-27 19:22:40 +03:00
Compare commits
No commits in common. "ad8ef2798d985ca15e6b4c92a9d135dffcdc3d47" and "acfb048e62b02c46fe7cae98b1a1b4ed133596db" have entirely different histories.
ad8ef2798d
...
acfb048e62
11
README.md
11
README.md
@ -1,23 +1,22 @@
|
|||||||
# todolist-syntax
|
# todolist-syntax
|
||||||
|
|
||||||
Vim syntax file for todo lists (**\*.todo**, **\*.td**).
|
Vim syntax file for todo lists (**\*.td**).
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
mkdir -p ~/.vim/syntax
|
mkdir -p ~/.vim/syntax
|
||||||
wget -O ~/.vim/syntax/todolist.vim https://raw.githubusercontent.com/gechandesu/todolist-syntax/main/todolist.vim
|
wget -O ~/.vim/syntax/todolist.vim https://raw.githubusercontent.com/gechandesu/todolist-syntax/main/todolist.vim
|
||||||
echo 'autocmd BufRead,BufNewFile *.todo,*.td set filetype=todolist' >> ~/.vim/filetype.vim
|
echo 'autocmd BufRead,BufNewFile *.td set filetype=todolist' >> ~/.vim/filetype.vim
|
||||||
```
|
```
|
||||||
|
|
||||||
# Syntax
|
# Syntax
|
||||||
|
|
||||||
```
|
```
|
||||||
- Uncompleted task (light blue)
|
- Uncompleted task (blue)
|
||||||
+ Completed task (green)
|
+ Completed task (green)
|
||||||
x Rejected task (red)
|
x Rejected task (red)
|
||||||
# Comment
|
# Comment (cyan)
|
||||||
\Marked text (yellow background)\
|
TODO mark
|
||||||
`Code (magenta)`
|
|
||||||
Plain text
|
Plain text
|
||||||
```
|
```
|
||||||
|
24
todolist.vim
24
todolist.vim
@ -1,5 +1,5 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Todo list file (.todo, .td)
|
" Language: TODO list file (.td)
|
||||||
" Maintainer: gd <http://nixhacks.net>
|
" Maintainer: gd <http://nixhacks.net>
|
||||||
" Latest Revision: 31 Aug 2021
|
" Latest Revision: 31 Aug 2021
|
||||||
|
|
||||||
@ -7,17 +7,15 @@ if exists("b:current_syntax")
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
syn region tdCode start='`' end='`'
|
syn keyword LsTodo TODO
|
||||||
syn region tdMarked start='\\' end='\\'
|
syn match LsComment /#.*/
|
||||||
syn match tdComment /#.*/
|
syn match LsCompleted /^\s*+\s\+\S.*/
|
||||||
syn match tdCompleted /^\s*+\s\+\S.*/
|
syn match LsUncompleted /^\s*-\s\+\S.*/
|
||||||
syn match tdUncompleted /^\s*-\s\+\S.*/
|
syn match LsRejected /^\s*x\s\+\S.*/
|
||||||
syn match tdRejected /^\s*x\s\+\S.*/
|
|
||||||
|
|
||||||
" Highlight
|
" Highlight
|
||||||
hi tdCode ctermfg=magenta guifg=#ff00ff
|
hi LsUncompleted ctermfg=blue guifg=#0000ff
|
||||||
hi tdMarked ctermfg=black ctermbg=yellow guifg=#000000 guibg=#ffff00
|
hi LsCompleted ctermfg=green guifg=#00ff00
|
||||||
hi tdUncompleted ctermfg=lightblue guifg=#add8e6
|
hi LsRejected ctermfg=red guifg=#ff0000
|
||||||
hi tdCompleted ctermfg=green guifg=#00ff00
|
hi LsComment ctermfg=cyan guifg=#00ffff
|
||||||
hi tdRejected ctermfg=red guifg=#ff0000
|
hi LsTodo ctermfg=black ctermbg=yellow guifg=#000000 guibg=#ffff00
|
||||||
hi tdComment ctermfg=cyan guifg=#00ffff
|
|
||||||
|
Loading…
Reference in New Issue
Block a user