Skip to content

Commit

Permalink
Add dos2unix
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Nov 5, 2023
1 parent cbfdcab commit 469de2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions autoload/dpp/util.vim
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,7 @@ function s:get_default_ftplugin() abort
END
return default_ftplugin
endfunction

function dpp#util#_dos2unix(path) abort
call writefile(readfile(a:path), a:path)
endfunction
3 changes: 3 additions & 0 deletions denops/dpp/dpp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ export class Dpp {
// Write state file
const stateFile = `${basePath}/${name}/state.vim`;
await Deno.writeTextFile(stateFile, stateLines.join("\n"));
await denops.call("dpp#util#_dos2unix", stateFile);

const cacheFile = `${basePath}/${name}/cache.vim`;
const cacheLines = [
Expand All @@ -386,6 +387,7 @@ export class Dpp {
]),
];
await Deno.writeTextFile(cacheFile, cacheLines.join("\n"));
await denops.call("dpp#util#_dos2unix", cacheFile);

//console.log(stateLines);
//console.log(cacheLines);
Expand All @@ -407,6 +409,7 @@ export class Dpp {
}

await Deno.writeTextFile(path, generatedFtplugins[path].join("\n"));
await denops.call("dpp#util#_dos2unix", path);
}
}

Expand Down

0 comments on commit 469de2d

Please sign in to comment.