Skip to main content
Module

x/denops_std/option/mod.ts>virtualedit

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

A comma-separated list of these words: block Allow virtual editing in Visual block mode. insert Allow virtual editing in Insert mode. all Allow virtual editing in all modes. onemore Allow the cursor to move just past the end of the line none When used as the local value, do not allow virtual editing even when the global value is set. When used as the global value, "none" is the same as "". NONE Alternative spelling of "none".

Virtual editing means that the cursor can be positioned where there is no actual character. This can be halfway into a tab or beyond the end of the line. Useful for selecting a rectangle in Visual mode and editing a table. "onemore" is not the same, it will only allow moving the cursor just after the last character of the line. This makes some commands more consistent. Previously the cursor was always past the end of the line if the line was empty. But it is far from Vi compatible. It may also break some plugins or Vim scripts. For example because l can move the cursor after the last character. Use with care! Using the $ command will move to the last character in the line, not past it. This may actually move the cursor to the left! The g$ command will move to the end of the screen line. It doesn't make sense to combine "all" with "onemore", but you will not get a warning for it. When combined with other words, "none" is ignored. NOTE: This option is set to "" when 'compatible' is set.

(default "")

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>; getLocal(denops: Denops): Promise<string>; setLocal(denops: Denops, value: string): Promise<void>; resetLocal(denops: Denops): Promise<void>; }