@@ -687,6 +687,51 @@ now_if_args(function()
687687 Config .new_autocmd (' LspAttach' , nil , on_attach , " Set 'omnifunc'" )
688688end )
689689
690+ -- Navigate and manipulate file system
691+ --
692+ -- Navigation is done using column view (Miller columns) to display nested
693+ -- directories, they are displayed in floating windows in top left corner.
694+ --
695+ -- Manipulate files and directories by editing text as regular buffers.
696+ --
697+ -- Example usage:
698+ -- - `<Leader>ed` - open current working directory
699+ -- - `<Leader>ef` - open directory of current file (needs to be present on disk)
700+ --
701+ -- Basic navigation:
702+ -- - `l` - go in entry at cursor: navigate into directory or open file
703+ -- - `h` - go out of focused directory
704+ -- - Navigate window as any regular buffer
705+ -- - Press `g?` inside explorer to see more mappings
706+ --
707+ -- Basic manipulation:
708+ -- - After any following action, press `=` in Normal mode to synchronize, read
709+ -- carefully about actions, press `y` or `<CR>` to confirm
710+ -- - New entry: press `o` and type its name; end with `/` to create directory
711+ -- - Rename: press `C` and type new name
712+ -- - Delete: type `dd`
713+ -- - Move/copy: type `dd`/`yy`, navigate to target directory, press `p`
714+ --
715+ -- See also:
716+ -- - `:h MiniFiles-navigation` - more details about how to navigate
717+ -- - `:h MiniFiles-manipulation` - more details about how to manipulate
718+ -- - `:h MiniFiles-examples` - examples of common setups
719+ now_if_args (function ()
720+ -- Enable directory/file preview
721+ require (' mini.files' ).setup ({ windows = { preview = true } })
722+
723+ -- Add common bookmarks for every explorer. Example usage inside explorer:
724+ -- - `'c` to navigate into your config directory
725+ -- - `g?` to see available bookmarks
726+ local add_marks = function ()
727+ MiniFiles .set_bookmark (' c' , vim .fn .stdpath (' config' ), { desc = ' Config' })
728+ local minideps_plugins = vim .fn .stdpath (' data' ) .. ' /site/pack/deps/opt'
729+ MiniFiles .set_bookmark (' p' , minideps_plugins , { desc = ' Plugins' })
730+ MiniFiles .set_bookmark (' w' , vim .fn .getcwd , { desc = ' Working directory' })
731+ end
732+ Config .new_autocmd (' User' , ' MiniFilesExplorerOpen' , add_marks , ' Add bookmarks' )
733+ end )
734+
690735-- Miscellaneous small but useful functions. Example usage:
691736-- - `<Leader>oz` - toggle between "zoomed" and regular view of current buffer
692737-- - `<Leader>or` - resize window to its "editable width"
@@ -914,51 +959,6 @@ later(function() require('mini.comment').setup() end)
914959-- - `:h MiniDiff.gen_source` - available built-in sources
915960later (function () require (' mini.diff' ).setup () end )
916961
917- -- Navigate and manipulate file system
918- --
919- -- Navigation is done using column view (Miller columns) to display nested
920- -- directories, they are displayed in floating windows in top left corner.
921- --
922- -- Manipulate files and directories by editing text as regular buffers.
923- --
924- -- Example usage:
925- -- - `<Leader>ed` - open current working directory
926- -- - `<Leader>ef` - open directory of current file (needs to be present on disk)
927- --
928- -- Basic navigation:
929- -- - `l` - go in entry at cursor: navigate into directory or open file
930- -- - `h` - go out of focused directory
931- -- - Navigate window as any regular buffer
932- -- - Press `g?` inside explorer to see more mappings
933- --
934- -- Basic manipulation:
935- -- - After any following action, press `=` in Normal mode to synchronize, read
936- -- carefully about actions, press `y` or `<CR>` to confirm
937- -- - New entry: press `o` and type its name; end with `/` to create directory
938- -- - Rename: press `C` and type new name
939- -- - Delete: type `dd`
940- -- - Move/copy: type `dd`/`yy`, navigate to target directory, press `p`
941- --
942- -- See also:
943- -- - `:h MiniFiles-navigation` - more details about how to navigate
944- -- - `:h MiniFiles-manipulation` - more details about how to manipulate
945- -- - `:h MiniFiles-examples` - examples of common setups
946- later (function ()
947- -- Enable directory/file preview
948- require (' mini.files' ).setup ({ windows = { preview = true } })
949-
950- -- Add common bookmarks for every explorer. Example usage inside explorer:
951- -- - `'c` to navigate into your config directory
952- -- - `g?` to see available bookmarks
953- local add_marks = function ()
954- MiniFiles .set_bookmark (' c' , vim .fn .stdpath (' config' ), { desc = ' Config' })
955- local minideps_plugins = vim .fn .stdpath (' data' ) .. ' /site/pack/deps/opt'
956- MiniFiles .set_bookmark (' p' , minideps_plugins , { desc = ' Plugins' })
957- MiniFiles .set_bookmark (' w' , vim .fn .getcwd , { desc = ' Working directory' })
958- end
959- Config .new_autocmd (' User' , ' MiniFilesExplorerOpen' , add_marks , ' Add bookmarks' )
960- end )
961-
962962-- Git integration for more straightforward Git actions based on Neovim's state.
963963-- It is not meant as a fully featured Git client, only to provide helpers that
964964-- integrate better with Neovim. Example usage:
0 commit comments