it used to be so easy to Copy-Paste text between two files with
Control-C, Control-V.
THEN, 2 or 3 years ago, when i started using a new ver. of Windows,
i could no longer to this.
So i've set up the following as a Work-around
:ab wt w! ~/temp.vi
:ab rt r ~/temp.vi
So i can ..
[1] from one file, do
:.wt -- write 1 line to temp file
:.,.+5 wt -- write 6 lines to temp file
[2] optionally edit the temp file ---
[3] from another file, do the following to read (in) the temp file
:rt
it used to be so easy to Copy-Paste text between two files with
Control-C, Control-V.
THEN, 2 or 3 years ago, when i started using a new ver. of
Windows,
i could no longer to this.
On Sat, 2 Mar 2024 23:20:53 +0000, HenHanna wrote:
it used to be so easy to Copy-Paste text between two files with
Control-C, Control-V.
THEN, 2 or 3 years ago, when i started using a new ver. of
Windows,
i could no longer to this.
Does Vim not do multi-file editing?
it used to be so easy to Copy-Paste text between two files with Control-C, Control-V.
If you havo more then a few lines to copy or just check the differences between two similar files "vimdiff file1 file2" is quite useful. It has specific commands to copy from or to the other file.
Also with Nvi there is unlimited undo/redo history:
u toggle undo/redo last edit (historical vi)
. repeat last, so if you undo, you can undo history (or reverse and redo).
In normal editors, you use the same commands for cut/copy/paste as you
would when editing a single file.
On 3 Mar 2024 09:10:32 GMT, G wrote:
If you havo more then a few lines to copy or just check the differences
between two similar files "vimdiff file1 file2" is quite useful. It has
specific commands to copy from or to the other file.
In normal editors, you use the same commands for cut/copy/paste as you
would when editing a single file.
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On 3 Mar 2024 09:10:32 GMT, G wrote:
If you havo more then a few lines to copy or just check the
differences between two similar files "vimdiff file1 file2" is quite
useful. It has specific commands to copy from or to the other file.
In normal editors, you use the same commands for cut/copy/paste as you
would when editing a single file.
And in vimdiff you can use those command if you want (it is still vim
after all), or use the specific command if you want do things faster.
On 4 Mar 2024 09:10:21 GMT, G wrote:
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On 3 Mar 2024 09:10:32 GMT, G wrote:
If you havo more then a few lines to copy or just check the
differences between two similar files "vimdiff file1 file2" is quite
useful. It has specific commands to copy from or to the other file.
In normal editors, you use the same commands for cut/copy/paste as you
would when editing a single file.
And in vimdiff you can use those command if you want (it is still vim
after all), or use the specific command if you want do things faster.
In Emacs, you can have two files open side by side. Or even more than two.
Lawrence D'Oliveiro wrote:
On 4 Mar 2024 09:10:21 GMT, G wrote:
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:In Emacs, you can have two files open side by side. Or even more than
two.
in (the old Vi and) Vim , we can have 2 (or more) files open,
but i don't like to do that because it's kinda confusing.
On 4 Mar 2024 09:10:21 GMT, G wrote:
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On 3 Mar 2024 09:10:32 GMT, G wrote:
If you havo more then a few lines to copy or just check the
differences between two similar files "vimdiff file1 file2" is quite
useful. It has specific commands to copy from or to the other file.
In normal editors, you use the same commands for cut/copy/paste as you
would when editing a single file.
And in vimdiff you can use those command if you want (it is still vim
after all), or use the specific command if you want do things faster.
In Emacs, you can have two files open side by side. Or even more than two.
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On 4 Mar 2024 09:10:21 GMT, G wrote:
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On 3 Mar 2024 09:10:32 GMT, G wrote:
If you havo more then a few lines to copy or just check the
differences between two similar files "vimdiff file1 file2" is quite >>>>> useful. It has specific commands to copy from or to the other file.
In normal editors, you use the same commands for cut/copy/paste as
you would when editing a single file.
And in vimdiff you can use those command if you want (it is still vim
after all), or use the specific command if you want do things faster.
In Emacs, you can have two files open side by side. Or even more than
two.
That's what "vimdiff" does ...
On 6 Mar 2024 09:33:41 GMT, G wrote:
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On 4 Mar 2024 09:10:21 GMT, G wrote:
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On 3 Mar 2024 09:10:32 GMT, G wrote:
If you havo more then a few lines to copy or just check theIn normal editors, you use the same commands for cut/copy/paste as
differences between two similar files "vimdiff file1 file2" is quite >>>>>> useful. It has specific commands to copy from or to the other file. >>>>>
you would when editing a single file.
And in vimdiff you can use those command if you want (it is still vim
after all), or use the specific command if you want do things faster.
In Emacs, you can have two files open side by side. Or even more than
two.
That's what "vimdiff" does ...
We already gathered that. We don’t need to start Emacs in a special mode
to get that.
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On 6 Mar 2024 09:33:41 GMT, G wrote:
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On 4 Mar 2024 09:10:21 GMT, G wrote:
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:In Emacs, you can have two files open side by side. Or even more than
On 3 Mar 2024 09:10:32 GMT, G wrote:
If you havo more then a few lines to copy or just check theIn normal editors, you use the same commands for cut/copy/paste as >>>>>> you would when editing a single file.
differences between two similar files "vimdiff file1 file2" is quite >>>>>>> useful. It has specific commands to copy from or to the other file. >>>>>>
And in vimdiff you can use those command if you want (it is still vim >>>>> after all), or use the specific command if you want do things faster. >>>>
two.
That's what "vimdiff" does ...
We already gathered that. We don’t need to start Emacs in a special mode >> to get that.
We don't "need" to start vim in a special mode to get that either, but it's faster ad easier. As I said it's just the usual vim with the options you need to do what you want already there. If you prefer to do it the Emacs way you can start vim with one file, load the second and give the commands to start the "diff" mode; I just don't see why you would want to do that.
On 07.03.2024 10:50, G wrote:
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On 6 Mar 2024 09:33:41 GMT, G wrote:
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On 4 Mar 2024 09:10:21 GMT, G wrote:
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:In Emacs, you can have two files open side by side. Or even more than >>>>> two.
On 3 Mar 2024 09:10:32 GMT, G wrote:
If you havo more then a few lines to copy or just check theIn normal editors, you use the same commands for cut/copy/paste as >>>>>>> you would when editing a single file.
differences between two similar files "vimdiff file1 file2" is quite >>>>>>>> useful. It has specific commands to copy from or to the other file. >>>>>>>
And in vimdiff you can use those command if you want (it is still vim >>>>>> after all), or use the specific command if you want do things faster. >>>>>
That's what "vimdiff" does ...
Actually, if all I want is edit two files with Vim I wouldn't
use vimdiff but the ordinary vim call, because vimdiff does a
lot that I usually just don't want (unless comparing files);
e.g. the coloring of file differences.
We already gathered that. We don’t need to start Emacs in a special mode >>> to get that.
We don't "need" to start vim in a special mode to get that either, but it's >> faster ad easier. As I said it's just the usual vim with the options you need
to do what you want already there. If you prefer to do it the Emacs way you >> can start vim with one file, load the second and give the commands to start >> the "diff" mode; I just don't see why you would want to do that.
Yes, you can load a second (or third, etc) file in one step by
:split file2 or by :vsplit file3 (the latter for side by side).
No extra command necessary. If we have provided the files on
the command line already we need only :split (or :vsplit) to
get two views of the first file and :n to see the second file
in one of the split window.
But note that the other poster is likely more interested in
an argument or a flame war given that he wrote in a parallel
thread: "Emacs is the world’s most powerful editor.", so he
might not be interested in Vim facts or to learn about what
Vim actually provides beyond his prejudice or preferences.
We don't "need" to start vim in a special mode to get that either, but
it's faster ad easier.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 491 |
Nodes: | 16 (2 / 14) |
Uptime: | 135:32:10 |
Calls: | 9,691 |
Calls today: | 1 |
Files: | 13,728 |
Messages: | 6,177,871 |