From 16665665448432626c4058bf74233917d0aeec97 Mon Sep 17 00:00:00 2001 From: Stephen Doyle Date: Wed, 5 Jun 2024 21:00:43 +0100 Subject: [PATCH] feat: Add theprimagen remaps and sets --- init.lua | 8 +++++--- lua/custom/init.lua | 1 + lua/custom/remap.lua | 7 +++++++ lua/custom/set.lua | 8 ++++++++ 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 lua/custom/set.lua diff --git a/init.lua b/init.lua index 2357b249..6fafb57a 100644 --- a/init.lua +++ b/init.lua @@ -90,6 +90,9 @@ P.S. You can delete this when you're done too. It's your config now! :) vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' +-- Load custom remaps and sets early before any plugins +require 'custom' + -- Set to true if you have a Nerd Font installed and selected in the terminal vim.g.have_nerd_font = true @@ -840,7 +843,8 @@ require('lazy').setup({ -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. -- vim.cmd.colorscheme 'tokyonight-night' - vim.cmd.colorscheme 'vim' + -- vim.cmd.colorscheme 'vim' + vim.cmd.colorscheme 'default' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' @@ -959,5 +963,3 @@ require('lazy').setup({ -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et - -require 'custom' diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 704c5843..7955ade7 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -1 +1,2 @@ require 'custom.remap' +require 'custom.set' diff --git a/lua/custom/remap.lua b/lua/custom/remap.lua index 955d2103..5ea69b71 100644 --- a/lua/custom/remap.lua +++ b/lua/custom/remap.lua @@ -2,3 +2,10 @@ vim.keymap.set('n', 'pv', vim.cmd.Ex) vim.keymap.set('v', 'J', ":m '>+1gv=gv") vim.keymap.set('v', 'K', ":m '<-2gv=gv") + +-- greatest remap ever +vim.keymap.set('x', 'p', [["_dP]]) + +-- next greatest remap ever : asbjornHaland +vim.keymap.set({ 'n', 'v' }, 'y', [["+y]]) +vim.keymap.set('n', 'Y', [["+Y]]) diff --git a/lua/custom/set.lua b/lua/custom/set.lua new file mode 100644 index 00000000..a22ffa54 --- /dev/null +++ b/lua/custom/set.lua @@ -0,0 +1,8 @@ +vim.opt.tabstop = 4 +vim.opt.softtabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true + +vim.opt.smartindent = true + +vim.opt.incsearch = true