tmux keybind

This commit is contained in:
RafalChelstowski 2023-07-16 00:15:17 +02:00
parent e20bd9eedc
commit be7f6e0253
1 changed files with 16 additions and 3 deletions

View File

@ -72,6 +72,9 @@ require('lazy').setup({
-- Detect tabstop and shiftwidth automatically -- Detect tabstop and shiftwidth automatically
'tpope/vim-sleuth', 'tpope/vim-sleuth',
-- RC vim tmux navigation
'christoomey/vim-tmux-navigator',
-- NOTE: This is where your plugins related to LSP can be installed. -- NOTE: This is where your plugins related to LSP can be installed.
-- The configuration is done below. Search for lspconfig to find it below. -- The configuration is done below. Search for lspconfig to find it below.
{ {
@ -107,6 +110,9 @@ require('lazy').setup({
}, },
}, },
-- copilot
-- { 'github/copilot.vim', opts = {} },
-- Useful plugin to show you pending keybinds. -- Useful plugin to show you pending keybinds.
{ 'folke/which-key.nvim', opts = {} }, { 'folke/which-key.nvim', opts = {} },
{ {
@ -130,11 +136,11 @@ require('lazy').setup({
}, },
{ {
-- Theme inspired by Atom -- RC set nightowl theme
'navarasu/onedark.nvim', 'oxfist/night-owl.nvim',
priority = 1000, priority = 1000,
config = function() config = function()
vim.cmd.colorscheme 'onedark' vim.cmd.colorscheme 'night-owl'
end, end,
}, },
@ -261,6 +267,13 @@ vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
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 })
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
-- RC Open new tmux tab
vim.keymap.set('n', '<leader>tr', ':silent !tmux split-window -h<CR>', { desc = 'Open new tmux [t]e[r]minal pane in current dir' })
-- RC move selected code
vim.keymap.set('v', '<C-S-Up>', ":m '/<-2<CR>gv=gv")
vim.keymap.set('v', '<C-S-Down>', ":m '>+1<CR>gv=gv")
-- [[ Highlight on yank ]] -- [[ Highlight on yank ]]
-- See `:help vim.highlight.on_yank()` -- See `:help vim.highlight.on_yank()`
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true }) local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })