From 6c2fb78c83a95d52416b32e9c7b7135069c9a5e4 Mon Sep 17 00:00:00 2001 From: Kevin James Lausen Date: Sat, 4 Jun 2022 03:16:37 -0400 Subject: [PATCH] Added L-bind(s) for: marks, tabs, & splits. --- lua/user/keymaps.lua | 85 ++++++++++++++++++++++++++++---------------- 1 file changed, 55 insertions(+), 30 deletions(-) diff --git a/lua/user/keymaps.lua b/lua/user/keymaps.lua index b822203..5634cab 100644 --- a/lua/user/keymaps.lua +++ b/lua/user/keymaps.lua @@ -81,61 +81,86 @@ keymap("i", "jk", "", opts) -- "################################################################ keymap("n", "nh", ":nohl", opts) --- "######################################################### --- "# Map nn, to toggle regular line-numberings on, # --- "# to check for which specific line of the file your on. # --- "######################################################### +-- ########################################################## +-- ## Map nn, to toggle regular line-numberings on, # +-- ## to check for which specific line of the file your on. # +-- ########################################################## keymap("n", "lno", ":set nonu", opts) -- Turn line-numbers OFF. keymap("n", "ln", ":set nu", opts) -- Turn line-numbers back on. --- "################################################################## --- "# Map nr to toggle off the relative line numbers in Normal mode. # --- "################################################################## +-- ################################################################### +-- ## Map nr to toggle off the relative line numbers in Normal mode. # +-- ################################################################### keymap("n", "nno", ":set nornu", opts) -- Turn relative line-numbers OFF. keymap("n", "rn", ":set rnu", opts) -- Turn relative line-numbers back on. --- "########################################################################## --- "#I'm mapping comma{,} + lower-case 'l' to disable special char listings. # --- "########################################################################## +-- ########################################################################### +-- ##I'm mapping comma{,} + lower-case 'l' to disable special char listings. # +-- ########################################################################### keymap("n", "nls", ":set nolist", opts) -- Turn special hidden chars OFF. keymap("n", "ls", ":set list", opts) -- Turn List(ls) mode back on. --- "############################################################################## --- "# cm == copy-mode. disables special characters($) and relative-line-numbers. # --- "############################################################################## +-- ############################################################################### +-- ## cm == copy-mode. disables special characters($) and relative-line-numbers. # +-- ############################################################################### keymap("n", "cm", ":set nolist :set nornu :set nonu ", opts) --- "############################################################# --- "# Spell check set to sc(Spell-Check)/es(Switch 2 ESpañol.). # --- "############################################################# +-- ############################################################## +-- ## Spell check set to sc(Spell-Check)/es(Switch 2 ESpañol.). # +-- ############################################################## keymap("n", "sc", ":setlocal spell! spelllang=en_us", opts) keymap("n", "es", ":set spelllang=es", opts) --- "######################################################################## --- "# hotkey mappings for jumps, marks, buffer-LiSting, and changes lists. # --- "######################################################################## +-- ######################################################################### +-- ## hotkey mappings for jumps, marks, buffer-LiSting, and changes lists. # +-- ######################################################################### keymap("n", "mm", ":marks", opts) -- This will open up the Marks-list. keymap("n", "jj", ":jumps", opts) -- This will open up the Jumps-list. keymap("n", "ll", ":ls", opts) -- This opens up the buffers-list. keymap("n", "cc", ":changes", opts) -- This will open up the Changes-list. keymap("n", "rr", ":registers", opts) -- This will open up the Registers-list. --- "######################################################################## --- "# Adding some hotkeys to more easily deal with splits. # --- "# qq == :q aka quit file. You will be prompted if the file is unsaved. # --- "# wq == :wq aka Save and quit. # --- "# qa == :qa! aka quit the file without saving # --- "# w == :w aka save(write) file. # --- "######################################################################## +-- ######################################################################### +-- ## Adding some hotkeys to more easily deal with splits. # +-- ## qq == :q aka quit file. You will be prompted if the file is unsaved. # +-- ## wq == :wq aka Save and quit. # +-- ## qa == :qa! aka quit the file without saving # +-- ## w == :w aka save(write) file. # +-- ######################################################################### keymap("n", "qq", ":q", opts) keymap("n", "wq", ":wq", opts) keymap("n", "qa", ":qa!", opts) keymap("n", "s", ":w", opts) --- "################################################# --- "# I'm mapping vc to reload the .vimrc, # --- "# without closing and re-opening he vim config. # --- "################################################# +-- ################## +-- ## Mark-keymaps: # +-- ################## + keymap("n", "dm", ":delmarks!", opts) -- Delete ALL marks: +-- ################# +-- # TAB keymaps: # +-- ################# + keymap("n", "tn", ":tabnew", opts) -- New-tab + keymap("n", "bt", "gT", opts) -- Backward-tab(s) + keymap("n", "ft", "gt", opts) -- Forward-tab(s) + keymap("n", "tc", ":tabclose", opts) -- Close-tab + keymap("n", "db", ":bd", opts) -- Delete-Buffer + +-- ############################################################################### +-- # Split-keymaps: # +-- #The following combos split the view, and it is up to you to switch to # +-- #different files or locations in a large file perhaps. # +-- #*~In a powershell or cmd prompt, there is possibly no session or # +-- #tmux|screen|byobu or jobs like functionality I've been able to find. # +-- #Although clink 4 cmd does have history/jab-control, but sadly no shell-view # +-- #multi-plexing. :( # +-- ############################################################################### + keymap("n", "sp", ":split", opts) -- Splits current view horizontally. + keymap("n", "vp", ":vsplit", opts) -- Splits current view Vertically. + +-- ################################################## +-- ## I'm mapping vc to reload the .vimrc, # +-- ## without closing and re-opening he vim config. # +-- ################################################## -- keymap("n", "vc", ":source ~/.config/nvim/init.lua :nohl ", opts) -- TODO attempt to put this in vim.cmd later.