Skip to content

Commit 517fd79

Browse files
committed
CursorMoved autocmd - gotta figure out logging & callbacks
Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
1 parent 457a251 commit 517fd79

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

nvim-git-rebase-todo/nvim-git-rebase-todo.ts

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
// import fs from "fs";
2+
13
import { NvimPlugin } from "neovim";
24

5+
/**
6+
* TODO `console.log`s break stuff
7+
*/
8+
39
export default function nvimGitRebaseTodo(plugin: NvimPlugin): void {
410
const { nvim: vim } = plugin;
511

@@ -37,10 +43,28 @@ export default function nvimGitRebaseTodo(plugin: NvimPlugin): void {
3743
await vim.buffer.append("BufEnter for git-rebase-todo File?");
3844
// const w = new vim.Window({});
3945
// w.setOption("width", 10);
40-
const w = await vim.window;
41-
42-
console.log(w);
46+
//
47+
// const w = await vim.window;
48+
// console.log(w);
4349
},
4450
{ sync: false, pattern: "git-rebase-todo", eval: 'expand("<afile>")' }
4551
);
52+
53+
// plugin.registerAutocmd(
54+
// /**
55+
// * :help events
56+
// *
57+
// * CursorMoved?
58+
// */
59+
// "CursorMoved",
60+
// async (_fileName: string) => {
61+
// // await vim.buffer.append("BufEnter for git-rebase-todo File?");
62+
// // const w = new vim.Window({});
63+
// // w.setOption("width", 10);
64+
// // const w = await vim.window;
65+
// // eslint-disable-next-line prefer-rest-params
66+
// // console.log("cursor moved!", arguments);
67+
// },
68+
// { sync: false, pattern: "git-rebase-todo", eval: 'expand("<afile>")' }
69+
// );
4670
}

0 commit comments

Comments
 (0)