This repository has been archived by the owner on Dec 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
typora.txt
301 lines (223 loc) · 12 KB
/
typora.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
*typora.txt* Bindings for Typora's Markdown in Neovim
*typora*
*nvim-typora*
===============================================================================
0. Table of Contents *typora-toc*
1. About ................ |typora-about|
2. Usage ................ |typora-usage|
3. Examples ............. |typora-examples|
4. Configuration ........ |typora-configuration|
5. License .............. |typora-license|
6. Bugs ................. |typora-bugs|
7. Contributing ......... |typora-contributing|
8. Changelog ............ |typora-changelog|
9. Credits .............. |typora-credits|
================================================================================
1. About *typora-about*
|nvim-typora|:
- Author, Iron-E @ https://github.com/Iron-E & https://gitlab.com/Iron_E
- GitHub @ https://github.com/Iron-E/nvim-typora
|nvim-typora| is a Neovim |plugin| aimed at providing extended functionality
with the program Typora (https://typora.io). It allows the opening and
rendering of `markdown` files, live as they are edited from within Neovim.
|nvim-typora| requires Neovim 0.5+. Additional requirements are documented
alongside the features that require on them.
See: |ftplugin|
--------------------------------------------------------------------------------
USE CASE *typora-use-case*
This plugin may be right for you if you are interested in…
- Extended snippet support for Typora-specific markdown constructs.
- Previewing/Rendering markdown while you edit.
- Being able to export markdown to PDF using a variety of "themes".
- Quick access to helpful documentation for Typora, |LaTeX|, etc.
See: |typora-usage|
================================================================================
2. Usage *typora-usage*
The following sections outlines |typora-usage-commands| and
|typora-usage-functions| to assist in showcasing everything that this plugin can
do.
*typora-usage-links*
Additionally, here are some links to helpful documentation which will help you
write Markdown, LaTeX, Mermaid, and other markup formats which are useful when
using Typora:
Guide Link
-------- ----------------------------------------------------------------
LaTeX https://www.overleaf.com/learn/latex/Tutorials
Markdown https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
Mermaid https://mermaid-js.github.io/mermaid
PlantUML https://plantuml.com/
Typora https://typora.io
--------------------------------------------------------------------------------
COMMANDS *typora-usage-commands*
`:Typora` [{file}] *:Typora*
Open some {file} in a new window using Typora.
Arguments: ~
{file} Same as with |typora-open|.
NOTE: If {file} is blank, then it will default to the name of the
file opened in the current window.
`:TyporaMode` *:TyporaMode*
Open a |libmodal-prompt| which will provide |:command-completion| as you
type to select which template you would like to generate.
See |typora-snippets| for more details.
`:TableMode` *:TableMode*
Open a |libmodal-mode| which will provide convenient mappings for doing
complex operations on Markdown tables.
See |typora#table_mode()| for more details.
--------------------------------------------------------------------------------
FUNCTIONS *typora-usage-functions*
*typora-open*
`typora.open(`[{file}]`)` *typora.open()*
`typora#open(`[{file}]`)` *typora#open()*
Open a {file} in a new window using Typora.
`typora.open()` is accessed using |lua| and this plugin's `typora` module: >
-- Lua
local typora = require('typora')
typora.open('./path/to/file.md')
<
`typora#open()` is accessed using |:call| from a Vimscript file: >
" Vimscript
call typora#open('./path/to/file.md')
<
Parameters: ~
{file} Describes the path to the file which should be opened.
NOTE: If unspecified, {file} default to the open file in the
current |window|.
`typora.snippet_mode()` *typora.snippet_mode:enter()*
`typora#snippet_mode()` *typora#snippet_mode()*
Open a |libmodal-prompt| which will provide |:command-completion| as you
type to select which template you would like to generate.
NOTE: Depending on the kind of snippet, additional prompts may spawn. For
example, the table snippet will ask how many columns are desired.
The code-block snippet will ask what language the code is for.
`typora.snippet_mode:enter()` is accessed using |lua| and this plugin's
`typora` module: >
-- Lua
local typora = require('typora')
typora.snippet_mode:enter()
<
See also: ~
- |append()|, the function used as the backbone of the snippet
implementation.
- |libmodal-prompt|, the command prompt implementation.
- |libmodal-lua-Prompt.enter()|, the command used to enter the prompt.
*typora-snippets*
`typora.table_mode()` *typora.table_mode()*
`typora#table_mode()` *typora#table_mode()*
Open a |libmodal-mode| which will provide convenient mappings for doing
complex operations on Markdown tables.
Below are the mappings and their functions:
Mapping Function
------------ -------------------------------
`0`, `_`, `^`, `H` Move to first column
`h`, <Left> Move to previous column
`l`, <Right> Move to next column
`$`, `L` Move to last column
`i` Insert column behind.
`a` Insert column ahead.
`I` Insert column at the beginning.
`A` Insert column at the end.
`r` Insert new row.
`s` Sort the rows.
`u` Undo
`<`, <S-Left> Move column left.
`>`, <S-Right> Move column right.
`{` Move column to the beginning.
`}` Move column to the end.
================================================================================
3. Examples *typora-examples*
None right now.
================================================================================
4. Configuration *typora-configuration*
None right now.
================================================================================
5. License *typora-license*
nvim-typora — Bindings for Typora's Markdown in Neovim
Copyright © 2020 Iron-E
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
================================================================================
6. Bugs *typora-bugs*
None right now.
================================================================================
7. Contributing *typora-contributing*
The following describes what should be done if an individual wishes to
contribute something to the `Iron-E/nvim-libmodal` repository.
--------------------------------------------------------------------------------
CODE *typora-contributing-code*
Bugfixes ~
If you discover a bug and believe you know the solution to fixing it, then
submit a bug report and state that you are working on a fix (and what that
fix might be), and what general timeframe the fix may be completed in
(months, weeks, days, etc.).
When the fix is complete, submit a PR that references the issue you
submitted.
Features ~
If there is a feature you would like to be a part of |typora|, the best
thing you can do is submit a feature request, and then state that you are
working on a pull request (PR) so others don't attempt to do the same work
at the same time.
When you believe your feature is complete, write some examples for it in
the `examples/lua` folder, and add them to |typora-examples| as
appropriate.
Assure that all existing |typora-examples| continue to work with your
feature, unless a breaking change was discussed on the feature request.
If you need help getting them to pass, you can ask for help on the PR.
Reference the issue you submitted on the PR so that the two show up
together when looking back at the history.
Contributing documentation is not necessary but appreciated, since the
person who knows the most about the feature being implemented is most
likely the one implementing it.
--------------------------------------------------------------------------------
DOCUMENTATION *typora-contributing-documentation*
If there is a problem with the documentation, or you see an area where it
could be improved, don't hesitate to submit an issue and a PR. At the very
least it will exist in history if such an issue comes up again, and likely it
will serve to help yourself and others with more clear and concise wording, or
with more helpful and practical examples.
--------------------------------------------------------------------------------
ISSUES *typora-contributing-issues*
Issues are greatly welcomed on the GitHub repository, whether they are bug
reports, feature requests, documentation improvements, or misunderstandings:
it's all good to have in the archive.
When submitting an issue, please describe the following:
1. Context regarding the issue (how you discovered it, pertinent information,
etc.)
2. Detailed description of the issue.
3. Steps to reproduce (if applicable).
4. Expected behavior (if applicable).
5. Attached media (screenshots, logs, etc.) (if applicable).
================================================================================
8. Changelog *typora-changelog*
0.2.0 ~
Additions: ~
- |libmodal| bindings with `:TableMode`.
- Various bug fixes.
0.1.0 ~
Additions: ~
- |libmodal| bindings with `:TyporaMode`
- Open Typora from Neovim using `:Typora`
================================================================================
9. Credits *typora-credits*
Credit Reason
--------------------------- ----------------------------------------
iamcco/vim-language-server Vimscript language server.
Iron-E Primary contibuter/maintainer.
mermaid-js/mermaid Ability to embed graphics into Markdown.
neovim/neovim Development platform provider.
neovim/nvim-lspconfig Development environment provider.
Roberto Ierusalimschy "Programming In Lua: 5.1".
www.stackoverflow.com Vimscript and |Lua| reference.
Steve Losh "Learn Vimscript The Hard Way".
sumneko/lua-language-server Lua langauge server.
tbastos/vim-lua Syntax highlighting for |Lua|.
https://typora.io Typora development.
================================================================================
vim:tw=80:ts=4:ft=help:norl: