moved remaps to their own file
This commit is contained in:
parent
d2bc567a8c
commit
7b3e08f8a9
19
lua/nat/remap.lua
Normal file
19
lua/nat/remap.lua
Normal file
@ -0,0 +1,19 @@
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "<5C>"
|
||||
|
||||
-- https://neovim.reddit.com/comments/xykklt/_/j4gxyqx
|
||||
vim.keymap.set("n", "<C-_>", function()
|
||||
require("Comment.api").toggle.linewise.current() end,
|
||||
{ noremap = true, silent = true }
|
||||
)
|
||||
|
||||
vim.keymap.set("n", "<leader>Tt", function() vim.cmd [[Neotree toggle left]] end)
|
||||
vim.keymap.set("n", "<leader>Tf", function() vim.cmd [[Neotree toggle float]] end)
|
||||
|
||||
-- Map Alt + Up to move the current line up
|
||||
vim.keymap.set("n", "<A-Up>", ":m .-2<CR>==", { noremap = true, silent = true })
|
||||
vim.keymap.set("i", "<A-Up>", "<Esc>:m .-2<CR>==gi", { noremap = true, silent = true })
|
||||
|
||||
-- -- Map Alt + Down to move the current line down
|
||||
vim.keymap.set("n", "<A-Down>", ":m .+1<CR>==", { noremap = true, silent = true })
|
||||
vim.keymap.set("i", "<A-Down>", "<Esc>:m .+1<CR>==gi", { noremap = true, silent = true })
|
@ -1,45 +1,35 @@
|
||||
vim.g.mapleader = " "
|
||||
-- local HOME = "C:\\Users\\Nathan"
|
||||
local HOME = os.getenv("HOME") or "~"
|
||||
|
||||
local set = vim.opt
|
||||
local HOME = "C:\\Users\\Nathan"
|
||||
vim.opt.guicursor = ""
|
||||
vim.opt.nu = true
|
||||
|
||||
set.guicursor = ""
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- set.number = "relativenumber"
|
||||
set.relativenumber = true
|
||||
vim.opt.paste = true
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.expandtab = false
|
||||
|
||||
set.tabstop = 2
|
||||
set.softtabstop = 2
|
||||
set.shiftwidth = 2
|
||||
set.expandtab = true
|
||||
vim.opt.smartindent = true
|
||||
|
||||
set.smartindent = true
|
||||
vim.opt.wrap = false
|
||||
|
||||
set.wrap = false
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undodir = HOME .. "/.vim/undodir"
|
||||
vim.opt.undofile = true
|
||||
|
||||
set.swapfile = false
|
||||
set.backup = false
|
||||
set.undodir = HOME .. "/.vim/undodir"
|
||||
set.undofile = true
|
||||
vim.opt.hlsearch = false
|
||||
vim.opt.incsearch = true
|
||||
|
||||
set.hlsearch = false
|
||||
set.incsearch = true
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
set.termguicolors = true
|
||||
vim.opt.scrolloff = 8
|
||||
vim.opt.signcolumn = "yes"
|
||||
vim.opt.isfname:append("@-@")
|
||||
|
||||
set.scrolloff = 8
|
||||
set.signcolumn = "yes"
|
||||
set.isfname:append("@-@")
|
||||
vim.opt.updatetime = 50
|
||||
|
||||
set.updatetime = 50
|
||||
|
||||
-- set.colorcolumn = "161"
|
||||
|
||||
-- https://neovim.reddit.com/comments/xykklt/_/j4gxyqx
|
||||
vim.keymap.set("n", "<C-_>", function()
|
||||
require('Comment.api').toggle.linewise.current() end,
|
||||
{ noremap = true, silent = true }
|
||||
)
|
||||
|
||||
vim.keymap.set("n", "<leader>tt", function() vim.cmd [[Neotree left toggle]] end)
|
||||
vim.keymap.set("n", "<leader>tf", function() vim.cmd [[Neotree float]] end)
|
||||
-- vim.opt.colorcolumn = "161"
|
||||
|
Loading…
Reference in New Issue
Block a user