vim 写代码时, 按回车键有时应该和上一行对齐,却总是行首有多个tab键,就需要手动删除号多个,请问怎么解决?
从22 行按回车:
#include "head.h"
#include "game.h"
#include "datatype.h"
#include "./ball_status.h"
extern struct BPoint ball; // 球
extern struct BallStatus ball_status;
// 判断是否可以带球,
void carry_ball(struct Point *loc, char *name) {
if (can_kick(loc, 0)) { // 球员在球的有效范围内
if (strcmp(name, ball_status.name) == 0 || ball_status.who == 0) { // 球是本人带或者没人带的时候才能跟着球员运动
ball_status.who = 1 ;// 有人带球
strcpy(ball_status.name, name);
ball.x = loc->x;
ball.y = loc->y;
from 22 -> 23????
ball_status.a.x = 0; //加速度为 0
ball_status.a.y = 0;
ball_status.v.x = 0;
ball_status.v.y = 0; // 速度为 0
}
}
return ;
}
https://blog.csdn.net/weixin_30641465/article/details/99804634