mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-09-19 08:07:28 +03:00
Add textwidth configuration variable.
This commit is contained in:
parent
1b2feba428
commit
7f0fbab2f7
@ -105,6 +105,10 @@ The following is a subset of the supported configurations; the full list is desc
|
||||
* Copy indent from current line when starting a new line
|
||||
* Type: Boolean (Default: `true`)
|
||||
|
||||
#### textwidth
|
||||
* Width to word-wrap to when using `gq`.
|
||||
* Type: number (Default: `80`)
|
||||
|
||||
## Configure
|
||||
|
||||
Vim options are loaded in the following sequence:
|
||||
|
@ -297,6 +297,11 @@
|
||||
"description": "keywords contain alphanumeric characters and '_'",
|
||||
"default": "/\\()\"':,.;<>~!@#$%^&*|+=[]{}`?-"
|
||||
},
|
||||
"vim.textwidth": {
|
||||
"type": "number",
|
||||
"description": "Width to word-wrap to when using gq.",
|
||||
"default": 80
|
||||
},
|
||||
"vim.ignorecase": {
|
||||
"type": "boolean",
|
||||
"description": "Ignore case in search patterns.",
|
||||
|
@ -3979,7 +3979,7 @@ class ActionVisualReflowParagraph extends BaseCommand {
|
||||
}
|
||||
|
||||
public reflowParagraph(s: string, indentLevel: number): string {
|
||||
let maximumLineLength = 80 - indentLevel - 2;
|
||||
const maximumLineLength = Configuration.getInstance().textwidth - indentLevel - 2;
|
||||
const indent = Array(indentLevel + 1).join(" ");
|
||||
|
||||
// Chunk the lines by commenting style.
|
||||
|
@ -59,6 +59,7 @@ export class Configuration {
|
||||
useSystemClipboard = false;
|
||||
useCtrlKeys = false;
|
||||
scroll = 20;
|
||||
textwidth = 80;
|
||||
hlsearch = false;
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
|
Loading…
Reference in New Issue
Block a user