my demo first config lua
This commit is contained in:
43
current_config/lua/config/keymaps.lua
Normal file
43
current_config/lua/config/keymaps.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
|
||||
local bind = vim.keymap.set
|
||||
local opts = { silent = true, noremap = true }
|
||||
|
||||
-- for russian layout
|
||||
bind("i", "<c-х>", "<C-[>", opts)
|
||||
bind("n", "л", "gk", opts)
|
||||
bind("n", "о", "gj", opts)
|
||||
bind("i", "<C-г>", "<C-G>u<C-U>", opts)
|
||||
bind("i", "<C-ц>", "<C-G>u<C-W>", opts)
|
||||
|
||||
bind("n", "[c", function()
|
||||
require("treesitter-context").go_to_context()
|
||||
end)
|
||||
|
||||
-- Terminal
|
||||
bind("t", "<Esc><Esc>", "<C-\\><C-n>")
|
||||
bind("t", "<C-w>h", "<C-\\><C-n><C-w>h")
|
||||
bind("t", "<C-w>j", "<C-\\><C-n><C-w>j")
|
||||
bind("t", "<C-w>k", "<C-\\><C-n><C-w>k")
|
||||
bind("t", "<C-w>l", "<C-\\><C-n><C-w>l")
|
||||
|
||||
--personal
|
||||
--normal mode
|
||||
bind("i", "jk", "<Esc>")
|
||||
--save
|
||||
bind("n", "zz", "<Cmd>:update<CR>")
|
||||
|
||||
|
||||
bind("n", ",<space>", "<Cmd>:nohlsearch<CR>" )
|
||||
|
||||
--windows
|
||||
-- bind("n", "<a-h>", "<Cmd><c-w>h<CR>")
|
||||
-- nnoremap <a-h> <c-w>h
|
||||
-- nnoremap <a-j> <c-w>j
|
||||
-- nnoremap <a-k> <c-w>k
|
||||
-- nnoremap <a-l> <c-w>l
|
||||
|
||||
vim.keymap.set("n", "<leader>[", "<Cmd>call append(line('.') - 1, repeat([''], v:count1))<CR>")
|
||||
vim.keymap.set("n", "<leader>]", "<Cmd>call append(line('.'), repeat([''], v:count1))<CR>")
|
||||
Reference in New Issue
Block a user