Private writing mode for Vim
vim
Find a file
2021-01-30 12:22:40 +01:00
autoload Add mapping <Plug>SecretToggle 2021-01-30 12:09:05 +01:00
doc Add mapping <Plug>SecretToggle 2021-01-30 12:09:05 +01:00
plugin Add mapping <Plug>SecretToggle 2021-01-30 12:09:05 +01:00
test Add mapping <Plug>SecretToggle 2021-01-30 12:09:05 +01:00
example.svg Initial commit 2021-01-28 22:51:56 +01:00
LICENSE Create LICENSE 2021-01-28 22:56:14 +01:00
makefile Initial commit 2021-01-28 22:51:56 +01:00
README.md Update README: Add note about testing 2021-01-30 12:22:40 +01:00

vim-secret

Usage

:Secret Enable secret view.
:Secret (line | word | char | none) Enable secret view with a specific visibility setting.
:Secret! Disable secret view.
<Plug>SecretToggle Toggle secret view.

An area around the cursor is unhidden to enable you to see what you are typing. This can be the entire line, the current word, the current character, or it can be disabled completely.

After a duration of time without input, or invoked manually via a mapping, all characters in the buffer is hidden. For details on this and other configuration options, see :help secret.

FAQ

Replacement characters have a background color, which looks weird.

This is due to how your color scheme styles the Conceal highlight group. To remove the background color, you could use something like the following in your vimrc/init.vim:

autocmd! VimEnter,ColorScheme * hi Conceal ctermbg=NONE guibg=NONE

See :help secret-highlight for more info.

Testing

make can be used to do testing in an isolated environment. The default rule runs test/*.vader in Vim and Neovim.

Thanks to vim-sneak for this idea.