Compare commits
No commits in common. "b9be6fba5a624c04878b9ff70b67a699e7710c6d" and "772bf3a3c1b97e299161a9336e3584e3ef1943aa" have entirely different histories.
b9be6fba5a
...
772bf3a3c1
@ -18,8 +18,17 @@ vim.keymap.set('n', '-', function()
|
|||||||
|
|
||||||
-- Invoke netrw on the directory containing the current file
|
-- Invoke netrw on the directory containing the current file
|
||||||
vim.fn.execute(string.format("edit %s", directory))
|
vim.fn.execute(string.format("edit %s", directory))
|
||||||
|
|
||||||
if filename ~= '' then
|
if filename ~= '' then
|
||||||
-- In the netrw buffer, move the cursor to the first character of filename
|
-- In the netrw buffer, move the cursor to the first character of filename
|
||||||
vim.fn.search('\\<' .. filename .. '\\>')
|
local buffer = vim.api.nvim_get_current_buf()
|
||||||
|
local lines = vim.api.nvim_buf_get_lines(buffer, 0, -1, true)
|
||||||
|
for row, content in ipairs(lines) do
|
||||||
|
local column = string.find(content, filename)
|
||||||
|
if column then
|
||||||
|
vim.api.nvim_win_set_cursor(0, { row, column - 1 })
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{ 'tummetott/unimpaired.nvim' },
|
||||||
'tummetott/unimpaired.nvim',
|
|
||||||
config = function()
|
|
||||||
require('unimpaired').setup({})
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{ 'stevearc/dressing.nvim' },
|
{ 'stevearc/dressing.nvim' },
|
||||||
{ 'kevinhwang91/nvim-bqf' },
|
{ 'kevinhwang91/nvim-bqf' },
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user