Skip to content

Commit

Permalink
Terminal real lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-zan committed Dec 12, 2024
1 parent 6040fab commit 5b38fe3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 7 additions & 0 deletions lua/custom/plugins/terminal.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
return {
'voldikss/vim-floaterm',
keys = {
{ '<leader>ot', '<cmd>FloatermToggle<cr>', desc = '[O]pen floating [t]erminal', mode='n' },
},
config = function ()
vim.keymap.set('t', "<Esc>", "<C-\\><C-n>:FloatermHide<CR>")
end

}
5 changes: 1 addition & 4 deletions lua/reymerk/remap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,9 @@ vim.keymap.set("n", "Q", "<nop>")
-- Replace under cursor
vim.keymap.set("n", "<leader>r", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])

-- To open termial
vim.keymap.set('n', '<leader>ot', function() vim.api.nvim_command('FloatermToggle') end, { desc = '[O]pen floating [t]erminal' })
-- To open full-page terminal -- no plugins neede
vim.keymap.set('n', '<leader>oT', function() vim.api.nvim_command('terminal') end, { desc = '[O]pen Full-page [T]erminal' })

vim.keymap.set('t', "<Esc>", "<C-\\><C-n>:FloatermHide<CR>")

-- Remap for dealing with word wrap
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 })
Expand Down

0 comments on commit 5b38fe3

Please sign in to comment.