Rename :EasyAlignRight to :EasyAlign!

This commit is contained in:
Junegunn Choi
2013-08-04 18:04:56 +09:00
parent badb701721
commit 06d5bcb911
4 changed files with 22 additions and 23 deletions

View File

@@ -35,8 +35,8 @@ Bundle 'junegunn/vim-easy-align'
Usage Usage
----- -----
_vim-easy-align_ defines `:EasyAlign` and `:EasyAlignRight` commands in the _vim-easy-align_ defines `:EasyAlign` command (and the right-justification
visual mode. variant `:EasyAlign!`) in the visual mode.
| Mode | Command | | Mode | Command |
| ------------------------- | --------------------------------------------- | | ------------------------- | --------------------------------------------- |
@@ -46,7 +46,7 @@ visual mode.
### Interactive mode ### Interactive mode
The commands will go into the interactive mode when no argument is given. The command will go into the interactive mode when no argument is given.
For convenience, it is advised that you define a mapping for triggering it in For convenience, it is advised that you define a mapping for triggering it in
your `.vimrc`. your `.vimrc`.
@@ -82,20 +82,20 @@ Alignment rules for the following delimiters have been defined to meet the most
#### Example command sequences #### Example command sequences
| With visual map | Description | Equivalent command | | With visual map | Description | Equivalent command |
| ------------------- | -------------------------------------------------------- | ------------------------- | | ------------------- | -------------------------------------------------------- | --------------------- |
| `<Enter><space>` | Alignment around 1st whitespaces | `:'<,'>EasyAlign\ ` | | `<Enter><space>` | Alignment around 1st whitespaces | `:'<,'>EasyAlign\ ` |
| `<Enter>2<space>` | Alignment around 2nd whitespaces | `:'<,'>EasyAlign2\ ` | | `<Enter>2<space>` | Alignment around 2nd whitespaces | `:'<,'>EasyAlign2\ ` |
| `<Enter>-<space>` | Alignment around the last whitespaces | `:'<,'>EasyAlign-\ ` | | `<Enter>-<space>` | Alignment around the last whitespaces | `:'<,'>EasyAlign-\ ` |
| `<Enter>:` | Alignment around 1st colon | `:'<,'>EasyAlign:` | | `<Enter>:` | Alignment around 1st colon | `:'<,'>EasyAlign:` |
| `<Enter>=` | Alignment around 1st equals signs (and the likes) | `:'<,'>EasyAlign=` | | `<Enter>=` | Alignment around 1st equals signs (and the likes) | `:'<,'>EasyAlign=` |
| `<Enter>2=` | Alignment around 2nd equals signs (and the likes) | `:'<,'>EasyAlign2=` | | `<Enter>2=` | Alignment around 2nd equals signs (and the likes) | `:'<,'>EasyAlign2=` |
| `<Enter>3=` | Alignment around 3rd equals signs (and the likes) | `:'<,'>EasyAlign3=` | | `<Enter>3=` | Alignment around 3rd equals signs (and the likes) | `:'<,'>EasyAlign3=` |
| `<Enter>*=` | Alignment around all equals signs (and the likes) | `:'<,'>EasyAlign*=` | | `<Enter>*=` | Alignment around all equals signs (and the likes) | `:'<,'>EasyAlign*=` |
| `<Enter>**=` | Left-right alternating alignment around all equals signs | `:'<,'>EasyAlign**=` | | `<Enter>**=` | Left-right alternating alignment around all equals signs | `:'<,'>EasyAlign**=` |
| `<Enter><Enter>=` | Right-justified alignment around 1st equals signs | `:'<,'>EasyAlignRight=` | | `<Enter><Enter>=` | Right-justified alignment around 1st equals signs | `:'<,'>EasyAlign!=` |
| `<Enter><Enter>**=` | Right-left alternating alignment around all equals signs | `:'<,'>EasyAlignRight**=` | | `<Enter><Enter>**=` | Right-left alternating alignment around all equals signs | `:'<,'>EasyAlign!**=` |
| ... | ... | | | ... | ... | |
### Non-interactive mode ### Non-interactive mode

View File

@@ -7,7 +7,7 @@ A simple, easy-to-use Vim alignment plugin without too much ambition.
Source: https://github.com/junegunn/vim-easy-align Source: https://github.com/junegunn/vim-easy-align
EasyAlign *EasyAlign* EasyAlign *:EasyAlign*
------------------------------------------------------------------------- -------------------------------------------------------------------------
vim-easy-align defines `:EasyAlign` command in the visual mode. vim-easy-align defines `:EasyAlign` command in the visual mode.
@@ -61,10 +61,10 @@ Examples:
<Enter><Enter>**= Right-left alternating alignment around all equals signs <Enter><Enter>**= Right-left alternating alignment around all equals signs
EasyAlignRight *EasyAlignRight* EasyAlign! *:EasyAlign!*
------------------------------------------------------------------------- -------------------------------------------------------------------------
EasyAlignRight is the right-justified version of EasyAlign command. :EasyAlign! is the right-justification version of :EasyAlign command.
Non-interactive mode Non-interactive mode

View File

@@ -26,5 +26,4 @@ if exists("g:loaded_easy_align_plugin")
endif endif
let g:loaded_easy_align_plugin = 1 let g:loaded_easy_align_plugin = 1
command! -nargs=* -range EasyAlign <line1>,<line2>call easy_align#align(0, <q-args>) command! -nargs=* -range -bang EasyAlign <line1>,<line2>call easy_align#align('<bang>' == '!', <q-args>)
command! -nargs=* -range EasyAlignRight <line1>,<line2>call easy_align#align(1, <q-args>)

View File

@@ -1 +1 @@
4Gvipjyvip:EasyAlign: 4Gvipjyvip:EasyAlign: