derekwyatt / vim-fswitch

Vim plug for switching between companion source files (e.g. ".h" and ".cpp")
179 stars 57 forks source link

Look-up buffer by its exact name #20

Closed xguerin closed 4 years ago

xguerin commented 6 years ago

Problem

When the target name is a prefix of the source name, switch would not happen as we would ask vim to switch to a non existent buffer.

Example

OCaml's ".mli" files and ".ml" files.

Fix

Check the existence of the buffer by its full name.