Variable: projectile-other-file-alist
projectile-other-file-alist is a customizable variable defined in
projectile.el.
Value
(("cpp" "h" "hpp" "ipp")
("ipp" "h" "hpp" "cpp")
("hpp" "h" "ipp" "cpp" "cc")
("cxx" "h" "hxx" "ixx")
("ixx" "h" "hxx" "cxx")
("hxx" "h" "ixx" "cxx")
("c" "h")
("m" "h")
("mm" "h")
("h" "c" "cc" "cpp" "ipp" "hpp" "cxx" "ixx" "hxx" "m" "mm")
("cc" "h" "hh" "hpp")
("hh" "cc")
("ml" "mli")
("mli" "ml" "mll" "mly")
("mll" "mli")
("mly" "mli")
("eliomi" "eliom")
("eliom" "eliomi")
("vert" "frag")
("frag" "vert")
(nil "lock" "gpg")
("lock" "")
("gpg" ""))
Documentation
Alist of extensions for switching to file with the same name,
using other extensions based on the extension of current
file.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260310.858/projectile.el
(defcustom projectile-other-file-alist
'( ;; handle C/C++ extensions
("cpp" . ("h" "hpp" "ipp"))
("ipp" . ("h" "hpp" "cpp"))
("hpp" . ("h" "ipp" "cpp" "cc"))
("cxx" . ("h" "hxx" "ixx"))
("ixx" . ("h" "hxx" "cxx"))
("hxx" . ("h" "ixx" "cxx"))
("c" . ("h"))
("m" . ("h"))
("mm" . ("h"))
("h" . ("c" "cc" "cpp" "ipp" "hpp" "cxx" "ixx" "hxx" "m" "mm"))
("cc" . ("h" "hh" "hpp"))
("hh" . ("cc"))
;; OCaml extensions
("ml" . ("mli"))
("mli" . ("ml" "mll" "mly"))
("mll" . ("mli"))
("mly" . ("mli"))
("eliomi" . ("eliom"))
("eliom" . ("eliomi"))
;; vertex shader and fragment shader extensions in glsl
("vert" . ("frag"))
("frag" . ("vert"))
;; handle files with no extension
(nil . ("lock" "gpg"))
("lock" . (""))
("gpg" . (""))
)
"Alist of extensions for switching to file with the same name,
using other extensions based on the extension of current
file."
:type 'alist)