Skip to content

Make file uploading and downloading easy in a remote Neovim environment, powered by [trzsz](https://github.com/trzsz).

License

Notifications You must be signed in to change notification settings

BrightXiaoHan/nvim-trzsz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nvim-trzsz

A Neovim plugin for trzsz (trz / tsz) support, which is similar to rz/sz, but with more terminals support.

You can find detailed documentation here.

Features

  • Upload and download files in your ssh session.
  • nvim-tree integration.
  • Works with tmux sessions.
  • Directory support.

Demo Upload File: Demo Upload File

Pre-requisites

  • Make sure your terminal supports trzsz. You can check the supported terminals here.
  • Make sure you are working in a ssh session. trzsz does not work in local terminals.
  • Install trzsz-ssh on your local machine. You can find the installation instructions here.
  • Install trzsz on your remote machine. trzsz installation guide

Installation

Using lazy.nvim:

{
    "BrightXiaohan/nvim-trzsz",
    dependencies = {
        {"nvim-tree/nvim-tree.lua"}
    },
}

Basic Usage

Map the commands to your preferred keybindings:

vim.keymap.set("n", "<leader>r", "<cmd>require('nvim-trzsz').nvim_tree_trz()<cr>", {noremap = true, silent = true})
vim.keymap.set("n", "<leader>s", "<cmd>require('nvim-trzsz').nvim_tree_tsz()<cr>", {noremap = true, silent = true})

Here <leader>r is for uploading files and <leader>s is for downloading files.

  • ssh into a remote server
  • Open neovim and nvim-tree
  • Navigate to the file you want to download in nvim-tree
  • Press <leader>r to upload the file

or

  • Navigate to the directory you want to upload files to in nvim-tree
  • Press <leader>s, and the file explorer will open
  • Select the files you want to upload

TODO

  • Automatically install trzsz on the remote machine.
  • Lua API for more customization.

License

MIT

About

Make file uploading and downloading easy in a remote Neovim environment, powered by [trzsz](https://github.com/trzsz).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages