exuberant-ctags

Add CMakeLists.txt pattern to Ctags langmap


At the documentation I saw we could add literal filename (no-extension) support to ctags --langmap but I failed to introduce CMakeLists.txt. How to add CMakeLists.txt as well as .cmake extension?

Please find my definition at: https://github.com/umitkablan/vims/commit/33aaac8312774913b911984158d6a000362c57bb


Solution

  • As I was seeking through other's ctags configurations, I came across https://gist.github.com/romainl/085b4db4a26a06ec7e16#file-ctags-L43 and the line --langmap=vim:+(vimrc) gave me an idea about how to add literal names. So I applied similar approach:

    ..
    --langdef=cmake
    --langmap=cmake:(CMakeLists.txt)
    --langmap=cmake:+.cmake
    ...