Skip to main content
Module

x/ddc_vim/deps.ts>op.titlestring

Dark deno-powered completion framework for neovim/Vim
Latest
variable op.titlestring
import { op } from "https://deno.land/x/ddc_vim@v4.3.1/deps.ts";
const { titlestring } = op;

When this option is not empty, it will be used for the title of the window. This happens only when the 'title' option is on. Only works if the terminal supports setting window titles (currently Amiga console, Win32 console, all GUI versions and terminals with a non-empty 't_ts' option). When Vim was compiled with HAVE_X11 defined, the original title will be restored if possible, see X11.

When this option contains printf-style '%' items, they will be expanded according to the rules used for 'statusline'. This option cannot be set in a modeline when 'modelineexpr' is off.

Example:

:auto BufEnter * let &titlestring = hostname() .. "/" .. expand("%:p")
:set title titlestring=%<%F%=%l/%L-%P titlelen=70

The value of 'titlelen' is used to align items in the middle or right of the available space. Some people prefer to have the file name first:

:set titlestring=%t%(\ %M%)%(\ (%{expand(\"%:~:.:h\")})%)%(\ %a%)

Note the use of "%{ }" and an expression to get the path of the file, without the file name. The "%( %)" constructs are used to add a separating space only when needed. NOTE: Use of special characters in 'titlestring' may cause the display to be garbled (e.g., when it contains a CR or NL character). not available when compiled without the +statusline feature

(default "")

type

GlobalOption<string>