Skip to content

A Neovim plugin to reveal whitespace characters in visual mode, like VSCode

Notifications You must be signed in to change notification settings

mcauley-penney/visual-whitespace.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

🔎 visual-whitespace.nvim

Reveal whitespace characters in visual mode, similar to VSCode.

visual-ws

GIF: Highlighting in charwise-visual and linewise-visual

Installation and configuration

visual-whitespace does not require initialization. To install it with the default settings using Lazy, you can provide nothing or, optionally, config = true:

  {
    'mcauley-penney/visual-whitespace.nvim',
    -- config = true
  }

visual-whitespace comes with the following default settings:

    opts = {
      highlight = { link = 'Visual' },
      space_char = '·',
      tab_char = '',
      nl_char = '',
      cr_char = ''
      enabled = true
    },

visual-whitespace affords the following user-facing functions:

Lua Description
require("visual-whitespace").toggle() Turn visual-whitespace.nvim off (toggles the enabled cfg flag)

Use them in keymaps like:

init = function()
    vim.keymap.set('n', "<leader>vw", require("visual-whitespace").toggle, {})
end

Credit

About

A Neovim plugin to reveal whitespace characters in visual mode, like VSCode

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages