Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddc_vim/deps.ts>op.sidescrolloff

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

The minimal number of screen columns to keep to the left and to the right of the cursor if 'nowrap' is set. Setting this option to a value greater than 0 while having 'sidescroll' also at a non-zero value makes some context visible in the line you are scrolling in horizontally (except at beginning of the line). Setting this option to a large value (like 999) has the effect of keeping the cursor horizontally centered in the window, as long as one does not come too close to the beginning of the line. After using the local value, go back the global value with one of these two:

setlocal sidescrolloff<
setlocal sidescrolloff=-1

NOTE: This option is set to 0 when 'compatible' is set.

Example: Try this together with 'sidescroll' and 'listchars' as in the following example to never allow the cursor to move onto the "extends" character:

         :set nowrap sidescroll=1 listchars=extends:>,precedes:<
         :set sidescrolloff=1

(default 0)

type

GlobalOrLocalOption<number>