From 4db673f4593f7bad3329d7010ca28cc04ec2df56 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 12 Apr 2013 00:20:42 +0900 Subject: [PATCH] documentation --- .gitattributes | 4 +++ .gitignore | 1 + README.md | 2 +- doc/lesser_align.txt | 61 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 doc/lesser_align.txt diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8ea7806 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +.gitattributes export-ignore +.gitignore export-ignore +doc/tags export-ignore +README.md export-ignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..926ccaa --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +doc/tags diff --git a/README.md b/README.md index 2cf84c7..a91bad5 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ vim-lesser-align Yet another Vim alignment plugin without too much ambition. This plugin clearly has less features than the other pre-existing ones with the similar goals, -but it is simpler, easier to use, and good enough for the most of the cases. +but it is simpler, easier to use, and good enough (or even better) for the most of the cases. Usage ----- diff --git a/doc/lesser_align.txt b/doc/lesser_align.txt new file mode 100644 index 0000000..c9f8354 --- /dev/null +++ b/doc/lesser_align.txt @@ -0,0 +1,61 @@ +vim-lesser-align *vim-lesser-align* *lesser-align* +========================================================================= + +Author: Junegunn Choi + +Yet another Vim alignment plugin without too much ambition. + +This plugin clearly has less features than the other pre-existing ones +with the similar goals, but it is simpler, easier to use, and good enough +(or even better) for the most of the cases. + +https://github.com/junegunn/vim-lesser-align + + +LesserAlign *LesserAlign* +------------------------------------------------------------------------- + +Vim-lesser-align defines `LesserAlign` command in the visual mode. +For convenience, it is advised that you define a mapping for triggering +it in your .vimrc. + + vnoremap :LesserAlign + +Then a key sequence becomes a combination of 3 parts. + +1. + - Shortcut for `:LesserAssign` +2. Integer (optional, default: 1) + 1 Alignment around 1st delimiter + 2 Alignment around 2nd delimiter + ... + * Alignment around all delimiters (tabularize) +3. Delimiter + = Operators containing equals sign (=, ==, !=, +=, &&=, ...) + + : + , + | + +Examples: + + = Alignment around 1st equals sign (and the likes) + 2= Alignment around 2nd equals sign (and the likes) + 3= Alignment around 3rd equals sign (and the likes) + *= Alignment around all equals signs (and the likes) + Alignment around 1st whitespace + 2 Alignment around 2nd whitespace + : Alignment around 1st colon + + +Defining custom alignment rules +------------------------------------------------------------------------- + + let g:lesser_align_delimiters = { + \ 'x': { + \ 'pattern': '[xX]', + \ 'margin_left': ' <<<', + \ 'margin_right': '>>> ', + \ 'stick_to_left': 0 + \ } + \ }