Using Vim for FTP is great, but how do I create files and folders using Vim FTP?开发者_JAVA技巧
i don't know how to create folders via ftp, but you can save files remotely with Nwrite
:Nwrite ftp://username@host/path/to/file/andfile.name<cr>
use :help netrw-write for all options and protocols
netrw also has
MAKING A NEW DIRECTORY *netrw-d* {{{2
section. read this and it can help to you
Newer netrw-s do support making directories via ftp; you should upgrade. You can get the latest netrw from http://www.drchip.org/astronaut/vim/index.html#NETRW; as of now, its up to v153f.
I may be wrong but I don't think Vim has the ability to issue FTP commands. Maybe try Emacs…
Or you can log into the remote machine with SSH and do your Vim editing there.
If you want to create directories you can type something like :! mkdir foldername
to create a directory or :sh
to launch a new shell while keeping Vim in the background, create your directory, then do $ exit
to return to Vim.
To save the current buffer to disk, type :sav filename
.
You can go crazy and use tmux to have two windows side by side: one with Vim and the other with a regular prompt.
If you insist on using FTP, you should reverse your workflow to start in the FTP client. Since you are on a Mac, almost all the FTP clients have an "Edit with…" button that you can configure to launch MacVim.
精彩评论