https://github.com/littlewhi/shit-terminal.nvim
open-nvim-terminal
https://github.com/littlewhi/shit-terminal.nvim
lua nvim-plugin terminal
Last synced: 4 months ago
JSON representation
open-nvim-terminal
- Host: GitHub
- URL: https://github.com/littlewhi/shit-terminal.nvim
- Owner: littlewhi
- License: apache-2.0
- Created: 2025-03-26T13:16:30.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-03T13:40:14.000Z (about 1 year ago)
- Last Synced: 2025-04-03T14:37:33.990Z (about 1 year ago)
- Topics: lua, nvim-plugin, terminal
- Language: Lua
- Homepage:
- Size: 7.81 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Intro
This is a very basic plugin for opening terminal below in nvim.
Because it is so basic that it is real shit.
# Install
Like any other nvim plugin
# Usage
After the installment, it needs to use the setup() to begin.
`require(shit-terminal).setup({})`
# config
The default config like this:
```lua
{
high = 0.25, -- the terminal buffer window height, which is the percentage of current window
shells = { "bash", "fish", "zsh" }, -- the available shells, which are for complete in commandline
default_shell = "bash", -- the default shell
enable_map = true, -- whether using default map keys
leader = "vi" -- the default startup keys in terminal mode
}
```
# map
default map:
The is the leader in config.
```
# return back to normal mode from terminal mode
tmode ->
tmode m ->
# open terminal and run default shell below current window
vmode nmode -> OpenShitTermDef
# return back to original window from terminal window in terminal mode
tmode q -> q
```
# command
```
# open terminal and run default shell below current window
OpenShitTermDef
# open terminal by the argument below current window
OpenShitTerm
```
# note
When we open a terminal window, only if we press the i, a, I, A... character we go into terminal mode. When we don't press one of these keys, we are in the normal mode which means we can run the nvim command as we want and remember that the tmode keysmap ara not useful. And in tmode, the normal command of nvim are not useful, you need `` to go back to normal mode or `` to execute normal mode command. Please to loop up `:h terminal-emulator`