Skip to content

Commit cac7a42

Browse files
committed
tab to space
1 parent 76e6f06 commit cac7a42

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

src/content/blog/2025-11-26-vim-ekiden.mdx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,25 @@ Oil.nvim のバッファ上で `<Leader>o` を押すと、その位置のパス
3636

3737
```lua
3838
vim.api.nvim_create_autocmd('FileType', {
39-
pattern = 'oil',
40-
callback = function(args)
41-
vim.keyma.set('n',
42-
'<Leader>o',
43-
function()
44-
local entry = oil.get_cursor_entry()
45-
local current_dir = oil.get_current_dir(args.buf) or vim.fn.getcwd()
39+
pattern = 'oil',
40+
callback = function(args)
41+
vim.keyma.set('n',
42+
'<Leader>o',
43+
function()
44+
local entry = oil.get_cursor_entry()
45+
local current_dir = oil.get_current_dir(args.buf) or vim.fn.getcwd()
4646

47-
if entry then
48-
-- -reveal でカーソル位置のエントリにフォーカス
49-
local reveal_path = current_dir .. entry.name
50-
vim.cmd(string.format('Fern %s -reveal=%s',
51-
vim.fn.fnameescape(current_dir),
52-
vim.fn.fnameescape(reveal_path)))
53-
else
54-
vim.cmd(string.format('Fern %s', vim.fn.fnameescape(current_dir)))
55-
end
56-
end, { buffer = args.buf })
57-
end,
47+
if entry then
48+
-- -reveal でカーソル位置のエントリにフォーカス
49+
local reveal_path = current_dir .. entry.name
50+
vim.cmd(string.format('Fern %s -reveal=%s',
51+
vim.fn.fnameescape(current_dir),
52+
vim.fn.fnameescape(reveal_path)))
53+
else
54+
vim.cmd(string.format('Fern %s', vim.fn.fnameescape(current_dir)))
55+
end
56+
end, { buffer = args.buf })
57+
end,
5858
})
5959
```
6060

0 commit comments

Comments
 (0)