diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2021-02-24 02:41:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-24 02:41:00 +0100 |
| commit | 10627e889e82a82560b6fc48ea0ca20e1963d07f (patch) | |
| tree | b6c6a782184f3c60ce5ad7e4636cba93c005fae2 /lua/telescope/mappings.lua | |
| parent | 4dd35ef0e154ab1836fc923a33196a4101a97a9c (diff) | |
feat: advanced normal mode (#463)
Add <count>j and k to normal mode and H and L to jump at top and bottom of displayed results
Diffstat (limited to 'lua/telescope/mappings.lua')
| -rw-r--r-- | lua/telescope/mappings.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lua/telescope/mappings.lua b/lua/telescope/mappings.lua index efc833e..95ce279 100644 --- a/lua/telescope/mappings.lua +++ b/lua/telescope/mappings.lua @@ -38,6 +38,8 @@ mappings.default_mappings = config.values.default_mappings or { -- TODO: This would be weird if we switch the ordering. ["j"] = actions.move_selection_next, ["k"] = actions.move_selection_previous, + ["H"] = actions.move_to_top, + ["L"] = actions.move_to_bottom, ["<Down>"] = actions.move_selection_next, ["<Up>"] = actions.move_selection_previous, @@ -110,7 +112,7 @@ local telescope_map = function(prompt_bufnr, mode, key_bind, key_func, opts) ) else local key_id = assign_function(prompt_bufnr, key_func) - local prefix = "" + local prefix local map_string if opts.expr then @@ -122,10 +124,14 @@ local telescope_map = function(prompt_bufnr, mode, key_bind, key_func, opts) else if mode == "i" and not opts.expr then prefix = "<cmd>" + elseif mode == "n" then + prefix = ":<C-U>" + else + prefix = ":" end map_string = string.format( - "%s:lua require('telescope.mappings').execute_keymap(%s, %s)<CR>", + "%slua require('telescope.mappings').execute_keymap(%s, %s)<CR>", prefix, prompt_bufnr, key_id |
