diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2023-01-11 07:23:55 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2023-01-11 07:45:29 +0100 |
commit | 7ecd199d7838f1669a45a2353362ec19241d45db (patch) | |
tree | af1ad25cc4d984b462eec4e1de6f16b67a648a20 | |
parent | 7fb0af9425010d406198c9e440990196722e7150 (diff) | |
download | vis-toggler-7ecd199d7838f1669a45a2353362ec19241d45db.tar.gz |
Add README.md and LICENSE
-rw-r--r-- | LICENSE | 22 | ||||
-rw-r--r-- | README.md | 50 |
2 files changed, 72 insertions, 0 deletions
@@ -0,0 +1,22 @@ +Copyright © 2022 Matěj Cepl, mcepl at cepl dot eu + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +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 OR COPYRIGHT +HOLDERS 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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..6ba06b0 --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +Improved versions of <C-a>, <C-x>, ~, g~, gu, and gU. + +They are all implemented as operators, which allows for composing +with motions/textobjecs, dot-repeating, and better undo. + +Also, <C-a> and <C-x> are configurable and can "increment" and +"decrement" not only numbers but words as well. + +# Installation + +If you don't want word toggling: + +```lua +require('vis-toggler') +``` + +If you do: + +```lua +toggler_config = require('vis-toggler.example') +toggler = require('vis-toggler') +toggler.config = toggler_config +``` + +The table to assign to config need not come from a separate +configuration file, it can be defined in and manipulated from +within visrc.lua as well. + +Decimal and hexadecimal numbers are supported. If a number has +leading zeros, its width is preserved. + +The letter case of a hex number is either that of any existing +letters, of letters in the last inc-/decremented hex number (if +any), or of the base prefix (0x or 0X). + +# Ideas for improvement + +Improve <C-a>/<C-x> to support filetype-specific radix notation +and sets of words. Add option to force hexadecimal base even +without explicit prefix. + +--- + +Friendly fork of https://repo.or.cz/vis-toggler.git (I hope, the +upstream will merge it back). + +All issues, questions, complaints, or (even better!) patches +should be send via email to +[~mcepl/devel@lists.sr.ht](mailto:~mcepl/devel@lists.sr.ht) email +list (for patches use [git send-email](https://git-send-email.io/)). |