-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from hesselbom/hozza-fancy-readme
fancy updated readme
- Loading branch information
Showing
1 changed file
with
43 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,64 @@ | ||
vim-hsftp | ||
========= | ||
|
||
Vim: Upload and download files through sftp | ||
SFTP for Vim: Sync local and remote files/folders inside vim. | ||
|
||
Usage: | ||
Config | ||
------ | ||
First you have to create a config file called .hsftp in your project directory. | ||
Create a config file called `.hsftp` in the root of your projects directory. | ||
|
||
When uploading/downloading hsftp searches backwards for a config file so if the edited file is e.g. `/test/dir/file.txt` and the config file is `/test/.hsftp` it will upload/download as `dir/file.txt` | ||
Example `.hsftp` config file - the amount of spaces do not matter: | ||
|
||
The config file should be structured like this (amount of spaces doesn't matter): | ||
|
||
host 1.1.1.1 | ||
host example.org | ||
user username | ||
pass test123 | ||
pass Sup3rS3cureP4s$W0rd | ||
port 22 | ||
remote /var/www/ | ||
confirm_download 0 | ||
confirm_upload 0 | ||
|
||
### Commands | ||
:Hdownload | ||
Downloads current file from remote path | ||
|
||
:Hupload | ||
Uploads current file to remote path | ||
vim-hsftp searches up the current files (current buffers) directory path for a `.hsftp` config file, and assumes it is located at the projects root directory. This resembles how the SFTP plugin for Sublime Text 3 works. | ||
|
||
:Hupdir | ||
Uploads current folder of current buffer to remote path | ||
e.g. if the local file in vim is located at `/example/dir/file.txt`, and the example config file shown above is located at `/example/.hsftp` - when you run `:Hupload`, vim-hsftp will upload the local file to the host `example.org` at the remote path `/var/www/dir/file.txt` via SFTP using the provided credentials. | ||
|
||
Usage | ||
------ | ||
Run the command or use the mapping in vim on the current file/current buffer. | ||
|
||
### Mappings | ||
<leader>hsd | ||
Calls :Hdownload | ||
**Upload File** | ||
|
||
Upload the current file (current buffer) to the remote path. | ||
|
||
:Hupload | ||
<leader>hsu | ||
Calls :Hupload | ||
|
||
**Download File** | ||
|
||
Download the current file (current buffer) from the remote path. | ||
|
||
:Hdownload | ||
<leader>hsd | ||
|
||
**Upload Folder** | ||
|
||
Upload all files in the current folder (current buffer) to the remote path. | ||
|
||
:Hupdir | ||
<leader>hsf | ||
Calls :Hupdir | ||
|
||
|
||
Thanks | ||
------ | ||
A huge thanks to our contributors; [@v9n](https://github.com/v9n) for the upload folder feature, [@bridgesense](https://github.com/bridgesense) for vim compatibility and fixes! | ||
|
||
Maintainers: [@hesselbom](https://github.com/hesselbom), [@hozza](https://github.com/hozza) | ||
|
||
|
||
TODO | ||
------ | ||
|
||
- attempt no password login (SSH key) [PR#8](https://github.com/hesselbom/vim-hsftp/pull/8) | ||
- download directories [PR#5](https://github.com/hesselbom/vim-hsftp/pull/5) | ||
- auto upload on save [PR#15](https://github.com/hesselbom/vim-hsftp/pull/15) | ||
- background ops (run in background) [I#2](https://github.com/hesselbom/vim-hsftp/issues/2) |