mirror of
https://github.com/preservim/vim-pencil.git
synced 2025-11-15 13:23:47 -05:00
restored name to toggle command
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
This plugin focuses on the fundamentals of word processing in Vim:
|
This plugin focuses on the fundamentals of word processing in Vim:
|
||||||
|
|
||||||
* Use for editing text, markdown, textile, and other file types
|
* Use for editing text, markdown, textile, and other prose-oriented file types
|
||||||
* Configures wrap mode for buffer, auto-detecting via modeline if present
|
* Configures wrap mode for buffer, auto-detecting via modeline if present
|
||||||
* Adjusts navigation key mappings to suit the wrap mode
|
* Adjusts navigation key mappings to suit the wrap mode
|
||||||
* For hard line break mode, enables Insert-mode only autoformat
|
* For hard line break mode, enables Insert-mode only autoformat
|
||||||
@@ -88,8 +88,8 @@ to set the behavior for the current buffer:
|
|||||||
|
|
||||||
* `SoftPencil` - mode for soft line wrapping
|
* `SoftPencil` - mode for soft line wrapping
|
||||||
* `HardPencil` - mode for hard line breaks
|
* `HardPencil` - mode for hard line breaks
|
||||||
* `ChangePencils` - if off, enables with detection; if on, turns off
|
|
||||||
* `DropPencil` - removes navigation mappings and restores buffer to global settings
|
* `DropPencil` - removes navigation mappings and restores buffer to global settings
|
||||||
|
* `TogglePencil` - if off, enables with detection; if on, turns off
|
||||||
|
|
||||||
Optionally, you can map to keys in your `.vimrc`:
|
Optionally, you can map to keys in your `.vimrc`:
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ Optionally, you can map to keys in your `.vimrc`:
|
|||||||
nmap <silent> <leader>ps :SoftPencil<cr>
|
nmap <silent> <leader>ps :SoftPencil<cr>
|
||||||
nmap <silent> <leader>ph :HardPencil<cr>
|
nmap <silent> <leader>ph :HardPencil<cr>
|
||||||
nmap <silent> <leader>pd :DropPencil<cr>
|
nmap <silent> <leader>pd :DropPencil<cr>
|
||||||
nmap <silent> <leader>pc :ChangePencils<cr>
|
nmap <silent> <leader>pt :TogglePencil<cr>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Automatic formatting
|
### Automatic formatting
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ endif
|
|||||||
command -nargs=0 HardPencil call pencil#init({'wrap': 'hard'})
|
command -nargs=0 HardPencil call pencil#init({'wrap': 'hard'})
|
||||||
command -nargs=0 SoftPencil call pencil#init({'wrap': 'soft'})
|
command -nargs=0 SoftPencil call pencil#init({'wrap': 'soft'})
|
||||||
command -nargs=0 DropPencil call pencil#init({'wrap': 'off' })
|
command -nargs=0 DropPencil call pencil#init({'wrap': 'off' })
|
||||||
command -nargs=0 ChangePencils call pencil#init({'wrap': 'toggle'})
|
command -nargs=0 TogglePencil call pencil#init({'wrap': 'toggle'})
|
||||||
|
|
||||||
command -nargs=0 AutoPencil call pencil#setAutoFormat(1)
|
command -nargs=0 AutoPencil call pencil#setAutoFormat(1)
|
||||||
command -nargs=0 ManualPencil call pencil#setAutoFormat(0)
|
command -nargs=0 ManualPencil call pencil#setAutoFormat(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user