-
Notifications
You must be signed in to change notification settings - Fork 702
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'Screwtapello/extensible-docs' into master
- Loading branch information
Showing
6 changed files
with
139 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
= Automatically restore unsaved work after a crash. | ||
|
||
When Kakoune crashes, it automatically writes out unsaved changes to backup | ||
files with predictable names. When you edit a file, if such a backup file | ||
exists, this plugin will automatically load the content of the backup file | ||
instead. | ||
|
||
By default, backup files are deleted when restored. You can set the | ||
`autorestore_purge_restored` option to `false` to prevent this. | ||
|
||
If you don't want backups to be restored automatically, use the | ||
`autorestore-disable` command to disable the feature for the current session, | ||
or put it in your `kakrc` to disable the feature forever. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
= Kakoune's online documentation | ||
|
||
This is Kakoune's online documentation system. | ||
|
||
To see what documentation topics are available, type `:doc` and look at the | ||
completion menu. To view the a particular documentation topic, type the topic | ||
name or choose it from the completion menu and hit Enter. | ||
|
||
Documentation will be displayed in the client named in the `docsclient` option. | ||
|
||
== Using the documentation browser | ||
|
||
Documentation buffers are like any other buffer, so you can scroll through them | ||
as normal, search within a topic with `/`, etc. However, they can also contain | ||
links, <<doc#demonstration-target,like this>>. When you see a link, you can | ||
follow it by moving the cursor onto it and pressing Enter. If the link takes you | ||
to a different documentation topic, you can get back by using the `:buffer` | ||
command. | ||
|
||
== Writing documentation | ||
|
||
Documentation must be in AsciiDoc format, with the extension `.asciidoc`, | ||
and stored somewhere within <<doc#sources,the documentation search path>>. | ||
Kakoune's built-in documentation renderer does not necessarily support every | ||
feature, so don't go overboard with formatting. | ||
|
||
To create a link to another documentation topic, the URL should be the topic- | ||
name, just like `:doc` uses. Because topics are identified | ||
only by their basename, you should take care that your topic's name does not | ||
collide with any of the names used by other plugins or Kakoune's standard | ||
library. | ||
|
||
== Sources | ||
|
||
The `:doc` command searches within the following locations for | ||
documents in the AsciiDoc format (`*.asciidoc`): | ||
|
||
* The user plugin directory, `"%val{config}/autoload"` | ||
* The system documentation directory, `"%val{runtime}/doc"` | ||
* The system plugin directory, `"%val{runtime}/rc"` | ||
|
||
It searches recursively, and follows symlinks. | ||
|
||
== Demonstration target | ||
|
||
Well done! You can <<doc#using-the-documentation-browser,go back now>>! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
= Integrate with tools that check files for problems. | ||
|
||
Many file-formats have "lint" tools that check for common problems and point out | ||
where they occur. Most of these tools produce output in the traditional message | ||
format: | ||
|
||
---- | ||
{filename}:{line}:{column}: {kind}: {message} | ||
---- | ||
|
||
If the 'kind' field contains 'error', the message is treated as an error, | ||
otherwise it is assumed to be a warning. | ||
|
||
The `:lint-buffer` and `:lint-selections` commands will run the shell command | ||
specified in the `lintcmd` option, passing it the path to a temporary file | ||
containing the text to be linted. The results are collected in the | ||
`*lint-output*` buffer, and analyze it. If `toolsclient` is set, the | ||
`*lint-output*` buffer will be displayed in the named client. | ||
|
||
Each reported error or warning causes a marker to appear in the left-hand | ||
margin of the buffer that was checked. When the main cursor moves onto that | ||
line, the associated messages are displayed. If they get distracting, you can | ||
turn off the markers and messages with the `:lint-hide-diagnostics` command. | ||
|
||
You can also use `:lint-next-message` and `:lint-previous-message` to jump | ||
between the lines with messages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters