Hello All,
I'm trying to use vi commands instead of using the mouse.
I open Gnome-Terminal
I open a file : vi /home/jvermeulen/.ssh/id_dsa.pub
I select the key with " V " ( visual line )
I type " y " to yank the selected line.
I can now use :e otherfile.txt and paste the text in otherfile.txt
This is the only way I succeed in copying text to another file in Gnome-Terminal of xterm.
But how can I copy text to a file on a remote machine?
Many thanks.
Mount the remote file system using sshfs
suomi
On 2014-05-15 13:15, Johan Vermeulen wrote:
Hello All,
I'm trying to use vi commands instead of using the mouse.
I open Gnome-Terminal
I open a file : vi /home/jvermeulen/.ssh/id_dsa.pub
I select the key with " V " ( visual line )
I type " y " to yank the selected line.
I can now use :e otherfile.txt and paste the text in otherfile.txt
This is the only way I succeed in copying text to another file in Gnome-Terminal of xterm.
But how can I copy text to a file on a remote machine?
Many thanks.
Hi, why would you use vi and not vim? Vim is better! : P if you can access the machine over ssh you can edit a file on the remote host using this special path when opening it:
vim scp://username@host//path/to/file/on/remote/host/filename.extension
or if you've already opened vim you can edit it by typing
:edit scp://username@host//path/to/file/on/remote/host/filename.extension
remember to write the file in order to save it, you do it by typing
:w
or
:w filename
Cheers
On Thu, May 15, 2014 at 1:15 PM, Johan Vermeulen jvermeulen@cawdekempen.bewrote:
Hello All,
I'm trying to use vi commands instead of using the mouse.
I open Gnome-Terminal
I open a file : vi /home/jvermeulen/.ssh/id_dsa.pub
I select the key with " V " ( visual line )
I type " y " to yank the selected line.
I can now use :e otherfile.txt and paste the text in otherfile.txt
This is the only way I succeed in copying text to another file in Gnome-Terminal of xterm.
But how can I copy text to a file on a remote machine?
Many thanks.
-- Johan Vermeulen IT-medewerker Caw De Kempen johan.vermeulen@cawdekempen.be
Powered by Linux.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
op 15-05-14 15:07, Lorenzo Andretta schreef:
Hi, why would you use vi and not vim? Vim is better! : P if you can access the machine over ssh you can edit a file on the remote host using this special path when opening it:
vim scp://username@host//path/to/file/on/remote/host/filename.extension
or if you've already opened vim you can edit it by typing
:edit scp://username@host//path/to/file/on/remote/host/filename.extension
remember to write the file in order to save it, you do it by typing
:w
or
:w filename
Cheers
On Thu, May 15, 2014 at 1:15 PM, Johan Vermeulen jvermeulen@cawdekempen.bewrote:
Hello All,
I'm trying to use vi commands instead of using the mouse.
I open Gnome-Terminal
I open a file : vi /home/jvermeulen/.ssh/id_dsa.pub
I select the key with " V " ( visual line )
I type " y " to yank the selected line.
I can now use :e otherfile.txt and paste the text in otherfile.txt
This is the only way I succeed in copying text to another file in Gnome-Terminal of xterm.
But how can I copy text to a file on a remote machine?
Many thanks.
-- Johan Vermeulen IT-medewerker Caw De Kempen johan.vermeulen@cawdekempen.be
Powered by Linux.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Hello Suomi en Lorenzo,
thanks for the help.
The syntax
:editscp://username@host//path/to/file/on/remote/host/filename.extension
is what I needed.
Greetings, J.