mirror of
https://github.com/ernstwi/vim-secret.git
synced 2026-05-13 16:38:39 +08:00
Initial commit
This commit is contained in:
commit
9d395d316f
8 changed files with 790 additions and 0 deletions
91
doc/secret.txt
Normal file
91
doc/secret.txt
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
*secret.txt* *secret*
|
||||
|
||||
Requires |+conceal|.
|
||||
|
||||
==============================================================================
|
||||
COMMANDS *:Secret*
|
||||
|
||||
:Secret Enable secret view.
|
||||
|
||||
:Secret! Disable secret view.
|
||||
|
||||
:Secret {visibility} Enable secret view with a given visibility setting.
|
||||
See |secret-visibility| for possible values.
|
||||
|
||||
:Secret {visibility-normal} {visibility-insert}
|
||||
Enable secret view with separate visibility settings
|
||||
for normal and insert mode.
|
||||
See |secret-visibility| for possible values.
|
||||
|
||||
==============================================================================
|
||||
VISIBILITY SETTINGS *secret-visibility*
|
||||
|
||||
An area around the cursor is unhidden to enable you to see what you are
|
||||
typing. This area is specified using the following values:
|
||||
|
||||
Value Description Example~
|
||||
'line' The current line. The quick brown fox jumps over the lazy dog.
|
||||
'word' The current |WORD|. ••• ••••• ••••• fox ••••• •••• ••• •••• ••••
|
||||
'char' The current character. ••• ••••• ••••• ••x ••••• •••• ••• •••• ••••
|
||||
'none' Do not show anything. ••• ••••• ••••• ••• ••••• •••• ••• •••• ••••
|
||||
^ Cursor position~
|
||||
|
||||
==============================================================================
|
||||
CONFIGURATION *secret-configuration*
|
||||
|
||||
*g:secret_cchar*
|
||||
g:secret_cchar Replacement character used for hidden text.
|
||||
Default: '•'
|
||||
|
||||
*g:secret_visibility*
|
||||
g:secret_visibility Default visibility.
|
||||
See |secret-visibility| for possible values.
|
||||
Default: 'word'
|
||||
|
||||
*g:secret_visibility_normal*
|
||||
g:secret_visibility_normal Default normal mode visibility.
|
||||
See |secret-visibility| for possible values.
|
||||
Default: |g:secret_visibility|
|
||||
|
||||
*g:secret_visibility_insert*
|
||||
g:secret_visibility_insert Default insert mode visibility.
|
||||
See |secret-visibility| for possible values.
|
||||
Default: |g:secret_visibility|
|
||||
|
||||
*g:secret_timeout_normal*
|
||||
g:secret_timeout_normal Hide entire buffer after 'updatetime' milliseconds
|
||||
without input in normal mode.
|
||||
Default: 1 (enabled)
|
||||
*g:secret_timeout_insert*
|
||||
g:secret_timeout_insert Hide entire buffer after 'updatetime' milliseconds
|
||||
without input in insert mode.
|
||||
Default: 0 (disabled)
|
||||
|
||||
==============================================================================
|
||||
MAPPINGS *secret-mappings*
|
||||
|
||||
*g:secret_quickhide*
|
||||
g:secret_quickhide Hide entire buffer until the cursor is moved. Set this
|
||||
to a key sequence string: >
|
||||
|
||||
let g:secret_quickhide = '<Leader>q'
|
||||
|
||||
==============================================================================
|
||||
HIGHLIGHTING *secret-highlight* *SecretVisible*
|
||||
|
||||
Two syntax groups are used, |Conceal| and `SecretVisible`. |Conceal| applies to
|
||||
hidden text, and `SecretVisible` applies to the visible area surrounding the
|
||||
cursor (see |secret-cursor|).
|
||||
|
||||
To extend an existing color scheme with your own highlighting for |Conceal| and
|
||||
`SecretVisible`, you can for example use the following autocommand: >
|
||||
|
||||
autocmd! VimEnter,ColorScheme *
|
||||
\ hi Conceal guifg=green |
|
||||
\ hi SecretVisible guifg=red
|
||||
|
||||
Implementation note: It would be nice to be able to highlight hidden
|
||||
characters separately from the global |Conceal| group but this is not
|
||||
currently possible using Vim's conceal feature.
|
||||
|
||||
vim:tw=78:ft=help:norl:
|
||||
Loading…
Add table
Add a link
Reference in a new issue