ayamir / nvimdots

A well configured and structured Neovim.
BSD 3-Clause "New" or "Revised" License
2.82k stars 451 forks source link

Feat/telescope collections keymaps #1303

Closed ayamir closed 1 week ago

ayamir commented 1 week ago

1299

ayamir commented 1 week ago

The reason I changed the key bindings was to keep them as consistent with old keymaps as possible.

ayamir commented 1 week ago

Shall we also update dots.tutor here as well? I think it would be great to introduce this to new users lol

forgot this, will commit for it later tonight.

ayamir commented 1 week ago

@Jint-lzxy Done

Jint-lzxy commented 1 week ago

@ayamir I've replaced all instances of "root directory management" with either "(current) working directory management" or "dossier management" bc I really couldn't find any references to the original term. Could u kindly explain why u chose that term, as I might have missed something (quite likely lol)?

ayamir commented 1 week ago

@ayamir I've replaced all instances of "root directory management" with either "(current) working directory management" or "dossier management" bc I really couldn't find any references to the original term. Could u kindly explain why u chose that term, as I might have missed something (quite likely lol)?

It's ok for me. The reason why I use rootdir is to keep consistency with the keymap i.e. <leader>fr. BTW, <leader>fw is better to keep the functionality to find "word" IMO. We should introduce no or as few new keymaps as possible to prevent conflicts with user customizations.

Jint-lzxy commented 1 week ago

We should introduce no or as few new keymaps as possible to prevent conflicts with user customizations.

Yeah, that's true, but I don't think it's ideal for long-term use since the way Telescope works has fundamentally changed. For example, collection = "word" isn't really searching for a specific "word" but rather "patterns" in a broader sense, and collection = "rootdir" isn't just about projects' root directories but encompasses general dossier management (or a collection of files). For instance, Zoxide operates on the current directory, which isn't necessarily the root directory unless we're specifically referring to chroot(2) or the current project's root directory. afaiu *BSD, macOS, and probably Linux (though I'm not as familiar) never use "root directory" in the context of chdir(2). So imho it's indeed challenging to rebuild that muscle memory, but creating a mnemonic is far more important for me lol

The reason why I use rootdir is to keep consistency with the keymap i.e. <leader>fr.

... hence I would suggest changing rootdir to dossier, and the corresponding keymap to <leader>fd

BTW, <leader>fw is better to keep the functionality to find "word" IMO.

... and use <leader>fp for pattern.

ayamir commented 1 week ago

OK, it's fine to me.