Here's script to do this:
"switch between .h / -inl.h / .cc / .py / .js / _test.* / _unittest.*
"with ,h ,i ,c ,p ,j ,t ,u
"(portion from old mail from David Reiss)
let pattern = '\(\(_\(unit\)\?test\)\?\.\(cc\|js\|py\)\|\(-inl\)\?\.h\)$'
nmap ,c :e
nmap ,h :e
nmap ,i :e
nmap ,t :e
nmap ,u :e
nmap ,p :e
nmap ,j :e
,h: X.cc or X-inl.h or X_test.cc or X_unittest.cc goes to X.h
,c: X.h or X-inl.h or X_test.cc or X_unittest.cc goes to X.cc
,i: X.h or X.cc or X_test.cc or X_unittest.cc goes to X-inl.h
,p: X_test.py or X_unittest.py goes to X.py
,j: X_test.js or X_unittest.js goes to X.js
,t: X.h or X-inl.h or X.cc or X_unittest.cc goes to X_test.cc
,t: X.py/js or X_unittest.py/js goes to X_test.py/js
,u: X.h or X-inl.h or X.cc or X_test.cc goes to X_unittest.cc
,u: X.py/js or X_test.py/js goes to X_unittest.py/js
Obviously you can customize different key mappings to do the toggle. =)