使用a.vim for C ++ [英] Using a.vim for C++

查看:209
本文介绍了使用a.vim for C ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使用a.vim插件在.h,.cxx和 .txx文件之间切换?或者,你能提供另一个解决方案吗?这个想法是自动从 .h - > .txx - >

is there a way to use the a.vim plugin to switch between .h, .cxx and .txx files? Alternatively, can you provide another solution? The idea is to automagically switch from .h -> .txx -> .cxx at the press of a key.

非常感谢

推荐答案

在a.vim中查找包含 AddAlternateExtensionMapping 的行。第一个参数是当前文件的扩展名,第二个参数是您要使用:A 切换的文件的扩展名列表。它们列在优先顺序中。

Look for the lines in a.vim that contain AddAlternateExtensionMapping. The first argument is the extension of the current file, the second is a list of extensions of the file you'd like to switch to with :A. They are listed in order of preference. In your case, you'd have to set it up so that it would go in a cycle.

call <SID>AddAlternateExtensionMapping('h', 'txx,cxx')
call <SID>AddAlternateExtensionMapping('txx', 'cxx,h')
call <SID>AddAlternateExtensionMapping('cxx', 'h,txx')

现在你从.h到.txx它不会。

So now you go from .h to .txx if it exists or .cxx if it doesn't.

这篇关于使用a.vim for C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆