2022-01-23 23:24:50 +01:00
|
|
|
-- search for visual selection
|
2022-04-18 03:40:59 +02:00
|
|
|
vim.keymap.set('v', '//', 'y/<C-R>"<CR>')
|
|
|
|
vim.keymap.set('n', 'H', '^')
|
|
|
|
|
2022-01-23 23:24:50 +01:00
|
|
|
|
|
|
|
-- ex command
|
2022-04-18 03:40:59 +02:00
|
|
|
vim.keymap.set('c', '<C-p>', '<Up>')
|
|
|
|
vim.keymap.set('c', '<C-n>', '<Down>')
|
2022-01-23 23:24:50 +01:00
|
|
|
|
|
|
|
-- auto expand brackets
|
2022-04-18 03:40:59 +02:00
|
|
|
vim.keymap.set('i', '(;', '(<CR>)<C-c>O')
|
|
|
|
vim.keymap.set('i', '(,', '(<CR>),<C-c>O')
|
|
|
|
vim.keymap.set('i', '{;', '{<CR>}<C-c>O')
|
|
|
|
vim.keymap.set('i', '{,', '{<CR>},<C-c>O')
|
|
|
|
vim.keymap.set('i', '[;', '[<CR>]<C-c>O')
|
|
|
|
vim.keymap.set('i', '[,', '[<CR>],<C-c>O')
|
2022-01-23 23:24:50 +01:00
|
|
|
|
|
|
|
-- toggle hybrid mode
|
2022-04-18 03:40:59 +02:00
|
|
|
vim.keymap.set('n', '<leader>h', ':set rnu!<CR>')
|
2022-01-23 23:24:50 +01:00
|
|
|
|
|
|
|
-- Telescope
|
2022-04-18 03:40:59 +02:00
|
|
|
vim.keymap.set('n', '<C-y>', '<cmd>Telescope buffers<CR>')
|
|
|
|
vim.keymap.set('n', '<leader>f', '<cmd>Telescope find_files<CR>')
|
|
|
|
vim.keymap.set('n', '<leader>l', '<cmd>Telescope live_grep<CR>')
|
|
|
|
vim.keymap.set('n', '<silent> gy', '<cmd>Telescope treesitter<CR>')
|
2022-01-23 23:24:50 +01:00
|
|
|
|
|
|
|
-- spelling
|
2022-04-18 03:40:59 +02:00
|
|
|
vim.keymap.set('n', '<silent> <leader>se', ':set spell spelllang=en<CR>')
|
|
|
|
vim.keymap.set('n', '<silent> <leader>sd', ':set spell spelllang=de<CR>')
|