summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/dts/remap.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/dts/remap.lua')
-rw-r--r--.config/nvim/lua/dts/remap.lua70
1 files changed, 0 insertions, 70 deletions
diff --git a/.config/nvim/lua/dts/remap.lua b/.config/nvim/lua/dts/remap.lua
deleted file mode 100644
index d9885de..0000000
--- a/.config/nvim/lua/dts/remap.lua
+++ /dev/null
@@ -1,70 +0,0 @@
-vim.g.mapleader = ' '
-
--- Allow moving of lines with Alt+j and Alt+k.
-vim.keymap.set("n", "<A-j>", ":m .+1<CR>==")
-vim.keymap.set("n", "<A-k>", ":m .-2<CR>==")
-vim.keymap.set("i", "<A-j>", "<Esc>:m .+1<CR>==gi")
-vim.keymap.set("i", "<A-k>", "<Esc>:m .-2<CR>==gi")
-vim.keymap.set("v", "<A-j>", ":m '>+1<CR>gv=gv")
-vim.keymap.set("v", "<A-k>", ":m '<-2<CR>gv=gv")
-
--- Move between window splits with Ctrl+h, Ctrl+j, Ctrl+k, Ctrl+l
-vim.keymap.set("n", "<C-h>", ":wincmd h<CR>")
-vim.keymap.set("n", "<C-j>", ":wincmd j<CR>")
-vim.keymap.set("n", "<C-k>", ":wincmd k<CR>")
-vim.keymap.set("n", "<C-l>", ":wincmd l<CR>")
-vim.keymap.set("i", "<C-h>", "<Esc>:wincmd h<CR>")
-vim.keymap.set("i", "<C-j>", "<Esc>:wincmd j<CR>")
-vim.keymap.set("i", "<C-k>", "<Esc>:wincmd k<CR>")
-vim.keymap.set("i", "<C-l>", "<Esc>:wincmd l<CR>")
-
--- Resize window splits with Ctrl+arrows.
-vim.keymap.set("n", "<C-Up>", ":resize +2<CR>")
-vim.keymap.set("n", "<C-Down>", ":resize -2<CR>")
-vim.keymap.set("n", "<C-Left>", ":vertical resize +2<CR>")
-vim.keymap.set("n", "<C-Right>", ":vertical resize -2<CR>")
-
--- Keep cursor in the center of the window when doing half page jumping.
-vim.keymap.set("n", "<C-u>", "<C-u>zz")
-vim.keymap.set("n", "<C-d>", "<C-d>zz")
-
--- Keep cursor in the center of the windows when moving through search results.
-vim.keymap.set("n", "n", "nzzzv")
-vim.keymap.set("n", "N", "Nzzzv")
-
--- Stops replaced test from been copied. Preserves what was originally yanked.
-vim.keymap.set("x", "<leader>p", [["_dP]])
-vim.keymap.set("n", "<leader>d", [["_d]])
-
--- Append line below to end of current line and do not move cursor to the end of the line.
-vim.keymap.set("n", "J", "mzJ`z")
-
--- Easy insertion of trailing ; or , in insert mode.
-vim.keymap.set("i", ";;", "<Esc>A;")
-vim.keymap.set("i", ",,", "<Esc>A,")
-
--- Allow yanking into system clipboard.
-vim.keymap.set({"n", "v"}, "<leader>y", [["+y]])
-vim.keymap.set("n", "<leader>Y", [["+Y]])
-
--- Globally replace word that cursor is on.
-vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
-
--- Toggle hidden characters.
-vim.keymap.set("n", "<leader>l", function()
- vim.opt.list = not(vim.opt.list:get())
-end)
-
--- Move between buffers
-vim.keymap.set("n", "[b", ":bprevious<CR>")
-vim.keymap.set("n", "]b", ":bnext<CR>")
--- Close current buffer.
-vim.keymap.set("n", "<leader>c", ":bdelete<CR>")
-vim.keymap.set("n", ">b", function()
- require("dts.utils.buffer").move(vim.v.count > 0 and vim.v.count or 1)
-end)
-vim.keymap.set("n", "<b", function()
- require("dts.utils.buffer").move(-(vim.v.count > 0 and vim.v.count or 1))
-end)
- -- Force close current buffer.
-vim.keymap.set("n", "<leader>C", ":bdelete!<CR>")