Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dbd8f08
commit 19476c1
Showing
7 changed files
with
473 additions
and
24 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,18 @@ | ||
The preferred way to contribute would be through GitHub pull requests, | ||
as an alternative patches can be discussed on the IRC channel. | ||
|
||
When contributing your first changes, please include an empty commit for | ||
copyright waiver using the following message (replace 'John Doe' with | ||
your name or nickname): | ||
|
||
John Doe Copyright Waiver | ||
|
||
I dedicate any and all copyright interest in this software to the | ||
public domain. I make this dedication for the benefit of the public at | ||
large and to the detriment of my heirs and successors. I intend this | ||
dedication to be an overt act of relinquishment in perpetuity of all | ||
present and future rights to this software under copyright law. | ||
|
||
The command to create an empty commit from the command-line is: | ||
|
||
git commit --allow-empty |
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,71 @@ | ||
# auto-pairs.kak | ||
|
||
Auto-paired characters for [Kakoune]. | ||
|
||
When inserting an opening pair, auto-pairs always inserts the closing pair, | ||
unless when under a word character or preceded by a **backslash**, and for non | ||
nestable characters (such as **apostrophes**), when preceded by word characters. | ||
|
||
Auto-pairing is also about pair navigation and editing (deleting existing pairs | ||
and formatting in pair). It can move in pair `(▌)`, delete in pair `(▌)` and | ||
post pair `()▌`, and pad in pair horizontally `(␣▌␣)` and vertically: | ||
``` | ||
… | ||
foobar { | ||
▌ | ||
} | ||
… | ||
``` | ||
. | ||
|
||
When inserting an auto-paired character, if the opening and closing characters | ||
are the same (such as double quote strings), auto-pairs will move right in pair | ||
`"▌"` and skip additional pairing post pair `"▌`. | ||
|
||
## Features | ||
|
||
- Auto-pairing | ||
- Vertical and horizontal padding | ||
- No `sh` call when typing | ||
|
||
## Dependencies | ||
|
||
- [prelude.kak] | ||
|
||
[prelude.kak]: https://github.com/alexherbo2/prelude.kak | ||
|
||
## Installation | ||
|
||
Add [`auto-pairs.kak`](rc/auto-pairs.kak) to your autoload or source it manually. | ||
|
||
``` kak | ||
require-module auto-pairs | ||
``` | ||
|
||
## Usage | ||
|
||
Enable auto-pairs with `auto-pairs-enable`. | ||
Auto-paired characters can be changed via the `auto_pairs` option. | ||
|
||
## Surrounding pairs | ||
|
||
By default, `auto_pairs` includes the following surrounding pairs: | ||
|
||
``` | ||
Parenthesis block: ( ) | ||
Braces block: { } | ||
Brackets block: [ ] | ||
Double quote string: " " | ||
Single quote string: ' ' | ||
Grave quote string: ` ` | ||
Double quotation mark: “ ” | ||
Single quotation mark: ‘ ’ | ||
Double angle quotation mark: « » | ||
Single angle quotation mark: ‹ › | ||
``` | ||
|
||
See also [surround.kak] and [manual-indent.kak]. | ||
|
||
[Kakoune]: https://kakoune.org | ||
[surround.kak]: https://github.com/alexherbo2/surround.kak | ||
[manual-indent.kak]: https://github.com/alexherbo2/manual-indent.kak |
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,24 @@ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
For more information, please refer to <https://unlicense.org/> |
Oops, something went wrong.