Skip to content

Commit

Permalink
feat!: mnemonic keymaps
Browse files Browse the repository at this point in the history
Signed-off-by: Jint-lzxy <[email protected]>
  • Loading branch information
Jint-lzxy committed Jun 21, 2024
1 parent 7f1d7fc commit fcb908b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions lua/keymap/tool.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ local plug_map = {
:with_noremap()
:with_silent()
:with_desc("tool: Find files"),
["n|<leader>fw"] = map_callback(function()
require("search").open({ collection = "word" })
["n|<leader>fp"] = map_callback(function()
require("search").open({ collection = "pattern" })
end)
:with_noremap()
:with_silent()
Expand All @@ -112,8 +112,8 @@ local plug_map = {
:with_noremap()
:with_silent()
:with_desc("tool: Locate Git objects"),
["n|<leader>fr"] = map_callback(function()
require("search").open({ collection = "rootdir" })
["n|<leader>fd"] = map_callback(function()
require("search").open({ collection = "dossier" })
end)
:with_noremap()
:with_silent()
Expand Down
4 changes: 2 additions & 2 deletions lua/modules/configs/tool/search.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ return function()
},
},
-- Search using patterns
word = {
pattern = {
initial_tab = 1,
tabs = {
{
Expand Down Expand Up @@ -89,7 +89,7 @@ return function()
},
},
-- Retrieve dossiers
rootdir = {
dossier = {
initial_tab = 1,
tabs = {
{
Expand Down
4 changes: 2 additions & 2 deletions lua/modules/configs/ui/alpha.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ return function()
{ noremap = true, silent = true, nowait = true }
),
button(
"space f r",
"space f d",
icons.ui.FolderWithHeart .. "Retrieve dossiers",
leader,
nil,
{ noremap = true, silent = true, nowait = true }
),
button(
"space f w",
"space f p",
icons.documents.Word .. "Find patterns",
leader,
nil,
Expand Down
4 changes: 2 additions & 2 deletions tutor/dots.tutor
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ the "Frecency" and "Oldfiles" tabs enable searches based on the most frequently
recently opened files, respectively, while the "Buffers" tab facilitates searches
among currently opened buffers.

For pattern searches within the current working directory, press `<leader>`{normal}`f`{normal}`w`{normal}. This
For pattern searches within the current working directory, press `<leader>`{normal}`f`{normal}`p`{normal}. This
functionality leverages [ripgrep](https://github.com/BurntSushi/ripgrep) for its search capabilities, making it as intuitive
to use as ripgrep itself. As with the "file finder collection", `<Tab>`{normal} and `<S-Tab>`{normal} can
be used to cycle through the search tabs. The "Word under cursor" tab displays all
instances of the word located under the current cursor position.

Nvimdots also offers comprehensive dossier management, seamlessly integrated with
Telescope. Press `<leader>`{normal}`f`{normal}`r`{normal} to access the recent dossiers list. The first tab
Telescope. Press `<leader>`{normal}`f`{normal}`d`{normal} to access the recent dossiers list. The first tab
presents the currently saved sessions; select a session and press `<CR>`{normal} to restore
the corresponding session. The second tab lists various projects. Instead of exiting
this interface, you can add the current working directory to the project list by
Expand Down

0 comments on commit fcb908b

Please sign in to comment.