plugins.vim-suda.settings

The configuration options for vim-suda without the suda# prefix.

For example, the following settings are equivialent to these :setglobal commands:

  • foo_bar = 1 -> :setglobal suda#foo_bar=1
  • hello = "world" -> :setglobal suda#hello="world"
  • some_toggle = true -> :setglobal suda#some_toggle
  • other_toggle = false -> :setglobal nosuda#other_toggle

Type: attribute set of anything

Default: { }

Example:

{
  noninteractive = 1;
  path = "doas";
  prompt = "Pass: ";
  smart_edit = 1;
}

Declared by:

plugins.vim-suda.settings.executable

Path to the sudo binary.

Type: null or string or raw lua code

Default: null

Plugin default: "sudo"

Declared by:

plugins.vim-suda.settings.noninteractive

If set, suda will not prompt you for a password before saving a file. It is supposed to support a setup with passwordless sudo or doas. Use with care.

Type: null or (one of 0, 1) or raw lua code

Default: null

Plugin default: 0

Declared by:

plugins.vim-suda.settings.prompt

A prompt string used to ask password.

Type: null or string or raw lua code

Default: null

Plugin default: "Password: "

Declared by:

plugins.vim-suda.settings.smart_edit

If set, an |autocmd| is created that performs a heuristic check on every buffer and decides whether to replace it with a suda buffer. The check is done only once for every buffer and it is designed to be optimized as possible so you shouldn’t feel any slowdown when opening buffers.

Type: null or (one of 0, 1) or raw lua code

Default: null

Plugin default: 0

Declared by: