Coder Social home page Coder Social logo

dired.nvim's Issues

Search in dired buffer

Firstly, I'd like to convey my gratitude for creating such an exceptional plugin. I have been a longtime user of nvimtree, but I genuinely believe that your plugin has immense potential. I'm hopeful that you will continue to develop it, adding even more valuable features.

Issue Encountered

Currently, there seems to be an unexpected behavior when attempting to search within the dired buffer using the / key. For example, after invoking the :Dired command, when I press / to search within a directory containing numerous files and folders, it redirects me to the root directory of my system, which is not the desired outcome.

Feature Requests

  1. Buffer Search Capability: It would be immensely beneficial to be able to easily search within the dired buffer. then for the matching the cursor will jump to the dir name so easily hit enter.
  2. Intuitive Keybinding Support: While I've managed to create my own keybindings, as seen below, an integrated approach would certainly enhance user experience.
local M = {}

local function dired_key_mapping()
    local map = vim.api.nvim_buf_set_keymap
    local opt = { silent = true, noremap = true }

    -- Set buffer-local mappings for 'dired' filetype
    map(0, 'n', 'h', ':DiredGoBack<CR>', opt)
    map(0, 'n', 'l', ':DiredEnter<CR>', opt)
end

M.setup = function()
    vim.api.nvim_create_autocmd("FileType", {
        pattern = "dired",
        callback = dired_key_mapping
    })
end

return M
  1. Adding Block editing
  2. Adding support for nerd icons for the dired buffer
  3. Support for changing permission on fly

Thank you once again, and please keep up the excellent work!

Toggling sort order fails because M.get_next_sort_order() returns nil.

I've looked into the issue and I think I found a fix, before creating the PR I want to confirm that this isn't an issue only I'm experiencing.
my set up is taken from the README, haven't done anything special to it.
and it works as expected expect when trying to change how the list is sorted.(:DiredToggleSortOrder or pressing ',')
it fails because M.get_next_sort_order() returns nil.

function M.get_next_sort_order()
    local current = vim.g.dired_sort_order
    local sorting_functions = { "name", "date", "dirs" }
    local idx = 0
    for i, str in ipairs(sorting_functions) do
        if str == current then
            table.remove(sorting_functions, i)
            idx = i
        end
    end
    if idx > #sorting_functions then
        idx = 1
    end
    return sorting_functions[idx]
end

E5108: Error executing lua attempt to compare two table values
stack traceback:
[C]: in function 'sort'
.../.local/share/nvim/lazy/dired.nvim/lua/dired/display.lua:91: in function 'get_directory_listing'
.../.local/share/nvim/lazy/dired.nvim/lua/dired/display.lua:144: in function 'display_dired_listing'
.../.local/share/nvim/lazy/dired.nvim/lua/dired/display.lua:25: in function 'render'
...on/.local/share/nvim/lazy/dired.nvim/lua/dired/dired.lua:198: in function 'toggle_sort_order'
[string ":lua"]:1: in main chunk

quit from dired buffer not implemented

I want to express my appreciation for the excellent package, and I'm finding it very useful. However, I've encountered lack of feature when working with Dired mode/buf in the package.

Currently, when I enter a Dired buffer, there is no direct way to exit the buffer without opening or creating a file.

fails to start

I'm getting this error when executing :Dired or nvim ..

E5108: Error executing lua .../nvim/site/pack/packer/start/dired.nvim/lua/dired/fs.lua:235: attempt to index a nil value
stack traceback:
        .../nvim/site/pack/packer/start/dired.nvim/lua/dired/fs.lua:235: in function 'New'
        ...vim/site/pack/packer/start/dired.nvim/lua/dired/dirs.lua:15: in function 'get_dir_content'
        .../site/pack/packer/start/dired.nvim/lua/dired/display.lua:56: in function 'get_dired_listing'
        .../site/pack/packer/start/dired.nvim/lua/dired/display.lua:79: in function 'display_dired_listing'
        .../site/pack/packer/start/dired.nvim/lua/dired/display.lua:37: in function 'render'
        ...im/site/pack/packer/start/dired.nvim/lua/dired/dired.lua:58: in function 'init_dired'
        ...im/site/pack/packer/start/dired.nvim/lua/dired/dired.lua:82: in function 'open'
        [string ":lua"]:1: in main chunk

Os: MacOs
Nvim version: v0.8.0-dev+595-g95c65a6b2

How can I move directories and files

Sys: MacOS Apple Silicon
Terminal: Iterm2
Question:

Hi, I'm wondering how I can Move Marked files/directories in visual or normal mode.

When I select files/directories and I try to move them with MoveMarked or MoveRange I end up only highlighting the dir I'm trying to move it to. I've tried many variants and I can't seem to figure it out.

Can't be loaded

E5113: Error while calling lua chunk: ...vim/site/pack/packer/start/dired.nvim/lua/dired/init.lua:104: Vim(autocmd):E216: No such group or event: FileExplorer *
stack traceback:
        [C]: in function 'cmd'
        ...vim/site/pack/packer/start/dired.nvim/lua/dired/init.lua:104: in function 'setup'
        

Neovim version: NVIM v0.7.2

    use {
        'X3eRo0/dired.nvim',
        requires = 'MunifTanjim/nui.nvim'
    }
require('dired').setup {
  path_separator = '/',
  show_banner = false,
  show_hidden = true
}

Maybe it is a conflict with nvim-tree?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.