Bearbeiten Sie Dateien aus Cyberduck in einem vorhandenen Vim-Fenster

860
Eli Gundry

Ich verwende Cyberduck als meinen FTP-Client unter Windows. Ich habe nur eine Beschwerde, und wenn ich auf die Schaltfläche Bearbeiten klicke, um die entfernte Datei mit einer lokalen Version von gVim zu bearbeiten, wird sie in einem neuen Fenster / in einer neuen Instanz von Vim geöffnet. Dies führt zu einem überladenen Desktop und dazu, dass AutoComplPop nicht sein volles Potenzial entfalten kann.

Ich möchte in der Lage sein, automatisch jede Datei in einem neuen Puffer innerhalb eines vorhandenen gVim-Puffers anstelle eines neuen Fensters zu öffnen, etwa wie die Windows-Version von gVim und wie sie die Möglichkeit hat, eine Datei in einem neuer Puffer. Gibt es sowieso in Cyberduck / gVim Einstellungen zu tun?

1

1 Antwort auf die Frage

1
Ryan

I know I'm late to the party, but I found the question and want answers around for future generations.

A workaround can be found in this thread. I created a file called cybervim.bat that contains the following:

start "vim" /B "C:\Program Files (x86)\Vim\vim73\gvim.exe" --remote-tab-silent %* 

I placed that in the Vim folder, although it can go wherever you want. Select that bat file as the default text editor in Cyberduck, and voila! Any documents you open in Cyberduck will open as new tabs in the existing Gvim window. It will flash a slightly annoying command prompt window, but so far I think that's the only way to do this. If you would rather not open it as a new tab, replace --remote-tab-silent with --remote-silent.

If you want all your Cyberduck files open in a Cyberduck dedicated Gvim window, add --servername SOMENAME, replacing SOMENAME with whatever you want. That will create a Vim "server" and all Cyberduck files will open in that window.