Search code examples
vimack

Escaping period in Ack.vim


I'm looking forward to search for the following pattern with Ack.vim:

.section

Where . should only match a period, and not any character.

I tried the following:

  • \.section
  • [.]section
  • -Q .section

What is the correct way of escaping the period?


Solution

  • From the documentation:

    For instance, '#'. You have to escape it like this :Ack '\\\#define foo' to search for '#define foo'.

    Use: :Ack \\\.section