Using Vim with syntastic and SCP - vim

I edit some remote files using vim in combination with scp. When editing a remote php file using this method syntastic plugin isn't working.
When I type,
:SyntasticInfo
it says info for file type is php. So it recognizes the file type but isn't doing the check. Is this possible using vim with scp?

This is answered in the manual, see :help syntastic-netrw:
The standard plugin netrw allows Vim to transparently edit files over network and inside archives. Currently syntastic doesn't support this mode of operation. It can only check files that can be accessed directly by local checkers, without any translation or conversion.

Related

Can vim open a shared folder in another local machine and edit files?

I googled and found that vim scp://server/path/to/file can edit a single file. But I could not use it to open a folder.
Use vim's network-oriented file transfers.
According to the documentation, it "supports remote and local directory browsing, and supports editing files across the network using a variety of methods".
Just add a / at the end of your url:
vim scp://server/path/to/

How can I use local vim setting on AWS server?

Is there a faster way to edit AWS EC2 config file using my local env vimrc?
I found that it is very hard to edit file in remote server using default vim settings
Any one has good solution to make ourself better?
Remote editing
I suppose you're using ssh to log into your AWS server and launch Vim there. An alternative is to launch Vim on your local system, and open the remote file in there, e.g. via the built-in netrw plugin:
$ vim scp://hostname/path/to/file
or within Vim:
:edit scp://hostname/path/to/file
Sharing Vim configuration across machines
There are many different approaches for sharing your .vimrc and plugins across multiple machines. Possible solutions were recently collected at What is the best way to deal with vim plugins on multiple machines?

Pair with tmux but use our own vimrc files

I'm looking to pair with people over tmux with Vim, but I've run into a snag. I've become so used to my Vim setup that I do not know how to navigate without some of my basic mappings that I've setup. That being said, if I SSH into somebody else's box, I don't really know my way around.
Is there a way to load some of my vimrc config when ssh-ing into someone else's box?
I suggest CoVim https://github.com/FredKSchott/CoVim
This is not depend on tmux.
If it's just your .vimrc file, you could :source that:
:source scp://myhost/.vimrc
Thanks to the netrw plugin, this transparently accesses the file from your system; of course, you could also explicitly mount your home directory and then use a normal filespec to the mounted files.
In theory, you could even add your remote ~/.vim directory to 'runtimepath', so that all of your customizations and plugins are loaded, but that probably leads to greatly increased startup times (due to the network accesses), potential conflict with the host's plugins, and is therefore not recommended.

VIM support to upload via SFTP

I am used to Sublime's plugin that let's you do a mapping between your local project and a remote project. By doing so, when you are done editing a file, you can do a right click and "Upload file" action which automatically updates the file in the remote server.
I am wondering what would be the best way to do this while programming with VIM. I am looking for an easy way to be able to map a local project to a remote one and be able to upload the file easily.
Thanks
If all you want is to edit files on a remote server,
try vim's netrw feature:
vim scp://you#yourserver//path/to/directory/
Edit a file directly:
vim scp://you#yourserver//path/to/directory/somefile.txt
Or if you are already in vim, hit ESC, then type:
:e scp://you#yourserver//path/to/directory/
This assumes that:
you have ssh installed (usually the case for Linux or OSX; if you are on Windows then it depends).
you have ssh access to the server via some convenient method (sshagent and keys)
Most serious FTP clients let you edit remote files locally. Filezilla, gFTP, Transmit, Cyberduck, YummyFTP… they all have their own "Edit in…" button. GUI FTP clients may not be sexy hacker tools but they work very well.
Some of those serious FTP clients have synchronisation features or folder watchers. It might be worth your time to look around for such a feature.
Of course, you can also use Vim itself to edit a remote file via FTP or SFTP:
$ vim sftp://user#machine/filename
$ vim ftp://user#machne/filename
and list remote files:
$ vim sftp://user#machine/directory/
See :help netrw for more info.
Did you consider using a VCS like Subversion, Git or Mercurial?

Vim FTP Plugin for IDE-like behavior

I have gVim (with: NERDTree, minibufexpl). Right now, I can edit files locally with IDE-like feel with NERDTree for a file explorer and minibuf for tabs.
However, I am used to editing files on dummy server I have set up at home. I use Zend Studio to edit files through FTP. Is this feature available in Vim? If so, does it "integrate" well with NERDTree? I would like to browse my FTP directory using NERDTree.
Thank you,
Wenbert
You can edit files remotely over ftp or sftp or scp or whatnot with vim:
vim ftp://user#host/some/file
Of course, this also works with tabs. Don't know about minibuf, though.
Unfortunately, the NERDTree plugin does not seem to support this. However, the :Explore command plays along just nicely.
Of course, you could simply use FTPFS to mount a remote directory and work with that as if it was local storage.

Resources