Skip to main content
Module

x/denops_std/function/mod.ts>shiftwidth

📚 Standard module for denops.vim
Go to Latest
function shiftwidth
import { shiftwidth } from "https://deno.land/x/denops_std@v6.4.0/function/mod.ts";

Returns the effective value of 'shiftwidth'. This is the 'shiftwidth' value unless it is zero, in which case it is the 'tabstop' value. This function was introduced with patch 7.3.694 in 2012, everybody should have it by now (however it did not allow for the optional {col} argument until 8.1.542).

When there is one argument {col} this is used as column number for which to return the 'shiftwidth' value. This matters for the 'vartabstop' feature. If the 'vartabstop' setting is enabled and no {col} argument is given, column 1 will be assumed.

Can also be used as a method:

GetColumn()->shiftwidth()

Parameters

denops: Denops
optional
col: unknown

Returns

Promise<number>