All Projects → kassio → Neoterm

kassio / Neoterm

Licence: other
Wrapper of some vim/neovim's :terminal functions.

Projects that are alternatives of or similar to Neoterm

Onehalf
Clean, vibrant and pleasing color schemes for Vim, Sublime Text, iTerm, gnome-terminal and more.
Stars: ✭ 974 (-3.28%)
Mutual labels:  terminal, neovim
Iron.nvim
Interactive Repl Over Neovim
Stars: ✭ 265 (-73.68%)
Mutual labels:  neovim, repl
Nvim Toggleterm.lua
A neovim lua plugin to help easily manage multiple terminal windows
Stars: ✭ 102 (-89.87%)
Mutual labels:  terminal, neovim
Dotfiles
My dotfiles 🚀. Includes configs for neovim, tmux, zsh, alacritty and more.
Stars: ✭ 47 (-95.33%)
Mutual labels:  terminal, neovim
Unicodeplots.jl
Unicode-based scientific plotting for working in the terminal
Stars: ✭ 724 (-28.1%)
Mutual labels:  terminal, repl
Reply.vim
REPLs play nicely with :terminal on Vim and Neovim
Stars: ✭ 165 (-83.61%)
Mutual labels:  terminal, repl
Alive Progress
A new kind of Progress Bar, with real-time throughput, ETA, and very cool animations!
Stars: ✭ 2,940 (+191.96%)
Mutual labels:  terminal, repl
Janeway
🌌 A Node.js console REPL with object inspection and many other features
Stars: ✭ 398 (-60.48%)
Mutual labels:  terminal, repl
Vim Quickui
The missing UI extensions for Vim 8.2 (and NeoVim 0.4) !! 😎
Stars: ✭ 714 (-29.1%)
Mutual labels:  terminal, neovim
Nnn.vim
File manager for vim/neovim powered by n³
Stars: ✭ 414 (-58.89%)
Mutual labels:  terminal, neovim
Radian
A 21 century R console
Stars: ✭ 878 (-12.81%)
Mutual labels:  terminal, repl
Dotfiles
Configurations for the tools I use every day
Stars: ✭ 898 (-10.82%)
Mutual labels:  terminal, neovim
Zepl.vim
Lightweight and easy REPL integration for Vim and Neovim.
Stars: ✭ 39 (-96.13%)
Mutual labels:  terminal, repl
Sqlite Global Tool
SQLite .NET Core CLI tool that allows the user to manually enter and execute SQL statements with or without showing query result.
Stars: ✭ 37 (-96.33%)
Mutual labels:  terminal
Far2l
Linux port of FAR v2
Stars: ✭ 1,001 (-0.6%)
Mutual labels:  terminal
Spinnercpp
Simple header only library to add a spinner / progress indicator to any terminal application.
Stars: ✭ 37 (-96.33%)
Mutual labels:  terminal
Iterm2 Snazzy
Elegant iTerm2 theme with bright colors
Stars: ✭ 1,005 (-0.2%)
Mutual labels:  terminal
Dotfiles
Configs 🤘🤘🤘
Stars: ✭ 39 (-96.13%)
Mutual labels:  neovim
Tygit
A basic terminal interface for git, written on Node.js [Project not maintained]
Stars: ✭ 36 (-96.43%)
Mutual labels:  terminal
Neoformat
✨ A (Neo)vim plugin for formatting code.
Stars: ✭ 977 (-2.98%)
Mutual labels:  neovim

neoterm

lint tests license

__   _ _______  _____  _______ _______  ______ _______
| \  | |______ |     |    |    |______ |_____/ |  |  |
|  \_| |______ |_____|    |    |______ |    \_ |  |  |

Use the same terminal for everything. The main reason for this plugin is to reuse the terminal easily. All commands open a terminal if one does not already exist. REPL commands open a terminal and the proper REPL if not already opened.

  • Neovim/Vim terminal helper functions/commands.
  • Wraps REPLs to receive current file, line or selection.
  • Multiple terminal support:
    • many-terms

Installation

Vundle/Plug.vim/minpac/any other

You can install this plugin using any vim plugin manager by using the path on GitHub for this repository:

[Plugin|Plug|...] 'kassio/neoterm'

See the your plugin manager documentation for more information.

Manual

For installation without a package manager, you can clone this Git repository into a bundle directory as with pathogen, and add the repository to your runtime path yourself. First clone the repository:

cd ~/.vim/bundle
git clone https://github.com/kassio/neoterm.git

Then, modify your ~/.vimrc file to add this plugin to your runtime path:

set nocompatible
filetype off

let &runtimepath.=',~/.vim/bundle/neoterm'

filetype plugin on

You can add the following line to generate documentation tags automatically, if you don't have something similar already, so you can use the :help command to consult neoterm's online documentation:

silent! helptags ALL

Windows OS

For Windows users, replace usage of the Unix ~/.vim directory with %USERPROFILE%\_vim, or another directory if you have configured Vim differently. On Windows, your ~/.vimrc file will be similarly stored in %USERPROFILE%\_vimrc.

Default behaviour

Neoterm's default behavior is to create a new buffer on the current window when opening a neoterm. You can change this with g:neoterm_default_mod. Check the documentation for more information.

Send commands to a neoterm window

  • :T {command}: Opens a terminal, or use an opened terminal, and runs the given command within a terminal.
  • :Tmap {command}: maps a given command to g:neoterm_automap_keys.

Multiple neoterm windows commands

  • :3T {command}: Will send the command to neoterm-3.

useful mappings:

I like to set some mappings to make me more productive.

" 3<leader>tl will clear neoterm-3.
nnoremap <leader>tl :<c-u>exec v:count.'Tclear'<cr>

test libs (removed on 05/Feb/2017)

This feature was removed on 05/Feb/2017, please consider using vim-test with neoterm strategy to replace this feature.

REPL

  • TREPLSendFile: sends the current file to a REPL in a terminal.
  • TREPLSendLine: sends the current line to a REPL in a terminal.
  • TREPLSendSelection: sends the selection to a REPL in a terminal.
  • <Plug>(neoterm-repl-send): sends with text-objects or motions, or sends the selection to a REPL in a terminal.
  • <Plug>(neoterm-repl-send-line): sends the current line to a REPL in a terminal.

Supported REPLs

  • Clojure: lein repl
  • Elixir: iex and iex -S mix (if config/config.exs exists)
  • GNU Octave: octave
    • For Octave 4.0.0 and later, you can enable Qt widgets (dialogs, plots, etc.) using g:neoterm_repl_octave_qt = 1
  • Haskell: ghci
  • Idris: idris
  • JavaScript: node
  • Java: java
  • Julia: julia
  • LFE: lfe
  • Lua with lua and luap.
  • MATLAB: matlab -nodesktop -nosplash
  • PARI/GP: gp
  • PHP: g:neoterm_repl_php and psysh and php
  • Python: ipython, jupyter console and python
  • R / R Markdown: R
  • Racket: racket
  • Rails: bundle exec rails console
  • Ruby: pry and irb
  • Rust: evcxr
  • SML: rlwrap sml or sml
  • Scala: sbt console
  • TCL: tclsh

Troubleshooting

Most standard file extensions for the above REPLs are picked up by Neovim/Vim's default filetype plugins. However, there are two exceptions:

  • Julia .jl files, which are detected as filetipe=lisp
  • Idris .idr, .lidr files which are not recognised as any filetype
  • LFE .lfe files, which are not recognized as any filetype

To fix this, either install a suitable plugin for the language or add something like the following to your init.vim:

au VimEnter,BufRead,BufNewFile *.jl set filetype=julia
au VimEnter,BufRead,BufNewFile *.idr set filetype=idris
au VimEnter,BufRead,BufNewFile *.lidr set filetype=lidris
au VimEnter,BufRead,BufNewFile *.lfe set filetype=lfe

If you want to use the jupyter console REPL present on your path, you can use this configuration in your init.vim:

function! Chomp(string)
    return substitute(a:string, '\n\+$', '', '')
endfunction
let g:neoterm_repl_python = Chomp(system('which jupyter')) . ' console'

Contributing

Changelog

Documentation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].