handle window vim compatibility
add ViewFunc in Cpp mode