From d0a84be64812f20d92fcd573980f0bc86e7c9bf5 Mon Sep 17 00:00:00 2001 From: "Andy K. Massimino" Date: Sun, 10 Oct 2021 21:36:47 -0400 Subject: [PATCH] Update docs --- README.md | 13 ++++++++----- doc/matchup.txt | 18 ++++++++++++++++-- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f72ae22..2b62e89 100644 --- a/README.md +++ b/README.md @@ -187,8 +187,9 @@ void some_func() { Since in C and C++, blocks are delimited using braces (`{` & `}`), match-up will recognize `{` as the open word and `}` as the close word. It will ignore the `if` and `else if` because they are not defined in -vim's C file type plugin. -With [Tree-sitter](#tree-sitter-integration) +vim's default C file type plugin. +(Note: In neovim, this is optionally supported via +[Tree-sitter](#tree-sitter-integration)) On the other hand, match-up will recognize the `#if`, `#else`, `#endif` preprocessor directives. @@ -562,8 +563,9 @@ following optional keys: `'popup'`: Show off-screen matches in a popup (vim) or floating (neovim) window. - `'status_manual'`: Compute the status-line but do not display it (future - extension). + `'status_manual'`: Compute the string which would be displayed in the + status-line or popup, but do not display it. The function + `MatchupStatusOffscreen()` can be used to get the text. - `scrolloff`: When enabled, off-screen matches will not be shown in the statusline while @@ -780,7 +782,8 @@ have customized vimtex's delimiters. ### Surroundings match-up provides built-in support for [vim-surround]-style `ds%` and -`cs%` operations. If vim-surround is installed, you can use vim-surround +`cs%` operations (`let g:matchup_surround_enabled = 1`). +If vim-surround is installed, you can use vim-surround replacements such as `cs%)`. `%` cannot be used as a replacement. An alternative plugin is [vim-sandwich], which allows more complex surround replacement rules but is not currently supported. diff --git a/doc/matchup.txt b/doc/matchup.txt index 90064ce..03e723f 100644 --- a/doc/matchup.txt +++ b/doc/matchup.txt @@ -629,8 +629,9 @@ Module matchparen~ an additional Δ symbol will be shown to indicate that the matching line is really above the cursor line. - `'status_manual'`: Compute the status-line but do not display it (future - extension). + `'status_manual'`: Compute the string which would be displayed in the + status-line or popup, but do not display it. The function + `MatchupStatusOffscreen()` can be used to get the text. `'popup'`: Use a popup window (requires at least vim 8.1.1406) or a floating window (in neovim) to show the off-screen match. @@ -650,6 +651,19 @@ Module matchparen~ let g:matchup_matchparen_offscreen \ = {'method': 'popup', 'highlight': 'OffscreenPopup'} < + syntax_hl~ + For popup method on vim only: syntax highlight the code in the popup. + May have performance implications. + + Default: 0 + + border~ + For floating window on neovim only: set to add a border. If the value + is the integer 1, default borders are enabled. A list or string can + be specified as described in |nvim_open_win()|. + + Default: 0 + Default: `{'method': 'status'}` *g:matchup_matchparen_stopline*