Usability improvements

- Preserve indentation when a line starts with a delimiter
  - Useful for aligning multi-line method chains
- Renamed `margin_{left,right}` to `{left,right}_margin
  - Makes it easier to type in (`l`, `r`)
  - `margin_{left,right}` is still supported
- Margins can be specified as the number of spaces, or as an arbitrary string
This commit is contained in:
Junegunn Choi
2013-08-05 23:41:31 +09:00
parent 20124bc622
commit 2486b9c6df
9 changed files with 223 additions and 49 deletions

View File

@@ -257,3 +257,102 @@ aa >= bb
aaaaa /* bbbbb */ == ccccc /* != eeeee = */ === fffff
```
my_object
.method1 .chain
.second_method.call
.third .call
.method_4 .execute
my_object
.method1 . chain
.second_method. call
.third . call
.method_4 .execute
my_object
. method1.chain
.second_method.call
. third.call
. method_4.execute
my_object
. method1.chain
.second_method.call
. third.call
. method_4.execute
my_object
. method1. chain
.second_method. call
. third. call
. method_4.execute
my_object
.method1 .chain
.second_method.call
.third .call
.method_4 .execute
my_object
.method1.chain
.second_method.call
.third.call
.method_4.execute
my_object .
method1 .chain.
second_method.call.
third .call.
method_4 .execute
| 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 be assigned at once |
| logger | Logger | nil | logger instance for debug logs |
| 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 be assigned at once |
| logger | Logger | nil | logger instance for debug logs |
| 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 be assigned at once |
| logger | Logger | nil | logger instance for debug logs |
|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 be assigned at once |
|logger |Logger |nil |logger instance for debug logs |
| 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 be assigned at once<|
| logger <| Logger <| nil <| logger instance for debug logs <|