Code Monkey home page Code Monkey logo

Comments (5)

numToStr avatar numToStr commented on May 28, 2024 3

As it turns out this was fairly easy to implement, I just need to allow the run command to be customizable. You just need to use the underlying terminal function to make this work. Just switch to the multi branch to test it out give your initial feedback. If you have anything else on your mind do let me know.

And also sorry for the delay :)

Example

local term = require("FTerm.terminal")

-- Opening bashtop
local bashtop = term:new()

bashtop:setup({cmd = "bashtop"})

function _G.__fterm_bashtop()
    bashtop:toggle()
end

-- Opening gitui
local gitui = term:new()

gitui:setup({cmd = "gitui"})

function _G.__fterm_gitui()
    gitui:toggle()
end

In Action

fterm.mp4

Just ignore the broken highlights in gitui

from fterm.nvim.

numToStr avatar numToStr commented on May 28, 2024 2

This feature was also in my mind. But I think I might need to implement multiple terminals instances first as currently It only supports only one terminal instance.

from fterm.nvim.

numToStr avatar numToStr commented on May 28, 2024 1

I am not sure about the vim character like %, $. But you can use the lua API like vim.api.nvim_get_current_buf() which I think is same as %.

from fterm.nvim.

EpsilonKu avatar EpsilonKu commented on May 28, 2024

So I found function "chansend()" which can send argument to terminal (https://neovim.io/doc/user/channel.html). I guess it will help you.

from fterm.nvim.

EpsilonKu avatar EpsilonKu commented on May 28, 2024

That's good. What about to make symbols (like % in Floaterm) to send file name.

from fterm.nvim.

Related Issues (20)

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.