Git Product home page Git Product logo

fterm.nvim's Introduction

fterm.nvim

A floating terminal plugin build in pure lua.

Configuration

Call config method in init.vim (optional)

lua require'fterm'.config({
    \ position="top",
    \ width=100,
    \ height=20,
    \ commands=true})

position

Specify the position of the floating window.
Available options are "top", "bottom", "left" and "right".
Default is "right".

width

Specify the width of the floating window when its position is "left" or "right".
Default is 80.

height

Specify the height of the floating window when its position is "top" or "bottom".
Default is 20.

commands

Specify if the following vim commands to be created.
:FTermToggle - toggle terminal window
:FTermExec - exec cmd in terminal window
Default is false.

Usage

Toggle the terminal

Direct lua call
:lua require'fterm'.toggle()

Or create vim cmd map
command FTermToggle lua require'fterm'.toggle()

Or create key map
nnoremap ,,, :lua require'fterm'.toggle()

Exec cmd in terminal

Direct lua call
:lua require'fterm'.exec("ls")

Or create vim cmd map
command -nargs=1 FTermExec lua require'fterm'.exec(<args>)

Create vim-test strategy

Add the following to init.vim

function! FTermStrategry(cmd)
  call luaeval('require"fterm".exec(_A)', a:cmd)
endfunction

let g:test#custom_strategies = {'fterm': function('FTermStrategry')}
let g:test#strategy = 'fterm'

fterm.nvim's People

Contributors

jiajiawang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

debeetle

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.