mirror of
https://github.com/He4eT/dotfiles.git
synced 2026-05-04 23:47:23 +00:00
nvim: merge keymaps
This commit is contained in:
parent
b68b7b2f25
commit
4b0984043b
1 changed files with 13 additions and 16 deletions
|
|
@ -5,15 +5,14 @@ npx @johnnymorganz/stylua-bin ./init.lua
|
||||||
]]
|
]]
|
||||||
|
|
||||||
--[[ Structure:
|
--[[ Structure:
|
||||||
├─ cfg_leader: Leader keys
|
|
||||||
├─ cfg_options: See `:help vim.o`
|
├─ cfg_options: See `:help vim.o`
|
||||||
├─ cfg_filetypes: Filetype aliases
|
├─ cfg_filetypes: Filetype aliases
|
||||||
├─ cfg_cmds: Commands
|
├─ cfg_cmds: Commands
|
||||||
├─ cfg_autocmds: Autocomands
|
├─ cfg_autocmds: Autocommands
|
||||||
├─ cfg_keymaps: General keymaps
|
├─ cfg_keymaps: Base keymaps
|
||||||
└─ cfg_lazy: Plugin manager
|
└─ cfg_lazy: Plugin manager
|
||||||
├─ cfg_lazy_guess_indent: Detect tabstop and shiftwidth automatically
|
├─ cfg_lazy_guess_indent: Detect tabstop and shiftwidth automatically
|
||||||
├─ cfg_lazy_surround: Delete, change and add such surroundings in pairs
|
├─ cfg_lazy_surround: Delete, change and add surroundings in pairs
|
||||||
├─ cfg_lazy_comment: Toggles linewise and blockwise comments
|
├─ cfg_lazy_comment: Toggles linewise and blockwise comments
|
||||||
├─ cfg_lazy_colorizer: Color highlighter
|
├─ cfg_lazy_colorizer: Color highlighter
|
||||||
├─ cfg_lazy_lualine: Statusline
|
├─ cfg_lazy_lualine: Statusline
|
||||||
|
|
@ -34,18 +33,8 @@ npx @johnnymorganz/stylua-bin ./init.lua
|
||||||
└─ cfg_lazy_desolate: Not-so-colorful colorscheme
|
└─ cfg_lazy_desolate: Not-so-colorful colorscheme
|
||||||
]]
|
]]
|
||||||
|
|
||||||
--[[ cfg_leader: Leader keys ]]
|
|
||||||
|
|
||||||
local leader = ' '
|
|
||||||
vim.g.mapleader = leader
|
|
||||||
vim.g.maplocalleader = leader
|
|
||||||
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
|
||||||
|
|
||||||
--[[ cfg_options: See `:help vim.o` ]]
|
--[[ cfg_options: See `:help vim.o` ]]
|
||||||
|
|
||||||
-- Disable Intro (:intro)
|
|
||||||
vim.opt.shortmess:append 'I'
|
|
||||||
|
|
||||||
-- Raise a dialog asking if you wish to save the current file(s)
|
-- Raise a dialog asking if you wish to save the current file(s)
|
||||||
vim.o.confirm = true
|
vim.o.confirm = true
|
||||||
|
|
||||||
|
|
@ -109,6 +98,9 @@ vim.o.completeopt = 'menuone,noselect,fuzzy'
|
||||||
-- Keeps the same screen lines in all split windows
|
-- Keeps the same screen lines in all split windows
|
||||||
vim.o.splitkeep = 'screen'
|
vim.o.splitkeep = 'screen'
|
||||||
|
|
||||||
|
-- Disable Intro (:intro)
|
||||||
|
vim.opt.shortmess:append 'I'
|
||||||
|
|
||||||
-- Netrw settings
|
-- Netrw settings
|
||||||
vim.g.netrw_sort_sequence = '[\\/]$,*'
|
vim.g.netrw_sort_sequence = '[\\/]$,*'
|
||||||
|
|
||||||
|
|
@ -135,7 +127,7 @@ vim.api.nvim_create_user_command('WipeUI', function()
|
||||||
end
|
end
|
||||||
end, { desc = 'Clear search highlight, cmdline, and popups' })
|
end, { desc = 'Clear search highlight, cmdline, and popups' })
|
||||||
|
|
||||||
--[[ cfg_autocmds: Autocomands ]]
|
--[[ cfg_autocmds: Autocommands ]]
|
||||||
|
|
||||||
-- Highlight on yank
|
-- Highlight on yank
|
||||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
|
|
@ -167,7 +159,12 @@ vim.api.nvim_create_autocmd('InsertLeave', {
|
||||||
command = 'silent !xkb-switch -s us',
|
command = 'silent !xkb-switch -s us',
|
||||||
})
|
})
|
||||||
|
|
||||||
--[[ cfg_keymaps: General keymaps ]]
|
--[[ cfg_keymaps: Base keymaps ]]
|
||||||
|
|
||||||
|
local leader = ' '
|
||||||
|
vim.g.mapleader = leader
|
||||||
|
vim.g.maplocalleader = leader
|
||||||
|
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
||||||
|
|
||||||
-- Remap for dealing with word wrap
|
-- Remap for dealing with word wrap
|
||||||
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue