Https://github.com/junegunn/vim-easy-align
Install with Vundle, add below to VIMRC
Plugin ' Junegunn/vim-easy-align ' "Start interactive easyalign in visual mode (e.g. VIPGA) xmap ga <Plug> (easyalign)" Start Interactive easyalign for a Motion/text object (e.g. gaip) nmap ga <Plug> (easyalign)
I feel like it's a little hard to learn.
Select multiple rows with V first
GA enters easyalign mode
Default to the left, such as by a space to its *<space>
Right to its <enter>*<space>
Centered on its <enter><enter>*<space>
If you encounter other characters such as | , = What, the space is replaced by the corresponding can
* Can be converted to numbers, corresponding to the next number of characters, * is all specified
Like this one.
| option| Type | Default | Description | | --|--|--|--|| Threads | Fixnum | 1 | Number of threads in the thread pool | | Queues | Fixnum | 1 | Number of concurrent Queues | | Queue_size | Fixnum | 1000 | Size of each queue | | Interval | Numeric | 0 | Dispatcher interval for batch processing | | Batch | Boolean | False | Enables batch processing mode | |batch_size | Fixnum | Nil | Number of maximum items to being assigned at once | |logger | Logger | Nil | Logger instance for debug Logs |
Try vipga*|.
VIP is to select multiple lines, GA is into easyalign mode, *| refers to | align
It becomes like this.
vipga*| | Option | Type | Default | Description | | -- | -- | -- | -- || Threads | Fixnum | 1 | Number of threads in the thread pool | | Queues | Fixnum | 1 | Number of concurrent Queues | | Queue_size | Fixnum | 1000 | Size of each queue | | Interval | numeric | 0 | Dispatcher interval for batch processing | | Batch | Boolean | False | Enables batch processing mode | | Batch_size | Fixnum | Nil | Number of maximum items to being assigned at once | | Logger | Logger | Nil | Logger instance for debug Logs |vipga<enter>*| | Option | Type | Default | Description | | -- | -- | -- | -- | | Threads | Fixnum | 1 | Number of thReads in the thread pool | | Queues | Fixnum | 1 | Number of concurrent Queues | | Queue_size | Fixnum | 1000 | Size of each queue | | Interval | numeric | 0 | Dispatcher interval for batch processing | | Batch | Boolean | False | Enables batch processing mode | | Batch_size | Fixnum | Nil | Number of maximum items to being assigned at once | | Logger | Logger | Nil | Logger instance for debug Logs | vipga<enter><enter>*| | Option | Type | Default | Description | | -- | -- | -- | -- | | Threads | Fixnum | 1 | Number of threads in the thread pool | | Queues | Fixnum | 1 | Number of concurrent Queues | | Queue_size | Fixnum | 1000 | Size of each queue | | Interval |numeric | 0 | Dispatcher interval for batch processing | | Batch | Boolean | False | Enables batch processing mode | | Batch_size | Fixnum | Nil | Number of maximum items to being assigned at once | | Logger | Logger | Nil | Logger instance for debug Logs |
Vim Easy-align Plugin Use