mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-29 13:51:50 +02:00
22 lines
819 B
Lua
22 lines
819 B
Lua
-- Mapping data with "desc" stored directly by vim.keymap.set().
|
|
--
|
|
-- Please use this mappings table to set keyboard mapping since this is the
|
|
-- lower level configuration and more robust one. (which-key will
|
|
-- automatically pick-up stored data by this setting.)
|
|
local utils = require "astronvim.utils"
|
|
return {
|
|
-- first key is the mode
|
|
n = {
|
|
-- second key is the lefthand side of the map
|
|
-- mappings seen under group name "Buffer"
|
|
["<leader>bn"] = { "<cmd>tabnew<cr>", desc = "New tab" },
|
|
-- quick save
|
|
["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
|
|
["<leader>tp"] = { function() utils.toggle_term_cmd("ipython") end, desc = "ToggleTerm python" },
|
|
},
|
|
t = {
|
|
-- setting a mapping to false will disable it
|
|
-- ["<esc>"] = false,
|
|
},
|
|
}
|