Opening files from Filezilla for Vim console?

Sometimes I need to modify files that are on an FTP server, currently I have Filezilla opening them in a sublime way. But I am switching to VIM, and I have not found a way to open the file in the VIM console. Probably works flawlessly for gVim, but does anyone work on the console?

+6
source share
3 answers

I managed to open the console using vim by invoking a shell script instead of vim.

 #!/bin/bash gnome-terminal -e "vim $1" 

One of the drawbacks is that every time a new window appears. Hope this helps.

+5
source

I use Midnight Commander to do the same, and it works with the Vim console, as well as many very useful other commands.

0
source

This theme is pretty old, but Vim remains the best! Therefore, I would like to share my experience.

I am using Guake Terminal and Vim v8 in Debian 9.2 . The solution posted by @soulseekah is excellent, but does not allow opening multiple files in this configuration.

As a decision, we need a bash script. The difference will be that we check if vim is working. If not, run it. If so, open the file in a new tab.

Here we go:

 #!/bin/bash if pgrep -x "vim" > /dev/null ; then guake -e ":tabedit $1"; else guake -e "vim $1" fi 

Disadvantages:

  • You need to be in normal mode to open new files.
  • Does not work with gnome terminal.

Enjoy the guys!

0
source

Source: https://habr.com/ru/post/914040/


All Articles