Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0b0a13e06 | ||
|
|
a65f2b1d98 | ||
|
|
6a29a2e961 | ||
|
|
d671e862e4 | ||
|
|
b24dfe0762 | ||
|
|
a956c48e9c | ||
|
|
f8d010c672 | ||
|
|
ebbc3efac2 | ||
|
|
d2ecdb4ed3 | ||
|
|
0a98223c0b | ||
|
|
b8eb8a82d0 |
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -1,5 +1,5 @@
|
||||
# See: https://axvr.io/projects/ascribe/
|
||||
* text=auto eol=lf final-newline trim-trailing-whitespace
|
||||
* text=auto eol=lf final-newline
|
||||
*.vim line-length=78 expand-tab tab-stop=4
|
||||
doc/* line-length=78 expand-tab tab-stop=4
|
||||
*.md line-length=80 expand-tab tab-stop=4
|
||||
*.org line-length=80 expand-tab tab-stop=4
|
||||
|
||||
31
README.md
31
README.md
@@ -1,31 +0,0 @@
|
||||
# Org mode and Outline mode syntax highlighting for Vim
|
||||
|
||||
Org.vim is a very minimal [Org mode][] and [Outline mode][] plugin for
|
||||
[Vim](https://www.vim.org) providing only syntax highlighting and folding.
|
||||
|
||||
This plugin aims to replicate Vim's [existing Markdown](https://github.com/tpope/vim-markdown/)
|
||||
editing experience on Org mode (and Outline mode) files, rather than trying to
|
||||
be a full featured Org mode plugin -- that is what Emacs is for.
|
||||
|
||||
Originally created so I would be able to quickly edit and easily read Org mode
|
||||
files in Vim without any of _the bells and whistles_ of the original Emacs
|
||||
implementation. It also allowed me use [Orgzly](https://github.com/orgzly/orgzly-android/)
|
||||
(highly recommended) without worrying about Emacs lock-in.
|
||||
|
||||
**Notice**: this project is considered complete by the author. You can still
|
||||
report bugs and request additional features, however it is unlikely that new
|
||||
features will be added.
|
||||
|
||||
## Licence
|
||||
|
||||
Copyright (c) 2018-2019, Alex Vear.
|
||||
|
||||
Org.vim is distributed under the same terms as Vim itself.
|
||||
|
||||
A copy of the full licence text should have been provided with this extension
|
||||
in the `LICENCE` file. The license can also be viewed on the
|
||||
[web](http://vimdoc.sourceforge.net/htmldoc/uganda.html#license) or by invoking
|
||||
`:help license` from within Vim.
|
||||
|
||||
[Outline mode]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Outline-Mode.html
|
||||
[Org mode]: https://orgmode.org
|
||||
29
README.org
Normal file
29
README.org
Normal file
@@ -0,0 +1,29 @@
|
||||
#+TITLE: Org mode and Outline mode syntax highlighting for Vim
|
||||
|
||||
Org.vim is a very minimal [[https://orgmode.org][Org mode]] and
|
||||
[[https://www.gnu.org/software/emacs/manual/html_node/emacs/Outline-Mode.html][Outline mode]]
|
||||
plugin for [[https://www.vim.org][Vim]] providing only syntax highlighting and
|
||||
folding.
|
||||
|
||||
This plugin aims to replicate Vim's [[https://github.com/tpope/vim-markdown/][existing Markdown]]
|
||||
editing experience on Org mode (and Outline mode) files, rather than trying to
|
||||
be a full featured Org mode plugin—that is what Emacs is for.
|
||||
|
||||
Originally created so I would be able to quickly edit and easily read Org mode
|
||||
files in Vim without any of /the bells and whistles/ of the original Emacs
|
||||
implementation. It also allowed me use [[https://github.com/orgzly/orgzly-android/][Orgzly]]
|
||||
(highly recommended) without worrying about Emacs lock-in.
|
||||
|
||||
*Note*: this project is considered /feature complete/ by the author, so the
|
||||
addition of new features will be unlikely.
|
||||
|
||||
** Licence
|
||||
|
||||
Copyright (c) 2018–2020, Alex Vear.
|
||||
|
||||
Org.vim is distributed under the same terms as Vim itself.
|
||||
|
||||
A copy of the full licence text should have been provided with this extension
|
||||
in the =LICENCE= file. The license can also be viewed on the
|
||||
[[http://vimdoc.sourceforge.net/htmldoc/uganda.html#license][web]] or by invoking
|
||||
~:help license~ from within Vim.
|
||||
12
TODO
12
TODO
@@ -1,13 +1,7 @@
|
||||
MAYBE:
|
||||
- Better link syntax highlighting (more similar to links in vim-markdown)
|
||||
- Syntax highlight bullets and checkboxes
|
||||
- Option to enable/disable folding (similar to g:markdown_folding)
|
||||
- Different syntax group for heading delimiters
|
||||
- Change log in Vim doc
|
||||
- Syntax highlight checkboxes and checkbox cookies
|
||||
- Separate syntax group for heading delimiters
|
||||
- Syntax highlight and indent properties
|
||||
|
||||
UNLIKELY:
|
||||
- Add working links
|
||||
- Maybe utilise Vim-Waikiki and override default Vim mappings
|
||||
- Open man pages (use ':h :Man')
|
||||
- Add 'org-store-link' and 'org-insert-link' implementations
|
||||
- Implement Emacs's abbreviations (e.g. '\<s<TAB>')
|
||||
|
||||
@@ -4,9 +4,23 @@
|
||||
" License: Vim (see `:help license`)
|
||||
" Location: autoload/org.vim
|
||||
" Website: https://github.com/axvr/org.vim
|
||||
" Last Change: 2019-09-22
|
||||
" Last Change: 2020-01-04
|
||||
|
||||
" Fallback chain for options. Buffer local --> Global --> default.
|
||||
function org#option(name, default)
|
||||
function org#option(name, default) abort
|
||||
return get(b:, a:name, get(g:, a:name, a:default))
|
||||
endfunction
|
||||
|
||||
" Emacs-like fold text.
|
||||
function org#fold_text() abort
|
||||
return getline(v:foldstart) . '...'
|
||||
endfunction
|
||||
|
||||
" Check fold depth of a line.
|
||||
function org#fold_expr()
|
||||
let l:depth = match(getline(v:lnum), '\(^\*\+\)\@<=\( .*$\)\@=')
|
||||
if l:depth > 0 && synIDattr(synID(v:lnum, 1, 1), 'name') =~# '\m^o\(rg\|utline\)Heading'
|
||||
return ">" . l:depth
|
||||
endif
|
||||
return "="
|
||||
endfunction
|
||||
|
||||
125
doc/org.txt
125
doc/org.txt
@@ -10,8 +10,9 @@ Welcome to the org.vim user manual. *org* *org.vim* *vim-org* *out
|
||||
2. Installation ............................... |org-install|
|
||||
3. Basic syntax ............................... |org-syntax|
|
||||
4. Configuration .............................. |org-configuration|
|
||||
5. Legal ...................................... |org-legal|
|
||||
6. References ................................. |org-references|
|
||||
5. Change log ................................. |org-changelog|
|
||||
6. Legal ...................................... |org-legal|
|
||||
7. References ................................. |org-references|
|
||||
|
||||
==============================================================================
|
||||
1. INTRODUCTION *org-intro*
|
||||
@@ -52,7 +53,7 @@ levels denoted by asterisks.
|
||||
Org.vim supports as many heading levels as you want, and each of these
|
||||
headings can use Vim's folding keys and fold navigation.
|
||||
<
|
||||
Org mode is a huge superset of Outline mode. It uses the same heading syntax
|
||||
Org mode is a huge superset of Outline mode. It uses the same heading syntax
|
||||
mentioned above, but supports many, many more features. Org.vim supports the
|
||||
core subset of Org mode syntax, which should be suitable for most use cases.
|
||||
|
||||
@@ -64,7 +65,7 @@ The following is a short overview of essential Org mode syntax.
|
||||
|
||||
Paragraphs are separated by empty lines.
|
||||
|
||||
=monospaced= and ~verbatim~ text are delimited by equals signs and tilde
|
||||
~monospaced~ and =verbatim= text are delimited by equals signs and tilde
|
||||
respectively.
|
||||
|
||||
: Entire lines can be marked as verbatim by prepending with a colon.
|
||||
@@ -98,7 +99,7 @@ also be manually enabled with the following command.
|
||||
:set filetype=org
|
||||
<
|
||||
Outline mode doesn't have a file extension like Org mode so you will have to
|
||||
enable it manually. This is simply done by opening the file and runing the
|
||||
enable it manually. This is simply done by opening the file and runing the
|
||||
following command.
|
||||
>
|
||||
:set filetype=outline
|
||||
@@ -106,6 +107,40 @@ following command.
|
||||
==============================================================================
|
||||
4. CONFIGURATION *org-configuration*
|
||||
|
||||
*org-folding*
|
||||
|
||||
To control how Org.vim handles folding, just use the standard Vim |folding|
|
||||
options and commands.
|
||||
|
||||
For example if you want to enable or disable folding, use 'foldenable'.
|
||||
>
|
||||
autocmd FileType org,outline setlocal nofoldenable
|
||||
<
|
||||
Or if you want folding enabled and all folds opened by default, use
|
||||
'foldlevelstart'.
|
||||
>
|
||||
autocmd FileType org,outline setlocal foldenable foldlevelstart=99
|
||||
<
|
||||
For more information on folding in Vim, refer to |fold.txt|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*org-conceal-links*
|
||||
|
||||
You can tell Vim to conceal links by using the built-in 'conceallevel' and
|
||||
'concealcursor' options.
|
||||
|
||||
For example, you can make Vim collapse an Org mode link to look like it would
|
||||
within Emacs or a Web browser (i.e. only showing the link title).
|
||||
>
|
||||
[[https://www.vim.org][Vim website]] --> Vim website
|
||||
<
|
||||
This is achieved with this |autocmd|:
|
||||
>
|
||||
autocmd FileType org setlocal conceallevel=2 concealcursor=nc
|
||||
<
|
||||
Note: long concealed text can act weird when "hard-wraping" text in Vim.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'b:org_state_keywords'* *'g:org_state_keywords'*
|
||||
Value: list of strings~
|
||||
Default: ['TODO', 'NEXT', 'DONE']~
|
||||
@@ -121,56 +156,72 @@ State keywords can be set on specific buffers by using |'b:org_state_keywords'|
|
||||
rather than |'g:org_state_keywords'|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'b:org_conceal_links'* *'g:org_conceal_links'*
|
||||
*'b:org_clean_folds'* *'g:org_clean_folds'*
|
||||
Value: numeric~
|
||||
Default: 1~
|
||||
Default: 0~
|
||||
|
||||
This option changes how Org mode links are rendered. If this option is
|
||||
enabled, most of the link syntax will be collapsed to look as it would within
|
||||
Emacs or a web browser; only showing the (underlined) link text.
|
||||
Vim's default styling for folds is quite ugly. Enabling this option will
|
||||
remove much of the visual noise and suffix the folded heading text with an
|
||||
ellipsis (`...`) making folds look the same as they do in Emacs' Org mode (and
|
||||
Outline mode).
|
||||
>
|
||||
[https://www.vim.org][Vim website] --> Vim website
|
||||
* Heading 1...
|
||||
<
|
||||
When in insert mode with the cursor on that line, Vim will show the full link
|
||||
syntax. This feature is enabled by default, however the way Vim treats
|
||||
concealed text can be annoying, so it can be disabled.
|
||||
|
||||
To disable for all Org mode files, place the following line in your vimrc:
|
||||
This option can be enabled for all buffers like so:
|
||||
>
|
||||
let g:org_conceal_links = 0
|
||||
let g:org_clean_folds = 1
|
||||
<
|
||||
To disable for a specific file use this instead:
|
||||
Alternatively it can be enabled for specific buffers:
|
||||
>
|
||||
let b:org_conceal_links = 0
|
||||
<
|
||||
If you would like to modify how links are concealed, you can disable this
|
||||
option, and manually set the |conceallevel| and |concealcursor| options from
|
||||
an |autocmd| like so.
|
||||
>
|
||||
autocmd FileType org setlocal conceallevel=2 concealcursor=nc
|
||||
let b:org_clean_folds = 1
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*'b:org_use_italics'* *'g:org_use_italics'*
|
||||
Value: numeric~
|
||||
Default: 0~
|
||||
Default: 1~
|
||||
|
||||
Display italic org-mode markup (e.g. `/this is italic org-mode markup/`) using
|
||||
Display italic Org mode markup (e.g. `/this is italic Org mode markup/`) using
|
||||
the italic variant of your font.
|
||||
|
||||
Note: this option is disabled by default because some terminals and monospaced
|
||||
fonts don't support the use of italics.
|
||||
As some terminals, terminal multiplexers and monospaced fonts don't support
|
||||
the use of italics, org.vim provides a mechanism to disable italic text.
|
||||
|
||||
To enable this feature in all Org mode files place the following line in your
|
||||
vimrc:
|
||||
To disable for all Org mode files place the following line in your vimrc:
|
||||
>
|
||||
let g:org_use_italics = 1
|
||||
let g:org_use_italics = 0
|
||||
<
|
||||
To enable italics only in a single buffer, use this instead:
|
||||
To disable italics only in a single buffer, use this instead:
|
||||
>
|
||||
let b:org_use_italics = 1
|
||||
let b:org_use_italics = 0
|
||||
<
|
||||
==============================================================================
|
||||
5. LEGAL *org-legal*
|
||||
5. CHANGE LOG *org-changelog*
|
||||
|
||||
v1.2 [2020-02-15]~
|
||||
|
||||
* Improved syntax highlighting of links and turned off link concealing.
|
||||
* Added |org_conceal_links| doc section on how turn on link concealing.
|
||||
* Syntax highlight list item bullets and numbers.
|
||||
* Make Vim correctly format lists without messing up indentation.
|
||||
* Allow lower case in option keys and dynamic block markers.
|
||||
* Remove a couple of unnecessary 'fillchars' rules.
|
||||
* Minor README content update.
|
||||
|
||||
v1.1 [2020-01-05]~
|
||||
|
||||
* Added documentation on folding configuration (|org-folding|).
|
||||
* Added 'g:org_clean_folds' option.
|
||||
* Improved accuracy of in-line delimiter matching.
|
||||
* Various minor documentation fixes.
|
||||
* Rewrote README in Org mode.
|
||||
* Enabled rendering of italics by default.
|
||||
|
||||
v1.0 [2019-09-28]~
|
||||
|
||||
* Initial stable release.
|
||||
|
||||
==============================================================================
|
||||
6. LEGAL *org-legal*
|
||||
|
||||
Org.vim is based on the work of many other people (far too many to list here),
|
||||
without them org.vim would not have been possible. The most notable of thse
|
||||
@@ -181,14 +232,14 @@ works are:
|
||||
|
||||
Org.vim is distributed under the same terms as Vim itself.
|
||||
|
||||
Copyright (c) 2018-2019, Alex Vear.
|
||||
Copyright (c) 2018–2020, Alex Vear.
|
||||
|
||||
A copy of the full licence text should have been provided with this extension
|
||||
in the `LICENCE` file. The license can also be viewed on the web [3] or by
|
||||
viewing the |license| section of the |uganda.txt| help doc from within Vim.
|
||||
|
||||
==============================================================================
|
||||
6. REFERENCES *org-references*
|
||||
7. REFERENCES *org-references*
|
||||
|
||||
[1]: <https://www.gnu.org/software/emacs/manual/html_node/emacs/Outline-Mode.html>
|
||||
[2]: <https://orgmode.org/>
|
||||
|
||||
@@ -4,27 +4,21 @@
|
||||
" License: Vim (see `:help license`)
|
||||
" Location: ftplugin/org.vim
|
||||
" Website: https://github.com/axvr/org.vim
|
||||
" Last Change: 2019-09-22
|
||||
" Last Change: 2020-01-04
|
||||
"
|
||||
" Reference Specification: Org mode manual
|
||||
" GNU Info: `$ info Org`
|
||||
" Web: <https://orgmode.org/manual/index.html>
|
||||
|
||||
setlocal commentstring=#%s
|
||||
setlocal comments=fb:*,fb:-,fb:+,b:#,b:\:
|
||||
setlocal formatoptions+=ncqlt
|
||||
let &l:formatlistpat = '^\s*\(\d\+[.)]\|[+-]\)\s\+'
|
||||
|
||||
function! OrgFold()
|
||||
let l:depth = match(getline(v:lnum), '\(^\*\+\)\@<=\( .*$\)\@=')
|
||||
if l:depth > 0 && synIDattr(synID(v:lnum, 1, 1), 'name') =~# 'orgHeading'
|
||||
return ">" . l:depth
|
||||
endif
|
||||
return "="
|
||||
endfunction
|
||||
|
||||
setlocal foldexpr=OrgFold()
|
||||
setlocal foldexpr=org#fold_expr()
|
||||
setlocal foldmethod=expr
|
||||
|
||||
" Conceal Org mode link syntax
|
||||
if org#option('org_conceal_links', 1)
|
||||
setlocal conceallevel=2
|
||||
setlocal concealcursor=nc
|
||||
if org#option('org_clean_folds', 0)
|
||||
setlocal foldtext=org#fold_text()
|
||||
setlocal fillchars-=fold:-
|
||||
endif
|
||||
|
||||
@@ -4,19 +4,16 @@
|
||||
" License: Vim (see `:help license`)
|
||||
" Location: ftplugin/outline.vim
|
||||
" Website: https://github.com/axvr/org.vim
|
||||
" Last Change: 2019-09-22
|
||||
" Last Change: 2020-01-04
|
||||
"
|
||||
" Reference Specification: GNU Emacs Manual, section 'Outline Mode'
|
||||
" GNU Info: `$ info Emacs Outline Mode`
|
||||
" Web: <https://www.gnu.org/software/emacs/manual/html_node/emacs/Outline-Mode.html>
|
||||
|
||||
function! OutlineFold()
|
||||
let l:depth = match(getline(v:lnum), '\(^\*\+\)\@<=\( .*$\)\@=')
|
||||
if l:depth > 0 && synIDattr(synID(v:lnum, 1, 1), 'name') =~# 'outlineHeading'
|
||||
return ">" . l:depth
|
||||
endif
|
||||
return "="
|
||||
endfunction
|
||||
|
||||
setlocal foldexpr=OutlineFold()
|
||||
setlocal foldexpr=org#fold_expr()
|
||||
setlocal foldmethod=expr
|
||||
|
||||
if org#option('org_clean_folds', 0)
|
||||
setlocal foldtext=org#fold_text()
|
||||
setlocal fillchars-=fold:-
|
||||
endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
" License: Vim (see `:help license`)
|
||||
" Location: syntax/org.vim
|
||||
" Website: https://github.com/axvr/org.vim
|
||||
" Last Change: 2019-09-28
|
||||
" Last Change: 2020-01-05
|
||||
"
|
||||
" Reference Specification: Org mode manual
|
||||
" GNU Info: `$ info Org`
|
||||
@@ -18,12 +18,12 @@ endif
|
||||
syntax spell toplevel
|
||||
|
||||
" Bold, underine, italic, etc.
|
||||
syntax region orgItalic matchgroup=orgItalicDelimiter start="\/\S\@=\/\@!" end="\S\@<=\/\@<!\/" keepend contains=@Spell
|
||||
syntax region orgBold matchgroup=orgBoldDelimiter start="\*\S\@=\*\@!" end="\S\@<=\*\@<!\*" keepend contains=@Spell
|
||||
syntax region orgUnderline matchgroup=orgUnderlineDelimiter start="_\S\@=_\@!" end="\S\@<=_\@<!_" keepend contains=@Spell
|
||||
syntax region orgStrikethrough matchgroup=orgStrikethroughDelimiter start="+\S\@=+\@!" end="\S\@<=+\@<!+" keepend contains=@Spell
|
||||
syntax region orgItalic matchgroup=orgItalicDelimiter start="[^ \t\k]\@<!\/\k\@=\/\@!" end="\k\@<=\/\@<!\/" keepend contains=@Spell
|
||||
syntax region orgBold matchgroup=orgBoldDelimiter start="[^ \t\k]\@<!\*\k\@=\*\@!" end="\k\@<=\*\@<!\*" keepend contains=@Spell
|
||||
syntax region orgUnderline matchgroup=orgUnderlineDelimiter start="[^ \t\k]\@<!_\k\@=_\@!" end="\k\@<=_\@<!_" keepend contains=@Spell
|
||||
syntax region orgStrikethrough matchgroup=orgStrikethroughDelimiter start="[^ \t\k]\@<!+\k\@=+\@!" end="\k\@<=+\@<!+" keepend contains=@Spell
|
||||
|
||||
if org#option('org_use_italics', 0)
|
||||
if org#option('org_use_italics', 1)
|
||||
highlight def orgItalic term=italic cterm=italic gui=italic
|
||||
else
|
||||
highlight def orgItalic term=none cterm=none gui=none
|
||||
@@ -31,14 +31,13 @@ endif
|
||||
|
||||
highlight def orgBold term=bold cterm=bold gui=bold
|
||||
highlight def orgUnderline term=underline cterm=underline gui=underline
|
||||
highlight def link orgItalicDelimiter orgItalic
|
||||
highlight def link orgBoldDelimiter orgBold
|
||||
highlight def link orgUnderlineDelimiter orgUnderline
|
||||
|
||||
|
||||
" Options
|
||||
syntax match orgOption /^\s*#+\w\+.*$/ keepend
|
||||
syntax region orgTitle matchgroup=orgOption start="^\s*#+TITLE:\s*" end="$" keepend oneline
|
||||
syntax region orgTitle matchgroup=orgOption start="\c^\s*#+TITLE:\s*" end="$" keepend oneline
|
||||
|
||||
highlight def link orgBlockDelimiter SpecialComment
|
||||
highlight def link orgOption SpecialComment
|
||||
@@ -46,12 +45,12 @@ highlight def link orgTitle Title
|
||||
|
||||
|
||||
" Code and vervatim text
|
||||
syntax region orgCode matchgroup=orgCodeDelimiter start="=\S\@==\@!" end="\S\@<==\@<!=" keepend
|
||||
syntax region orgVerbatim matchgroup=orgVerbatimDelimiter start="\~\S\@=\~\@!" end="\S\@<=\~\@<!\~" keepend
|
||||
syntax region orgCode matchgroup=orgCodeDelimiter start="[^ \t\k]\@<!\~\k\@=\~\@!" end="\k\@<=\~\@<!\~" keepend
|
||||
syntax region orgVerbatim matchgroup=orgVerbatimDelimiter start="[^ \t\k]\@<!=\k\@==\@!" end="\k\@<==\@<!=" keepend
|
||||
syntax match orgVerbatim /^\s*: .*$/ keepend
|
||||
syntax region orgVerbatim matchgroup=orgBlockDelimiter start="^\s*#+BEGIN_.*" end="^\s*#+END_.*" keepend
|
||||
syntax region orgCode matchgroup=orgBlockDelimiter start="^\s*#+BEGIN_SRC" end="^\s*#+END_SRC" keepend
|
||||
syntax region orgCode matchgroup=orgBlockDelimiter start="^\s*#+BEGIN_EXAMPLE" end="^\s*#+END_EXAMPLE" keepend
|
||||
syntax region orgVerbatim matchgroup=orgBlockDelimiter start="\c^\s*#+BEGIN_.*" end="\c^\s*#+END_.*" keepend
|
||||
syntax region orgCode matchgroup=orgBlockDelimiter start="\c^\s*#+BEGIN_SRC" end="\c^\s*#+END_SRC" keepend
|
||||
syntax region orgCode matchgroup=orgBlockDelimiter start="\c^\s*#+BEGIN_EXAMPLE" end="\c^\s*#+END_EXAMPLE" keepend
|
||||
|
||||
highlight def link orgVerbatim Identifier
|
||||
highlight def link orgVerbatimDelimiter orgVerbatim
|
||||
@@ -61,7 +60,7 @@ highlight def link orgCodeDelimiter orgCode
|
||||
|
||||
" Comments
|
||||
syntax match orgComment /^\s*#\s\+.*$/ keepend
|
||||
syntax region orgComment matchgroup=orgBlockDelimiter start="^\s*#+BEGIN_COMMENT" end="^\s*#+END_COMMENT" keepend
|
||||
syntax region orgComment matchgroup=orgBlockDelimiter start="\c^\s*#+BEGIN_COMMENT" end="\c^\s*#+END_COMMENT" keepend
|
||||
highlight def link orgComment Comment
|
||||
|
||||
|
||||
@@ -86,6 +85,13 @@ highlight def link orgTodo Todo
|
||||
highlight def link orgTag Type
|
||||
|
||||
|
||||
" Lists
|
||||
syntax match orgUnorderedListMarker "^\s*[-+]\s\+" keepend contains=@Spell
|
||||
syntax match orgOrderedListMarker "^\s*\d\+[.)]\s\+" keepend contains=@Spell
|
||||
highlight def link orgUnorderedListMarker Statement
|
||||
highlight def link orgOrderedListMarker orgUnorderedListMarker
|
||||
|
||||
|
||||
" Timestamps
|
||||
syntax match orgTimestampActive /<\d\{4}-\d\{2}-\d\{2}.\{-}>/ keepend
|
||||
syntax match orgTimestampInactive /\[\d\{4}-\d\{2}-\d\{2}.\{-}\]/ keepend
|
||||
@@ -97,8 +103,13 @@ highlight def link orgTimestampInactive Comment
|
||||
syntax match orgHyperlink /\[\{2}\([^][]\{-1,}\]\[\)\?[^][]\{-1,}\]\{2}/ containedin=ALL contains=orgHyperLeft,orgHyperRight,orgHyperURL
|
||||
syntax match orgHyperLeft /\[\{2}/ contained conceal
|
||||
syntax match orgHyperRight /\]\{2}/ contained conceal
|
||||
syntax match orgHyperURL /[^][]\{-1,}\]\[/ contained conceal
|
||||
syntax match orgHyperURL /[^][]\{-1,}\]\[/ contains=orgHyperCentre contained conceal
|
||||
syntax match orgHyperCentre /\]\[/ contained conceal
|
||||
highlight def link orgHyperlink Underlined
|
||||
highlight def link orgHyperURL String
|
||||
highlight def link orgHyperCentre Comment
|
||||
highlight def link orgHyperLeft Comment
|
||||
highlight def link orgHyperRight Comment
|
||||
|
||||
|
||||
let b:current_syntax = 'org'
|
||||
|
||||
Reference in New Issue
Block a user