Compare commits
2 Commits
772bf3a3c1
...
b9be6fba5a
Author | SHA1 | Date | |
---|---|---|---|
b9be6fba5a | |||
c235fb88e1 |
@ -18,17 +18,8 @@ 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
|
||||
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
|
||||
vim.fn.search('\\<' .. filename .. '\\>')
|
||||
end
|
||||
end)
|
||||
|
@ -1,5 +1,10 @@
|
||||
return {
|
||||
{ 'tummetott/unimpaired.nvim' },
|
||||
{
|
||||
'tummetott/unimpaired.nvim',
|
||||
config = function()
|
||||
require('unimpaired').setup({})
|
||||
end
|
||||
},
|
||||
{ 'stevearc/dressing.nvim' },
|
||||
{ 'kevinhwang91/nvim-bqf' },
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user