VS2015不支持addin和宏了,所以只能手动操作:
(如果用unity的C#脚本,建议高级保存设置成CRLF模式,因为VS2015智能格式化代码是CRLF,修改不了设置,每次他智能缩进都需要ctrl+z,才可以去掉CR,但是这样影响了写代码的速度)
工具代码:
#include<windows.h>
#include<iostream>
#include<fstream>
using namespace std;
int main(int argc, char* argv[])
{
if (argc != 2)
{
cout << "Please specify : dos2unix filename" << endl;
return 0;
}
char ch;
char temp[MAX_PATH] = "\0";
//Open the file for reading in binarymode.
ifstream fp_read(argv[1], ios_base::in \
| ios_base::binary);
sprintf_s(temp, "%s.temp", argv[1]);
//Create a temporary file for writing in the binary mode. This
//file will be created in the same directory as the input file.
ofstream fp_write(temp, ios_base::out \
|