chore: refine keymap

This commit is contained in:
Fabio Lenherr / DashieTM 2023-01-02 02:03:10 +01:00
parent a2011eab8c
commit 747aa12efc
2 changed files with 101 additions and 41 deletions

View file

@ -3,45 +3,102 @@
## Space as leader ## Space as leader
## Debugging ## Debugging
- F5: toggle breakpoint | key | Description |
- F6: step over breakpoint | --- | ------------------------- |
- F7: step into breakpoint | F5 | toggle breakpoint |
- F8: start debugging | F6 | step over breakpoint |
- F9: continue from breakpoint | F7 | step into breakpoint |
- F10: close debug UI | F8 | start debugging |
| F9 | continue from breakpoint |
| F10 | close debug UI |
## Nerd Tree ## Nerd Tree
- t: toggle open | key | Description |
- f: focus tree | --- | ------------------------- |
| t |toggle open |
| f | focus tree |
## buffer switching ## buffer switching
- F1: next buffer (cycles) | key | Description |
- F2: previous buffer (cycles) | --- | ------------------------- |
| F1 | next buffer (cycles) |
| F2 | previous buffer (cycles) |
## formatting ## formatting
- F4: format this file | key | Description |
| --- | ------------------------- |
| F4 | format this file |
## telescope ## telescope
- ff: find files | key | Description |
- fg: live ripgrep | --- | ------------------------- |
- fb: find buffers | ff | find files |
- fh: help for functions etc | fg | live ripgrep |
- fp: find projects | fb | find buffers |
| fh | help for functions etc |
| fp | find projects |
### project telescope
<table> <tr> <th> normal mode </th> <th> insert mode </th></tr>
<tr> <td>
| key | Description |
| --- | --------------------------------- |
| d | delete project |
| r | rename project |
| c | create project |
| s | search files in project |
| b | browse files in project |
| w | change directory to project |
| R | recently opened files in project |
| f | find file within project |
</td> <td>
| key | Description |
| -------- | --------------------------------- |
| Ctrl + d | delete project |
| Ctrl + v | rename project |
| Ctrl + a | create project |
| Ctrl + s | search files in project |
| Ctrl + b | browse files in project |
| Ctrl + l | change directory to project |
| Ctrl + r | recently opened files in project |
| Ctrl + f | find file within project |
</td> </tr> </table>
## toggletrouble ## toggletrouble
- Ctrl + f: show errors and warnings | key | Description |
| -------- | ------------------------- |
| Ctrl + f | show errors and warnings |
## cmp ## cmp
Note, these require the cmp list view to be open to do anything! Note, these require the cmp list view to be open to do anything!
- Ctrl + b: scroll docs up | key | Description |
- Ctrl + f: scroll docs down | ----------- | --------------------------------------------------------- |
- Ctrl + e: cancel cmp | Ctrl + b | scroll docs up |
- Enter: write selected suggestion (does nothing if not selected) | Ctrl + f | scroll docs down |
- Tab: scroll down through suggestion list | Ctrl + e | cancel cmp |
- Shift + Tab: scroll up through suggestion list | Enter | write selected suggestion (does nothing if not selected) |
| Tab |scroll down through suggestion list |
| Shift + Tab | scroll up through suggestion list |
## snippets ## snippets
These require you to be inside a snippet! These require you to be inside a snippet!
- Ctrl + j: jump to next entry | key | Description |
- Ctrl + k: jump to previous entry | -------- | ------------------------- |
| Ctrl + j | jump to next entry |
| Ctrl + k | jump to previous entry |
## Dashboard
only available on dashboard
| key | Description |
| --- | ------------------------- |
| f | file |
| e | new file |
| p | find project |
| r | recently used files |
| t | find text |
| c | open config |
| q | quit |

View file

@ -1,22 +1,25 @@
-- local status_ok, project = pcall(require, "project_nvim")
-- if not status_ok then
-- return
-- end
-- project.setup({
-- active = true,
-- on_config_done = nil,
-- manual_mode = false,
-- detection_methods = { "pattern" },
-- patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json" },
-- show_hidden = false,
-- silent_chdir = true,
-- ignore_lsp = {},
-- datapath = vim.fn.stdpath("data"),
-- })
local tele_status_ok, telescope = pcall(require, "telescope") local tele_status_ok, telescope = pcall(require, "telescope")
if not tele_status_ok then if not tele_status_ok then
return return
end end
telescope.load_extension("project") telescope.load_extension("project")
require('telescope').setup {
extensions = {
project = {
base_dirs = {
'~/dev/src',
{'~/dev/src2'},
{'~/dev/src3', max_depth = 4},
{path = '~/dev/src4'},
{path = '~/dev/src5', max_depth = 2},
},
hidden_files = true, -- default: false
theme = "dropdown",
order_by = "asc",
search_by = "title",
sync_with_nvim_tree = true, -- default false
}
}
}