使用 "=" for c++ 进行 GVIM 格式化
GVIM formatting using "=" for c++
当在gvim中选择以下代码并点击"="时,它会移动构造函数上的括号。这是一个 gvim 错误还是我可能需要设置才能修复的设置?
输出:
class GameData
{
public:
enum Key { A=0, B, C, D, TOTAL_KEYS };
GameData() : moves_() , numKeys_(TOTAL_KEYS)
{
populateMoves();
}
inline const std::vector<Key>& getMoves ( int k ) const
{
return moves_[k];
}
期望输出:
class GameData
{
public:
enum Key { A=0, B, C, D, TOTAL_KEYS };
GameData(): moves_(), numKeys_(TOTAL_KEYS)
{
populateMoves();
}
inline const std::vector<Key>& getMoves ( int k ) const
{
return moves_[k];
}
设置cino=i0
使语句与我的 vim 安装正确对齐。
从帮助
*cino-i*
iN Indent C++ base class declarations and constructor
initializations, if they start in a new line (otherwise they
are aligned at the right side of the ':').
(default 'shiftwidth').
相关文章:
- C++格式化输出问题
- 格式化浮点值:返回默认值
- 自动格式化程序> >更改为>>
- 如何从C++中的格式化字符串派生整数?
- 将从格式化文本文件读取的文本数据存储到链表
- 在不使用系统的情况下从C++应用程序格式化 Linux 中的 SD 卡
- 高精度双精度的 Sprintf 格式化问题
- 如何在 c++ 中格式化和访问 2D 矢量数组中的数据
- 叮当格式化程序多行格式配置错误
- 如何格式化我的文本文件以使其不会一遍又一遍地重复同一行?
- 从函数(不抛出函数)返回异常以进行消息格式化?
- 从格式化输入操作中获取读取字符数
- 如何从标准输入中检测格式化输入错误?
- 无法从 spdlog 中格式化参数
- 格式化时间 c++ dd/mm/yyyy hh:ss.
- 如何正确格式化csv文件?
- 格式化sqlite3_exec结果
- 使用 std::locale 格式化法语数字时无效的 UTF-8 数据
- C++逐步格式化字符串
- 使用 "=" for c++ 进行 GVIM 格式化