Skip to main content
Module

x/denops_std/option/mod.ts>paste

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

Put Vim in Paste mode. This is useful if you want to cut or copy some text from one window and paste it in Vim. This will avoid unexpected effects. Setting this option is useful when using Vim in a terminal, where Vim cannot distinguish between typed text and pasted text. In the GUI, Vim knows about pasting and will mostly do the right thing without 'paste' being set. The same is true for a terminal where Vim handles the mouse clicks itself. This option is reset when starting the GUI. Thus if you set it in your .vimrc it will work in a terminal, but not in the GUI. Setting 'paste' in the GUI has side effects: e.g., the Paste toolbar button will no longer work in Insert mode, because it uses a mapping. When the 'paste' option is switched on (also when it was already on): - mapping in Insert mode and Command-line mode is disabled - abbreviations are disabled - 'autoindent' is reset - 'expandtab' is reset - 'hkmap' is reset - 'revins' is reset - 'ruler' is reset - 'showmatch' is reset - 'smarttab' is reset - 'softtabstop' is set to 0 - 'textwidth' is set to 0 - 'wrapmargin' is set to 0 - 'varsofttabstop' is made empty These options keep their value, but their effect is disabled: - 'cindent' - 'formatoptions' is used like it is empty - 'indentexpr' - 'lisp' - 'smartindent' NOTE: When you start editing another file while the 'paste' option is on, settings from the modelines or autocommands may change the settings again, causing trouble when pasting text. You might want to set the 'paste' option again. When the 'paste' option is reset the mentioned options are restored to the value before the moment 'paste' was switched from off to on. Resetting 'paste' before ever setting it does not have any effect. Since mapping doesn't work while 'paste' is active, you need to use the 'pastetoggle' option to toggle the 'paste' option with some key.

(default off)

type

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