Created
July 30, 2024 18:47
-
-
Save vsl-iil/4442816c3e1c7b7427e35e6260ea2f2b to your computer and use it in GitHub Desktop.
NvChad-like terminal functionality for Neovim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local map = vim.api.nvim_set_keymap | |
| -- convinient keybind for escaping terminal insert mode | |
| map('t', '<C-x>', '<C-\\><C-n>', {noremap = true}) | |
| -- open horizontal or vertical split-terminal | |
| map('n', '<leader>h', '<C-w>s<C-w>w:term<CR>i', {noremap = true}) | |
| map('n', '<leader>v', '<C-w>v<C-w>w:term<CR>i', {noremap = true}) | |
| -- disable line numbers in terminal | |
| vim.api.nvim_create_autocmd( | |
| { "TermOpen"}, | |
| { pattern = "*", | |
| callback = function() | |
| vim.wo.number = false | |
| vim.wo.relativenumber = false | |
| end, | |
| } | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment