update
This commit is contained in:
parent
0b10ca5681
commit
d0b9672730
2 changed files with 30 additions and 8 deletions
34
mappings.lua
34
mappings.lua
|
@ -1,5 +1,5 @@
|
||||||
local scratch = function(extension)
|
local scratch = function(extension)
|
||||||
os.execute('mkdir -p ~/dev/scratches/')
|
os.execute "mkdir -p ~/dev/scratches/"
|
||||||
local date = os.date "%Y-%m-%dT%H:%M:%S"
|
local date = os.date "%Y-%m-%dT%H:%M:%S"
|
||||||
local filepath = "~/dev/scratches/scratch_" .. date .. extension
|
local filepath = "~/dev/scratches/scratch_" .. date .. extension
|
||||||
vim.cmd("execute 'edit " .. filepath .. "'")
|
vim.cmd("execute 'edit " .. filepath .. "'")
|
||||||
|
@ -25,20 +25,46 @@ return {
|
||||||
["<leader>s"] = { name = " Scratch File" },
|
["<leader>s"] = { name = " Scratch File" },
|
||||||
["<leader>ss"] = { function() scratch ".txt" end, desc = "New text scratch file" },
|
["<leader>ss"] = { function() scratch ".txt" end, desc = "New text scratch file" },
|
||||||
["<leader>sn"] = { function() scratch ".json" end, desc = "New json scratch file" },
|
["<leader>sn"] = { function() scratch ".json" end, desc = "New json scratch file" },
|
||||||
["<leader>ss"] = { function() scratch ".sql" end, desc = "New sql scratch file" },
|
["<leader>sq"] = { function() scratch ".sql" end, desc = "New sql scratch file" },
|
||||||
["<leader>st"] = { function() scratch ".ts" end, desc = "New ts scratch file" },
|
["<leader>st"] = { function() scratch ".ts" end, desc = "New ts scratch file" },
|
||||||
["<leader>sb"] = { function() scratch ".sh" end, desc = "New shell scratch file" },
|
["<leader>sb"] = { function() scratch ".sh" end, desc = "New shell scratch file" },
|
||||||
["<leader>sj"] = { function() scratch ".js" end, desc = "New js scratch file" },
|
["<leader>sj"] = { function() scratch ".js" end, desc = "New js scratch file" },
|
||||||
|
["∆"] = {
|
||||||
|
"<Esc>:m .+1<CR>==g",
|
||||||
|
desc = "Move the line up",
|
||||||
|
},
|
||||||
|
["˚"] = {
|
||||||
|
"<Esc>:m .-2<CR>==g",
|
||||||
|
desc = "Move the line down",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
v = {
|
v = {
|
||||||
["<leader>gf"] = { ":OpenInGHFile <CR>", desc = "Open in github" },
|
["<leader>gf"] = { ":OpenInGHFile <CR>", desc = "Open in github" },
|
||||||
["y"] = { '"*y', desc = "Copy to system clipboard" },
|
["y"] = { '"*y', desc = "Copy to system clipboard" },
|
||||||
["p"] = { '"*p', desc = "Paste from system clipboard" },
|
["p"] = { '"*p', desc = "Paste from system clipboard" },
|
||||||
|
["∆"] = {
|
||||||
|
cmd = ":m '>+1<CR>gv=gv",
|
||||||
|
desc = "Move the selected text up",
|
||||||
|
},
|
||||||
|
["˚"] = {
|
||||||
|
cmd = ":m '<-2<CR>gv=gv",
|
||||||
|
desc = "Move the selected text down",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
x = {
|
||||||
|
["∆"] = {
|
||||||
|
cmd = ":m '>+1<CR>gv=gv",
|
||||||
|
desc = "Move the selected text up",
|
||||||
|
},
|
||||||
|
["˚"] = {
|
||||||
|
desc = "Move the selected text down",
|
||||||
|
cmd = ":m '<-2<CR>gv=gv",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
i = {
|
i = {
|
||||||
["<C-h>"] = { "<Left>", desc = "Left" },
|
|
||||||
["<C-j>"] = { "<Down>", desc = "Down" },
|
|
||||||
["<C-k>"] = { "<Up>", desc = "Up" },
|
["<C-k>"] = { "<Up>", desc = "Up" },
|
||||||
|
["<C-j>"] = { "<Down>", desc = "Down" },
|
||||||
|
["<C-h>"] = { "<Left>", desc = "Left" },
|
||||||
["<C-l>"] = { "<Right>", desc = "Right" },
|
["<C-l>"] = { "<Right>", desc = "Right" },
|
||||||
},
|
},
|
||||||
c = {
|
c = {
|
||||||
|
|
|
@ -39,8 +39,4 @@ return {
|
||||||
},
|
},
|
||||||
cmd = "Glow"
|
cmd = "Glow"
|
||||||
},
|
},
|
||||||
-- {
|
|
||||||
-- "simrat39/inlay-hints.nvim",
|
|
||||||
-- },
|
|
||||||
-- This is not working so disabling for now...
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue