Skip to content

Commit c490c5d

Browse files
committed
DOC: update documentation
1 parent 8b0e5fd commit c490c5d

2 files changed

Lines changed: 68 additions & 15 deletions

File tree

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
A Vim plugin for the [Stan probabilistic programming
44
language](https://mc-stan.org/).
55

6-
![Screenshot of stan-vim syntax
7-
highlighting](https://raw.github.com/eigenfoo/stan-vim/master/screenshots/screenshot.png)
6+
<p align="center">
7+
<img src="https://raw.github.com/eigenfoo/stan-vim/master/screenshots/screenshot.png" alt="Screenshot of stan-vim syntax highlighting">
8+
</p>
89

910
## Table of Contents
1011

@@ -18,9 +19,9 @@ highlighting](https://raw.github.com/eigenfoo/stan-vim/master/screenshots/screen
1819

1920
## Features
2021

21-
1. Syntax highlighting
22-
1. Automatic indentation
23-
1. Code folding
22+
1. Syntax highlighting of Stan types, keywords and built-in functions.
23+
1. Automatic indentation consistent the recommended Stan code style.
24+
1. Folding via code indentation.
2425

2526
## Installation
2627

doc/stan.txt

Lines changed: 62 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,27 @@
2727
CONTENTS *stan-contents*
2828

2929
1. Introduction.....................................|stan-intro|
30-
2. Install..........................................|stan-install|
31-
3. License..........................................|stan-license|
32-
4. Contributing.....................................|stan-contrib|
33-
5. Credits..........................................|stan-credits|
30+
2. Installation.....................................|stan-install|
31+
3. About............................................|stan-about|
32+
4. License..........................................|stan-license|
33+
5. Contributing.....................................|stan-contrib|
34+
6. Credits..........................................|stan-credits|
3435

3536
===============================================================================
3637
INTRODUCTION *stan-intro*
3738

39+
Vim plugin for the Stan (http://mc-stan.org) probabilistic programming language.
40+
3841
Homepage: https://github.com/eigenfoo/stan-vim
3942

40-
Vim plugin for the Stan (http://mc-stan.org) probabilistic programming language.
43+
Features include:
4144

42-
* Syntax highlighting
43-
* Automatic indentation
44-
* Code folding
45+
* Syntax highlighting of Stan types, keywords and built-in functions.
46+
* Automatic indentation consistent the recommended Stan code style.
47+
* Folding via code indentation.
4548

4649
===============================================================================
47-
INSTALL *stan-install*
50+
INSTALLATION *stan-install*
4851

4952
* For Vundle users, place this in your `.vimrc`:
5053

@@ -65,6 +68,35 @@ INSTALL *stan-install*
6568

6669
* For manual installation, copy all files into your `~/.vim` directory.
6770

71+
===============================================================================
72+
ABOUT *stan-about*
73+
74+
* stan-vim supports syntax highlighting of Stan types, keywords and built-in
75+
functions, including sampling statements and random number generators. All
76+
syntax is manually defined in `syntax/stan.vim`.
77+
78+
- Refer to `syntax/stan.vim` for details.
79+
80+
* stan-vim supports automatic indentation consistent the recommended Stan code
81+
style: that is, 2 spaces and no tabs.
82+
83+
- This is achieved by `setlocal expandtab`, and locally setting `tabstop`
84+
and `shiftwidth` variables to 2.
85+
86+
- Furthermore, Vim will reindent when "closing characters" (such as `then`,
87+
`else, and `}`) are entered. This is achieved by locally setting
88+
`indentkeys`.
89+
90+
- Refer to `indent/stan.vim` for details.
91+
92+
* stan-vim supports folding via code indentation: that is, Vim will use code
93+
indentation to determine which lines to fold. Thus, folding is dependent on
94+
the recommended (or at least, consistent) indentation of Stan programs.
95+
96+
- This is achieved by `setlocal foldmethod=indent`.
97+
98+
- Refer to `ftplugin/stan/folding.vim` for details.
99+
68100
===============================================================================
69101
LICENSE *stan-license*
70102

@@ -75,11 +107,31 @@ stan-vim is distributed under the MIT license. See the license file on GitHub:
75107
===============================================================================
76108
CONTRIBUTING *stan-contrib*
77109

110+
stan-vim is developed and maintained in a public repository on GitHub.
111+
112+
https://github.com/eigenfoo/stan-vim
113+
114+
If you have a bug report, feature request or other question, please file an
115+
issue on GitHub:
116+
117+
https://github.com/eigenfoo/stan-vim/issues
118+
119+
If you would like to send a patch or other code contribution to stan-vim, please
120+
submit a pull request through GitHub:
121+
122+
https://github.com/eigenfoo/stan-vim/pulls
78123

79124
===============================================================================
80125
CREDITS *stan-credits*
81126

82-
* Other Vim plugins for inspiration (stan.vim, mc-stan.vim, elm.vim)
83127
* stan-vim contributors:
84128

85129
https://github.com/eigenfoo/stan-vim/graphs/contributors
130+
131+
* Steve Losh for his book, Learn Vimscript the Hard Way
132+
133+
http://learnvimscriptthehardway.stevelosh.com/
134+
135+
* Other Vim plugins for inspiration (specifically, stan.vim, mc-stan.vim and
136+
elm.vim)
137+

0 commit comments

Comments
 (0)