Heim > Fragen und Antworten > Hauptteil
Ich denke, if条件语句中判断当前文件的后缀名是不是等于某个后缀,但是%:t:e=="cpp" scheint nicht die richtige Syntax zu sein. Was ist die richtige Syntax?
if
%:t:e=="cpp"
大家讲道理2017-05-16 16:38:30
你需要使用expand
if expand('<afile>:t:e') == "cpp"