vimrc - How to compare % with string in vim?
伊谢尔伦
伊谢尔伦 2017-05-16 16:36:30
0
1
488

I want to determine whether the suffix name of the current file is equal to a certain suffix in the if conditional statement, but %:t:e=="cpp" does not seem to be correct Grammar, what is the correct grammar?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(1)
大家讲道理

You need to use expand

if expand('<afile>:t:e') == "cpp"
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!