Skip to content

Instantly share code, notes, and snippets.

View daiyanze's full-sized avatar
💁
"artificial" stuff makes sense

Yanze Dai daiyanze

💁
"artificial" stuff makes sense
View GitHub Profile
@daiyanze
daiyanze / gist:7b323565d49e1b1c1efe0d7c0e414569
Created November 2, 2023 02:13 — forked from RRethy/gist:ad8a9a3b1112a48226ec3336fa981224
Seamlessly editing remote files in (Neo)Vim with Netrw and scp

Seamlessly editing remote files in (Neo)Vim with Netrw and scp

Neovim and Vim both come bundled with a standard plugin called Netrw. Netrw acts a file explorer (similar to NERDTree), but more importantly has the ability to work with scp (as well as sftp, rcp, ftp, and lots of others :h netrw-nread) to let you edit files and browse directories that are hosted on a remote machine, inside of your local Vim instance.

This is useful since you are able to use your Vim setup and plugins without copying over your dotfiles to the remote machine. As well, since the file is copied to your local machine, there will be no delay when typing.

Setup

This is optional for Vim, but required for Neovim (check this Neovim issue explaining why).

@daiyanze
daiyanze / .git-commit-template.txt
Created July 11, 2019 02:35 — forked from adeekshith/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23