-
Notifications
You must be signed in to change notification settings - Fork 0
/
marktext.txt
233 lines (173 loc) · 9.78 KB
/
marktext.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
*marktext.txt* Bindings for Marktext's Markdown in Neovim
*marktext*
*nvim-marktext*
===============================================================================
0. Table of Contents *marktext-toc*
1. About ................ |marktext-about|
2. Usage ................ |marktext-usage|
3. License .............. |marktext-license|
4. Contributing ......... |marktext-contributing|
5. Credits .............. |marktext-credits|
================================================================================
1. About *marktext-about*
|nvim-marktext|:
- Author, Iron-E @ https://github.com/Iron-E & https://gitlab.com/Iron_E
- GitHub @ https://github.com/Iron-E/nvim-marktext
|nvim-marktext| is a Neovim |plugin| aimed at providing extended functionality
with the program Marktext (https://marktext.app). It allows the opening and
rendering of `markdown` files, live as they are edited from within Neovim.
|nvim-marktext| requires Neovim 0.5+. Additional requirements are documented
alongside the features that require on them.
See: |ftplugin|
--------------------------------------------------------------------------------
USE CASE *marktext-use-case*
This plugin may be right for you if you are interested in…
- Extended snippet support for Marktext-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 Marktext, |LaTeX|, etc.
See: |marktext-usage|
================================================================================
2. Usage *marktext-usage*
The following sections outlines |marktext-usage-commands| and
|marktext-usage-functions| to assist in showcasing everything that this plugin can
do.
*marktext-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 Marktext:
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/
Marktext https://marktext.app
--------------------------------------------------------------------------------
COMMANDS *marktext-usage-commands*
`:Marktext` [{file}] *:Marktext*
Open some {file} in a new window using Marktext.
Arguments: ~
{file} Same as with |marktext-open|.
NOTE: If {file} is blank, then it will default to the name of the
file opened in the current window.
`:MarktextMode` *:MarktextMode*
Open a |libmodal-prompt| which will provide |:command-completion| as you
type to select which template you would like to generate.
See |marktext-snippets| for more details.
--------------------------------------------------------------------------------
FUNCTIONS *marktext-usage-functions*
*marktext-open*
`marktext.open(`[{file}]`)` *marktext.open()*
`marktext#open(`[{file}]`)` *marktext#open()*
Open a {file} in a new window using Marktext.
`marktext.open()` is accessed using |lua| and this plugin's `marktext` module: >
-- Lua
local marktext = require('marktext')
marktext.open('./path/to/file.md')
<
`marktext#open()` is accessed using |:call| from a Vimscript file: >
" Vimscript
call marktext#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|.
`marktext.snippet_mode()` *marktext.snippet_mode:enter()*
`marktext#snippet_mode()` *marktext#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.
`marktext.snippet_mode:enter()` is accessed using |lua| and this plugin's
`marktext` module: >
-- Lua
local marktext = require('marktext')
marktext.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.
================================================================================
3. License *marktext-license*
nvim-marktext — Bindings for Marktext'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/>.
================================================================================
4. Contributing *marktext-contributing*
The following describes what should be done if an individual wishes to
contribute something to the `Iron-E/nvim-libmodal` repository.
--------------------------------------------------------------------------------
CODE *marktext-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 |marktext|, 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 |marktext-examples| as
appropriate.
Assure that all existing |marktext-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 *marktext-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 *marktext-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).
================================================================================
5. Credits *marktext-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://marktext.app Marktext development.
================================================================================
vim:tw=80:ts=4:ft=help:norl: