Skip to main content
Module

x/ddc_vim/deps.ts>op.buftype

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

The value of this option specifies the type of a buffer: <empty> normal buffer nofile buffer which is not related to a file and will not be written nowrite buffer which will not be written acwrite buffer which will always be written with BufWriteCmd autocommands. quickfix quickfix buffer, contains list of errors :cwindow or list of locations :lwindow help help buffer (you are not supposed to set this manually) terminal buffer for a terminal (you are not supposed to set this manually) prompt buffer where only the last line can be edited, meant to be used by a plugin, see prompt-buffer only when compiled with the +channel feature popup buffer used in a popup window, see popup. only when compiled with the +textprop feature

This option is used together with 'bufhidden' and 'swapfile' to specify special kinds of buffers. See special-buffers. Also see win_gettype(), which returns the type of the window.

Be careful with changing this option, it can have many side effects! One such effect is that Vim will not check the timestamp of the file, if the file is changed by another program this will not be noticed.

A "quickfix" buffer is only used for the error list and the location list. This value is set by the :cwindow and :lwindow commands and you are not supposed to change it.

"nofile" and "nowrite" buffers are similar: both: The buffer is not to be written to disk, ":w" doesn't work (":w filename" does work though). both: The buffer is never considered to be 'modified'. There is no warning when the changes will be lost, for example when you quit Vim. both: A swap file is only created when using too much memory (when 'swapfile' has been reset there is never a swap file). nofile only: The buffer name is fixed, it is not handled like a file name. It is not modified in response to a :cd command. both: When using ":e bufname" and already editing "bufname" the buffer is made empty and autocommands are triggered as usual for :edit.

"acwrite" implies that the buffer name is not related to a file, like "nofile", but it will be written. Thus, in contrast to "nofile" and "nowrite", ":w" does work and a modified buffer can't be abandoned without saving. For writing there must be matching BufWriteCmd, FileWriteCmd or FileAppendCmd autocommands.

(default: "")

type

LocalOption<string>