0

I have the following in my config:

(setq counsel-find-file-ignore-regexp "\`[#.]\|[#~]\'")

which was taken straight from the documentation for counsel-find-file-ignore-regexp. However, they still show up when I do counsel-find-file. I suspect this is because ivy-text matches them. For example xyz~ will show up.

  • How can I make these files not show up when using counsel-find-file?
  • How can I make counsel-find-file explicitly make a file (e.g test.cpp) if it partially matches another file that already exists (e.g test.cpp.inc)? -- for example, as is, it would simply open the latter.

I referenced this post.

2
  • You need to escape the backslashes in a string: try "\\`[#.]\\|[#~]\\'". See my answer to a different question with the same problem, particularly the EDIT which explains why you need to double-up the backslashes.
    – NickD
    Commented Jun 29 at 4:52
  • 1
    This question is similar to: auto-insert-mode picks the wrong template if in $HOME. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.
    – NickD
    Commented Jun 29 at 4:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.