Comments (3)
So I wanted to get the results as shown here:
I looked for this configuration in several platforms like reddit,youtube,stackexchange etc. but didn't find the proper solution. After brainstorming(as I am new to vim) for hours I finally figured it for my usecase.
i am using lazy-vim
currently.
Here are my setups to achieve this...
init.lua
require("config.lazy")
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
{
"akinsho/toggleterm.nvim",
config = function()
require("toggleterm").setup()
end,
},
})
lua/plugins/toggleterm.lua
return {
"akinsho/toggleterm.nvim",
version = "*",
config = true,
opts = {
size = 12,
open_mapping = [[<c-\>]],
shade_filetypes = {},
shade_terminals = true,
shading_factor = 1,
start_in_insert = true,
persist_size = true,
close_on_exit = true,
direction = "horizontal",
},
}
Pretty straight-forward and default setup. I use ctrl+\
for opening the terminal horizontally and open another terminal by pressing 2+ctrl+\
. For 3rd 3+....
and so on (who needs more than 3). To hide them press ctrl+\
again. To exit them simply type "exit". For giving input in terminal press "i" and press "esc" two times to revert to normal mode. Switching between them is also similar like normal vim mode.
from toggleterm.nvim.
i would highly recomend using something like tmux or a alternative to it for terminal multiplexing....
from toggleterm.nvim.
Related Issues (20)
- [BUG] `:tabnew %` on a toggleterm buffer causes it to lose cursor position HOT 1
- Q: How do you close a terminal? HOT 1
- [BUG] images support bug? HOT 2
- Can't use terminal keymaps HOT 1
- [BUG] Calling toggle in quick succession does not respect persist_mode/start_in_insert HOT 2
- [Feature Request] Next/Previous Terminal HOT 2
- [BUG] windows Custom Terminals fail
- [BUG] weird black space at the left of the terminal HOT 6
- Is it possible to allow users to open the toggleterm in the current window, just like :term? HOT 1
- Help Request: Issues trying to set toggle-term on Windows HOT 4
- [BUG] Toggleterm does not respond or sometimes blinks when creating a new window HOT 1
- [INFO] Trying to exit Terminal mode
- [FR]: Allow `Terminal:new()` to take custom `width` and `height` HOT 1
- [Question] Frame color is not matching with the rest HOT 2
- [BUG] set_opfunc is undefined HOT 5
- Please check instructions HOT 2
- [feature] Add a function to send keypress to the terminal HOT 1
- How can I remove this line on the top of toggle term and zshrc?
- [BUG] Lines send before REPL is opened
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toggleterm.nvim.