Skip to main content
Module

x/denops_std/option/mod.ts>grepprg

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

Program to use for the :grep command. This option may contain '%' and '#' characters, which are expanded like when used in a command- line. The placeholder "$*" is allowed to specify where the arguments will be included. Environment variables are expanded :set_env. See option-backslash about including spaces and backslashes. When your "grep" accepts the "-H" argument, use this to make ":grep" also work well with a single file:

:set grepprg=grep\ -nH

Special value: When 'grepprg' is set to "internal" the :grep command works like :vimgrep, :lgrep like :lvimgrep, :grepadd like :vimgrepadd and :lgrepadd like :lvimgrepadd. See also the section :make_makeprg, since most of the comments there apply equally to 'grepprg'. For Win32, the default is "findstr /n" if "findstr.exe" can be found, otherwise it's "grep -n". This option cannot be set from a modeline or in the sandbox, for security reasons.

(default "grep -n ", Unix: "grep -n $* /dev/null", Win32: "findstr /n" or "grep -n", VMS: "SEARCH/NUMBERS ")

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>; }