Giter Site home page Giter Site logo

termim.nvim's Introduction

License People Stars Forks Watches Last Updated

Neovim Terminal, Improved πŸ¦ΎπŸ’»

termim.nvim in action
termim.nvim in action

termim.nvim improves your default neovim terminal experience, keeping it super simple.

✨ Features

  • Auto enter insert mode when opening terminal
  • Cleans up unnecessary clutter from terminal UI
  • Auto closes terminal once process exits
  • Terminals do not mess with your buffer list
  • Handy commands to access full screen and split terminals
  • Extend commands with any program of your choice

⚑ Setup

βš™οΈ Requirements

  • neovim

πŸ’» Installation

Add the following to your lazy/packer config

    -- Lazy
    {
        '2kabhishek/termim.nvim',
        cmd = { 'Fterm', 'FTerm', 'Sterm', 'STerm', 'Vterm', 'VTerm' },
    },

    -- Packer
    use '2kabhishek/termim.nvim'

πŸš€ Usage

πŸ“‘ Commands

termim.nvim adds the following commands:

  • Fterm: open terminal in new tab
  • FTerm: same as Fterm but stays open after process exits
  • Sterm: open terminal in new horizontal split
  • STerm: same as Sterm but stays open after process exits
  • Vterm: open terminal in new vertical split
  • VTerm: same as Vterm but stays open after process exits

All the commands accept optional command as arg, if command is missing, your default shell will run

  • Fterm lazygit: will open lazygit in a new tab

⌨️ Mappings

termim.nvim adds the following mappings:

  • J J β€” Return to normal mode in terminals, remap for <C-\><C-n>

Recommended which-key Mappings

Other than the standard commands, you can use which-key to create your own commands.

    t = {
        name = 'Terminal',
        ['`'] = { '<cmd>Sterm<cr>', 'Horizontal Terminal' },
        e = { '<cmd>Sterm iex<cr>', 'Elixir' },
        g = { '<cmd>Fterm lazygit<cr>', 'Lazygit' },
        n = { '<cmd>Sterm node<cr>', 'Node' },
        p = { '<cmd>Sterm bpython<cr>', 'Python' },
        r = { '<cmd>Sterm irb<cr>', 'Ruby' },
        s = { '<cmd>Sterm<cr>', 'Horizontal Terminal' },
        t = { '<cmd>Fterm<cr>', 'Terminal' },
        v = { '<cmd>Vterm<cr>', 'Vertical Terminal' },
    },

πŸ—οΈ What's Next

You tell me!

πŸ§‘β€πŸ’» Behind The Code

🌈 Inspiration

Most terminal plugins offer a lot more than I needed, whereas I needed some small enhancements of the default neovim terminal experience.

πŸ’‘ Challenges/Learnings

  • Figuring out some autogroup and buffer related APIs

🧰 Tooling

  • dots2k β€” Dev Environment
  • mac2k β€” Mac Dev Environment
  • nvim2k β€” Personalized Editor

πŸ” More Info


⭐ hit the star button if you found this useful ⭐

Source | Blog | Twitter | LinkedIn | More Links | Other Projects

termim.nvim's People

Contributors

2kabhishek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.