Skip to main content
Module

x/denops_std/option/mod.ts>pastetoggle

📚 Standard module for denops.vim
Go to Latest
variable pastetoggle
import { pastetoggle } from "https://deno.land/x/denops_std@v4.1.1/option/mod.ts";

When non-empty, specifies the key sequence that toggles the 'paste' option. This is like specifying a mapping: > :map {keys} :set invpaste < Where {keys} is the value of 'pastetoggle'. The difference is that it will work even when 'paste' is set. 'pastetoggle' works in Insert mode and Normal mode, but not in Command-line mode. Mappings are checked first, thus overrule 'pastetoggle'. However, when 'paste' is on mappings are ignored in Insert mode, thus you can do this: > :map :set paste :map :set nopaste :imap :set paste :imap :set pastetoggle= < This will make start paste mode and stop paste mode. Note that typing in paste mode inserts "", since in paste mode everything is inserted literally, except the 'pastetoggle' key sequence. When the value has several bytes 'ttimeoutlen' applies.

type

{ get(denops: Denops): Promise<string>; set(denops: Denops, value: string): Promise<void>; reset(denops: Denops): Promise<void>; getGlobal(denops: Denops): Promise<string>; setGlobal(denops: Denops, value: string): Promise<void>; resetGlobal(denops: Denops): Promise<void>; }