Compare commits

..

No commits in common. "b9be6fba5a624c04878b9ff70b67a699e7710c6d" and "772bf3a3c1b97e299161a9336e3584e3ef1943aa" have entirely different histories.

2 changed files with 11 additions and 7 deletions

View File

@ -18,8 +18,17 @@ vim.keymap.set('n', '-', function()
-- Invoke netrw on the directory containing the current file
vim.fn.execute(string.format("edit %s", directory))
if filename ~= '' then
-- 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)

View File

@ -1,10 +1,5 @@
return {
{
'tummetott/unimpaired.nvim',
config = function()
require('unimpaired').setup({})
end
},
{ 'tummetott/unimpaired.nvim' },
{ 'stevearc/dressing.nvim' },
{ 'kevinhwang91/nvim-bqf' },
}