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

x/ddu_vim/deps.ts>fn.wordcount

Dark deno-powered UI framework for neovim/Vim8
Go to Latest
function fn.wordcount
import { fn } from "https://deno.land/x/ddu_vim@v1.13.0/deps.ts";
const { wordcount } = fn;

The result is a dictionary of byte/chars/word statistics for the current buffer. This is the same info as provided by |g_CTRL-G| The return value includes: bytes Number of bytes in the buffer chars Number of chars in the buffer words Number of words in the buffer cursor_bytes Number of bytes before cursor position (not in Visual mode) cursor_chars Number of chars before cursor position (not in Visual mode) cursor_words Number of words before cursor position (not in Visual mode) visual_bytes Number of bytes visually selected (only in Visual mode) visual_chars Number of chars visually selected (only in Visual mode) visual_words Number of words visually selected (only in Visual mode)

Returns

Promise<unknown>