9 Commits
v1.4 ... v1.5

Author SHA1 Message Date
Alex Vear
5e1d9fb5fb Update docs for v1.5 2021-03-11 19:46:15 +00:00
Alex Vear
bab85fda8a Update doc file to mention alphabetical ordered list bullets
Related: #4
2021-03-11 19:39:47 +00:00
Alex Vear
82f7f89e4d Make alphabetical bullets optional (and restrict to single character)
Related: #4
2021-03-11 19:25:57 +00:00
István Donkó
5af62cc9b9 Alphabetical ordered list bullets (#4) 2021-03-11 19:25:40 +00:00
Alex Vear
e146fd2ee3 Mention syntax and filetype options to enable all features 2021-01-19 20:01:11 +00:00
Alex Vear
61f5467543 Add a .gitignore file to ignore samples directory 2020-10-26 20:20:03 +00:00
Alex Vear
0af5ca0324 Add option to disable (La)TeX syntax highlighting 2020-09-08 19:47:57 +01:00
Alex Vear
f50c700b87 Minor wording tweak and TODO file update 2020-09-08 19:47:26 +01:00
Alex Vear
42315ab08c Remove pointless (and inaccurate) paragraph on folding in help doc 2020-08-25 22:45:43 +01:00
5 changed files with 82 additions and 27 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
samples/

View File

@@ -1,6 +1,6 @@
#+TITLE: Org mode and Outline mode syntax highlighting for Vim
Org.vim is a very minimal [[https://orgmode.org][Org mode]] and
Org.vim is a 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.
@@ -28,6 +28,14 @@ git clone https://github.com/axvr/org.vim ~/.vim/pack/plugins/start/org
vim +'helptags ~/.vim/pack/plugins/start/org/doc/' +q
#+END_SRC
Make sure the following options are set in your vimrc to enable all
functionality:
#+BEGIN_SRC vim
syntax enable
filetype plugin indent on
#+END_SRC
Once installed check out the Org.vim manual (run ~:help org.txt~ to open it) for
usage information and configuration options.

20
TODO
View File

@@ -1,12 +1,12 @@
MAYBE:
- Highlight groups:
- Syntax highlight checkboxes and checkbox cookies
- Separate syntax group for heading delimiters
- Syntax highlight and indent "properties"
- Inline blocks
- Try to get text attributes to stack (e.g. underlined text in bold text)
- Close inline block using same number of starting delimiters.
- Set a max number of lines to search for end delimiter for bold/italic/etc. to 3 (might not be possible)
* Future
- Syntax highlight checkboxes and checkbox cookies
- Separate syntax group for heading delimiters
- Syntax highlight and indent "properties"
UNLIKELY:
* Maybe
- Implement Emacs's abbreviations (e.g. '\<s<TAB>')
* Impossible?
- Try to get text attributes to stack (e.g. underlined text in bold text)
- Close inline block using same number of starting delimiters.
- Set a max number of lines to search for end delimiter for bold/italic/etc. to 3 (might not be possible)

View File

@@ -16,7 +16,7 @@ Welcome to the org.vim user manual. *org* *org.vim* *vim-org* *out
==============================================================================
1. INTRODUCTION *org-intro*
Org.vim is a very minimal Org mode [2] and Outline mode [1] plugin for Vim
Org.vim is a minimal Org mode [2] and Outline mode [1] plugin for Vim
providing only syntax highlighting and folding.
This plugin aims to replicate Vim's existing Markdown editing experience on
@@ -37,6 +37,12 @@ enable it manually.
>
:set filetype=outline
<
Just make sure the following options are set in your vimrc to enable all
functionality offered by this plugin:
>
syntax enable
filetype plugin indent on
<
==============================================================================
3. CONFIGURATION *org-configuration*
@@ -45,15 +51,10 @@ enable it manually.
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'.
For example if you want to enable or disable folding, just set '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|.
------------------------------------------------------------------------------
@@ -127,9 +128,48 @@ To disable italics only in a single buffer, use this instead:
>
let b:org_use_italics = 0
<
------------------------------------------------------------------------------
*'b:org_highlight_tex'* *'g:org_highlight_tex'*
Value: numeric~
Default: 1~
Enable/disable syntax highlighting of inline (La)TeX blocks[4]. This option
exists as some Org mode users don't use TeX and may find the highlighting
annoying.
To disable for all Org mode files place the following line in your vimrc:
>
let g:org_highlight_tex = 0
<
To disable only in a single buffer, use this instead:
>
let b:org_highlight_tex = 0
<
------------------------------------------------------------------------------
*'b:org_list_alphabetical_bullets'* *'g:org_list_alphabetical_bullets'*
Value: numeric~
Default: 0~
Enable/disable alphabetical bullets on ordered lists. This is disabled by
default like in Emacs.
To enable for all Org mode files place the following line in your vimrc:
>
let g:org_list_alphabetical_bullets = 1
<
To enable only in a single buffer, use this instead:
>
let b:org_list_alphabetical_bullets = 1
<
==============================================================================
4. CHANGE LOG *org-changelog*
v1.5 [2021-03-11]~
* Added support for alphabetical ordered list bullets. (Thanks Isti115!)
* Option to disable (La)TeX highlighting. (See: |g:org_highlight_tex|)
* Doc update.
v1.4 [2020-08-24]~
* Render "strikethrough" text as "struck through".
@@ -193,6 +233,7 @@ works are:
[1]: <https://www.gnu.org/software/emacs/manual/html_node/emacs/Outline-Mode.html>
[2]: <https://orgmode.org/>
[3]: <http://vimdoc.sourceforge.net/htmldoc/uganda.html#license>
[4]: <https://orgmode.org/manual/LaTeX-fragments.html>
------------------------------------------------------------------------------
vim:et:ts=4:sts=4:sw=4:tw=78:ft=help:norl:

View File

@@ -92,6 +92,9 @@ highlight def link orgTag Type
" Lists
syntax match orgUnorderedListMarker "^\s*[-+]\s\+" keepend contains=@Spell
syntax match orgOrderedListMarker "^\s*\d\+[.)]\s\+" keepend contains=@Spell
if org#option('org_list_alphabetical_bullets', 0)
syntax match orgOrderedListMarker "^\s*\a[.)]\s\+" keepend contains=@Spell
endif
highlight def link orgUnorderedListMarker Statement
highlight def link orgOrderedListMarker orgUnorderedListMarker
@@ -122,15 +125,17 @@ highlight def link orgHyperRight Comment
" TeX
" Ref: https://orgmode.org/manual/LaTeX-fragments.html
syntax include @LATEX syntax/tex.vim
syntax region orgMath start="\\begin\[.*\]{.*}" end="\\end{.*}" keepend contains=@LATEX
syntax region orgMath start="\\begin{.*}" end="\\end{.*}" keepend contains=@LATEX
syntax region orgMath start="\\\[" end="\\\]" keepend contains=@LATEX
syntax region orgMath start="\\(" end="\\)" keepend contains=@LATEX
syntax region orgMath start="\S\@<=\$\|\$\S\@=" end="\S\@<=\$\|\$\S\@=" keepend oneline contains=@LATEX
syntax region orgMath start=/\$\$/ end=/\$\$/ keepend contains=@LATEX
syntax match orgMath /\\\$/ conceal cchar=$
highlight def link orgMath String
if org#option('org_highlight_tex', 1)
syntax include @LATEX syntax/tex.vim
syntax region orgMath start="\\begin\[.*\]{.*}" end="\\end{.*}" keepend contains=@LATEX
syntax region orgMath start="\\begin{.*}" end="\\end{.*}" keepend contains=@LATEX
syntax region orgMath start="\\\[" end="\\\]" keepend contains=@LATEX
syntax region orgMath start="\\(" end="\\)" keepend contains=@LATEX
syntax region orgMath start="\S\@<=\$\|\$\S\@=" end="\S\@<=\$\|\$\S\@=" keepend oneline contains=@LATEX
syntax region orgMath start=/\$\$/ end=/\$\$/ keepend contains=@LATEX
syntax match orgMath /\\\$/ conceal cchar=$
highlight def link orgMath String
endif
let b:current_syntax = 'org'