Skip to content

Conversation

@girishji
Copy link
Contributor

@girishji girishji commented Jul 5, 2025

Based on #17665

Addresses #17654

+         exacttext
+                       When this flag is present, search pattern completion
+                       (e.g., in |/|, |?|, |:s|, |:g|, |:v|, and |:vim|)
+                       shows exact buffer text as menu items, without
+                       preserving regex artifacts like position
+                       anchors (e.g., |/\<|). This provides more intuitive
+                       menu items that match the actual buffer text. However,
+                       searches may be less accurate since the pattern is not
+                       preserved exactly.
+                       By default, Vim preserves the typed pattern (with
+                       anchors) and appends the matched word. This preserves
+                       search correctness, especially when using regular
+                       expressions or with 'smartcase' enabled. However, the
+                       case of the appended matched word may not exactly
+                       match the case of the word in the buffer.

@girishji
Copy link
Contributor Author

girishji commented Jul 5, 2025

Should the option value be search:exacttext to indicate it's specific to search pattern completion, or simply exacttext (if it is clear from the doc)?

@techntools
Copy link

I vote for exacttext

@chrisbra
Copy link
Member

chrisbra commented Jul 7, 2025

Thanks. Can you please rebase?

Addresses issue vim#17654

exacttext
      When this flag is present, search pattern completion
      (e.g., in |/|, |?|, |:s|, |:g|, |:v|, and |:vim|)
      shows exact buffer text as menu items, without
      preserving regex artifacts like position
      anchors (e.g., |/\<|). This provides more intuitive
      menu items that match the actual buffer text. However,
      searches may be less accurate since the pattern is not
      preserved exactly.
      By default, Vim preserves the typed pattern (with
      anchors) and appends the matched word. This preserves
      search correctness, especially when using regular
      expressions or with 'smartcase' enabled. However, the
      case of the appended matched word may not exactly
      match the case of the word in the buffer.
@girishji
Copy link
Contributor Author

girishji commented Jul 8, 2025

Rebased, please try.

@chrisbra chrisbra closed this in 93c2d5b Jul 8, 2025
@chrisbra
Copy link
Member

chrisbra commented Jul 8, 2025

thanks!

zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Jul 8, 2025
… case

Problem:  completion: search completion match may differ in case
          (techntools)
Solution: add "exacttext" to 'wildoptions' value (Girish Palya)

This flag does the following:

exacttext
      When this flag is present, search pattern completion
      (e.g., in |/|, |?|, |:s|, |:g|, |:v|, and |:vim|)
      shows exact buffer text as menu items, without
      preserving regex artifacts like position
      anchors (e.g., |/\<|). This provides more intuitive
      menu items that match the actual buffer text. However,
      searches may be less accurate since the pattern is not
      preserved exactly.
      By default, Vim preserves the typed pattern (with
      anchors) and appends the matched word. This preserves
      search correctness, especially when using regular
      expressions or with 'smartcase' enabled. However, the
      case of the appended matched word may not exactly
      match the case of the word in the buffer.

fixes: vim/vim#17654
closes: vim/vim#17667

vim/vim@93c2d5b

Co-authored-by: Girish Palya <[email protected]>
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Jul 9, 2025
… case

Problem:  completion: search completion match may differ in case
          (techntools)
Solution: add "exacttext" to 'wildoptions' value (Girish Palya)

This flag does the following:

exacttext
      When this flag is present, search pattern completion
      (e.g., in |/|, |?|, |:s|, |:g|, |:v|, and |:vim|)
      shows exact buffer text as menu items, without
      preserving regex artifacts like position
      anchors (e.g., |/\<|). This provides more intuitive
      menu items that match the actual buffer text. However,
      searches may be less accurate since the pattern is not
      preserved exactly.
      By default, Vim preserves the typed pattern (with
      anchors) and appends the matched word. This preserves
      search correctness, especially when using regular
      expressions or with 'smartcase' enabled. However, the
      case of the appended matched word may not exactly
      match the case of the word in the buffer.

fixes: vim/vim#17654
closes: vim/vim#17667

vim/vim@93c2d5b

Co-authored-by: Girish Palya <[email protected]>
@girishji
Copy link
Contributor Author

girishji commented Jul 9, 2025

Thanks.

@girishji girishji deleted the newoption branch July 12, 2025 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants