Patch to add the :cdo and :ldo commands

2,346 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Jun 2, 2013, 2:28:05 PM6/2/13
to Vimdev
Hi all,

I am attaching a patch to add the :cdo and :ldo commands. The :cdo command
can be used to execute commands over all the buffers in the quickfix list.
The :ldo command can be used to execute commands over all the buffers in
the location list. These are similar to the existing :bufdo, :windo and :tabdo
commands.

- Yegappan
cdo.diff

Ben Fritz

unread,
Jun 2, 2013, 3:44:48 PM6/2/13
to vim...@googlegroups.com, Vimdev

I like this idea very much, it saves me from recording a macro that applies a change and does :cnfile and repeating it multiple times.

Yegappan Lakshmanan

unread,
Jun 2, 2013, 4:00:20 PM6/2/13
to vim...@googlegroups.com, Vimdev
Hi Ben,

On Sun, Jun 2, 2013 at 12:44 PM, Ben Fritz <fritzo...@gmail.com> wrote:
> On Sunday, June 2, 2013 1:28:05 PM UTC-5, yega...@gmail.com wrote:
>> Hi all,
>>
>> I am attaching a patch to add the :cdo and :ldo commands. The :cdo command
>>
>> can be used to execute commands over all the buffers in the quickfix list.
>>
>> The :ldo command can be used to execute commands over all the buffers in
>>
>> the location list. These are similar to the existing :bufdo, :windo and :tabdo
>>
>> commands.
>>
>
> I like this idea very much, it saves me from recording a macro that applies a
> change and does :cnfile and repeating it multiple times.
>

Good to know that this addition will optimize your workflow. I came across a
request for this command in the following page:

http://vimcasts.org/episodes/project-wide-find-and-replace/

If more people express interest in this feature, then the probability
of this getting
included in Vim is high.

- Yegappan

glts

unread,
Jun 2, 2013, 4:14:54 PM6/2/13
to vim...@googlegroups.com
+1

Very useful, thanks.

Bram Moolenaar

unread,
Jun 2, 2013, 5:09:06 PM6/2/13
to Yegappan Lakshmanan, Vimdev
Thanks. I'll add it in the todo list.

--
Be thankful to be in a traffic jam, because it means you own a car.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Christian Brabandt

unread,
Jun 3, 2013, 7:47:50 AM6/3/13
to vim...@googlegroups.com
Just this weekend I thought that a :[cl]do command would be nice and
I was just about to write such a patch.

regards,
Christian

eckes

unread,
Sep 30, 2013, 11:53:59 AM9/30/13
to vim...@googlegroups.com

Christian Brabandt

unread,
Sep 30, 2013, 12:01:58 PM9/30/13
to vim...@googlegroups.com
On Mon, September 30, 2013 17:53, eckes wrote:
> +1 have this demand too:http://stackoverflow.com/q/19097216/520162

While I like the idea of having a :cdo and :ldo command, for the time
being, you can script yourself something similar, e.g.
http://article.gmane.org/gmane.editors.vim/92691

regards,
Christian

Christian Wellenbrock

unread,
Oct 11, 2013, 12:24:22 PM10/11/13
to vim...@googlegroups.com

There's also qargs [1] which adds the command `:Qargs` to populate the arglist with the quickfix list. Afterwards you can use `:argdo` to emulate `:cdo`.

+1 for the patch

[1] https://github.com/nelstrom/vim-qargs

Fernando Correia

unread,
Jul 3, 2014, 5:21:19 PM7/3/14
to vim...@googlegroups.com, vim...@vim.org
On Sunday, June 2, 2013 3:28:05 PM UTC-3, yega...@gmail.com wrote:
> I am attaching a patch to add the :cdo and :ldo commands. The :cdo command
>
> can be used to execute commands over all the buffers in the quickfix list.

+1 I'd like to express my support for this feature as well. It would help, for instance, in search and replace across files.

Yegappan Lakshmanan

unread,
Mar 21, 2015, 10:43:22 PM3/21/15
to Vimdev
Hi all,

On Sun, Jun 2, 2013 at 2:09 PM, Bram Moolenaar <Br...@moolenaar.net> wrote:
>
> Yegappan Lakshmanan wrote:
>
>> I am attaching a patch to add the :cdo and :ldo commands. The :cdo command
>> can be used to execute commands over all the buffers in the quickfix list.
>> The :ldo command can be used to execute commands over all the buffers in
>> the location list. These are similar to the existing :bufdo, :windo
>> and :tabdo commands.
>
> Thanks. I'll add it in the todo list.
>

I am attaching an updated patch with a lot of test cases against Vim 7.4.671.
This patch introduces the ":cdo", ":ldo", ":cfdo" and ":lfdo"commands.
The patch to the documentation is also included.

- Yegappan
cdo.diff

Ralph von der Heyden

unread,
Mar 25, 2015, 12:52:38 PM3/25/15
to vim...@googlegroups.com, vim...@vim.org
Great patch! Would love to see it in the main package. :)

Drew Neil

unread,
Apr 6, 2015, 10:33:49 AM4/6/15
to vim...@googlegroups.com, vim...@vim.org
On Sunday, March 22, 2015 at 2:43:22 AM UTC, yega...@gmail.com wrote:
> Hi all,
>
> On Sun, Jun 2, 2013 at 2:09 PM, Bram Moolenaar wrote:
> >
> > Yegappan Lakshmanan wrote:
> >
> >> I am attaching a patch to add the :cdo and :ldo commands. The :cdo command
> >> can be used to execute commands over all the buffers in the quickfix list.
> >> The :ldo command can be used to execute commands over all the buffers in
> >> the location list. These are similar to the existing :bufdo, :windo
> >> and :tabdo commands.
> >
> > Thanks. I'll add it in the todo list.
> >
>
> I am attaching an updated patch with a lot of test cases against Vim 7.4.671.
> This patch introduces the ":cdo", ":ldo", ":cfdo" and ":lfdo"commands.
> The patch to the documentation is also included.

Nice work Yegappan. I would love to see these features included in Vim.

Drew

Yegappan Lakshmanan

unread,
Apr 6, 2015, 1:41:10 PM4/6/15
to vim...@googlegroups.com
Hi all,
It looks like a lot of people are interested in this feature. It will
help if people
can apply this patch and try the new commands and give some feedback.

Thanks,
Yegappan

Christian Brabandt

unread,
Apr 9, 2015, 5:40:52 PM4/9/15
to vim...@googlegroups.com
On Mo, 06 Apr 2015, Yegappan Lakshmanan wrote:

> It looks like a lot of people are interested in this feature. It will
> help if people
> can apply this patch and try the new commands and give some feedback.

I think, this could be quite useful, e.g. for project wide
search/replace. Just do a :vimgrep /foobar/ and then
:cdo :.s/foobar/foobaz/g

So +1 for the whole idea and implementation.
(note: i haven't tried it yet.)

Best,
Christian
--
"Ich kann das Predigen nicht vertragen; ich glaube, ich habe in
meiner Jugend mich daran übergessen."
-- Goethe, Maximen und Reflektionen, Nr. 202

Drew Neil

unread,
Jun 29, 2015, 5:40:28 AM6/29/15
to vim...@googlegroups.com
I finally got round to building Vim with the cdo.diff patch and I'm currently test-driving it.

First thing I tried was populating the quickfix list using :Ggrep (a wrapper for git-grep supplied by the fugitive.vim plugin). Then I made a change to every line in the quickfix list:

:cdo normal A -- it works!

Then I updated each of the files listed in the quickfix list:

:cfdo update

Both commands worked as expected.

I did notice one oddity: after running :cdo, the syntax highlighting is disabled for each file listed in the quickfix list with the exception of the last file, which has syntax highlighting enabled. The documentation says that disabling syntax highlighting gives a performance boost, which is good to know. My guess is that syntax highlighting is supposed to be re-enabled after running :cdo, but there's some bug that causes it to be re-enabled only for the last file in the list. I have observed similar behaviour when using the :argdo command, so perhaps this bug (if it is a bug) is out of scope for this particular patch.

These are my initial observations. I'll keep on using my build with the cdo.diff patch and report back with any further findings.

Thanks,
Drew

Florian Walch

unread,
Jun 29, 2015, 5:32:17 PM6/29/15
to vim...@googlegroups.com

I ported the patch to Neovim [1], where CI discovered that it causes test10 to fail. I tested against Vim 7.4.764, and test10 fails there as well (see [2]).

Cheers,
Florian

[1] https://github.com/neovim/neovim/pull/2927
[2] https://travis-ci.org/fwalch/vim-ci/builds/68879635

Christian Brabandt

unread,
Jun 30, 2015, 5:48:50 PM6/30/15
to vim...@googlegroups.com, yega...@gmail.com
> I ported the patch to Neovim [1], where CI discovered that it causes test10 to fail. I tested against Vim 7.4.764, and test10 fails there as well (see [2]).

I think this happens, because with this patch :cf does resolve to :cfdo
instead of :cfile. Swapping the order in ex_cmds.h should fix this.

Best,
Christian
--
Glück ist Scharfsinn für Gelegenheiten und die Fähigkeit sie zu
nutzen.
-- Samuel Goldwyn (eigentl. Goldfish)

Florian Walch

unread,
Jul 1, 2015, 7:54:45 AM7/1/15
to vim...@googlegroups.com, yega...@gmail.com
I can confirm that swapping the commands fixes the test error [1].

Cheers,
Florian

[1] https://travis-ci.org/fwalch/vim-ci/builds/69122901

Drew Neil

unread,
Jul 6, 2015, 1:24:28 PM7/6/15
to vim...@googlegroups.com, yega...@gmail.com
I built Vim with this patch a week ago. I've been using the patched build every day for a week and have not yet encountered any issues.

Yegappan Lakshmanan

unread,
Jul 6, 2015, 10:47:36 PM7/6/15
to vim...@googlegroups.com
Hi,
I have an updated patch that already fixes this problem and a few
other warnings found by clang.
I have also added the proper range handling for these commands. I will
send out the updated
patch in a few days.

- Yegappan

Yegappan Lakshmanan

unread,
Jul 6, 2015, 10:49:43 PM7/6/15
to Drew Neil, vim...@googlegroups.com
Hi,
Thanks for testing the patch. I will send out an updated patch in a few days.
Hopefully this time it will get included. This has been outstanding for more
than two years.

- Yegappan

Yegappan Lakshmanan

unread,
Jul 24, 2015, 1:02:35 AM7/24/15
to vim...@googlegroups.com
Hi all,
The updated patch (against vim 7.4.796) is attached.

- Yegappan
cdo.diff

Bram Moolenaar

unread,
Jul 24, 2015, 1:23:43 PM7/24/15
to Yegappan Lakshmanan, vim...@googlegroups.com
Thanks. So now it's ready to include, right?

--
XML is a nice language for computers. Not for humans.

Yegappan Lakshmanan

unread,
Jul 24, 2015, 1:50:00 PM7/24/15
to Bram Moolenaar, vim...@googlegroups.com
Hi Bram,

On Fri, Jul 24, 2015 at 10:23 AM, Bram Moolenaar <Br...@moolenaar.net> wrote:
>
>> >>
>> >
>> > Thanks for testing the patch. I will send out an updated patch in a few days.
>> > Hopefully this time it will get included. This has been outstanding for more
>> > than two years.
>> >
>>
>> The updated patch (against vim 7.4.796) is attached.
>
> Thanks. So now it's ready to include, right?
>

Yes. Of course :-)

Thanks,
Yegappan

h_east

unread,
Jul 24, 2015, 6:42:45 PM7/24/15
to vim_dev, Br...@moolenaar.net, yega...@gmail.com
Hi Yegappan, Bram and List

2015-7-25(Sat) 2:50:00 UTC+9 yega...@gmail.com:

I confirmed this patch.

I found unexpected behaviors.

Case#1
How to reproduce:
1. cd to vim src dir.
$ cd (Vim clone dir)/vim/src
2. Start Vim. (including this patch version Vim)
$ vim -N -u NONE
3. Grep word "cmdidx" from source and header using vimgrep.
:vimgrep "\<cmdidx\>" **/*.[ch]
4. Open quickfix window.
:copen
5. Do :cdo command. (Intentionally forget the '| update')
:cdo s/\<cmdidx\>/ex_&/g

Expect behavior:
- E37 occurs once.

Actual behavior:
- E37 occurs continuously.


--------
Case#2
How to reproduce:
1~4. (Same abobe.)
5. Do :cdo command. (Intentionally forget the ":w\<CR>")
:exec "cdo norm!iex_\<Esc>"

Expect behavior:
- E37 occurs once.

Actual behavior:
- E37 occurs continuously.

And, When press Ctrl-C after the '-- More --' display, buffer.c was modified unexpectedly.

[original buffer.c:4901]
if (eap->cmdidx == CMD_unhide || eap->cmdidx == CMD_sunhide)

[modified buffer.c:4901]
if (eap->exexexexexexexexexexexexexexexexexexexexexexexex___________________
_____cmdidx == CMD_unhide || eap->cmdidx == CMD_sunhide)


--------
This is my opnion.
When the search pattern exists more in a row, I think :cdo/:ldo confuse to use.
and the processing time tends to be long.


Thanks.
--
Best regards,
Hirohito Higashi (a.k.a h_east)

Yegappan Lakshmanan

unread,
Jul 24, 2015, 11:27:56 PM7/24/15
to h_east, vim_dev, Bram Moolenaar
Hi Hirohito,

On Fri, Jul 24, 2015 at 3:42 PM, h_east <h.eas...@gmail.com> wrote:
> Hi Yegappan, Bram and List
>
>> >> >
>> >> > Thanks for testing the patch. I will send out an updated patch in a few days.
>> >> > Hopefully this time it will get included. This has been outstanding for more
>> >> > than two years.
>> >> >
>> >>
>> >> The updated patch (against vim 7.4.796) is attached.
>> >
>> > Thanks. So now it's ready to include, right?
>> >
>>
>> Yes. Of course :-)
>
> I confirmed this patch.
>
> I found unexpected behaviors.
>

Thanks for testing the patch and sending the bug report. I am attaching
an updated patch that fixes the two problems. Let me know if you see any
issues with this attached patch.

Thanks,
Yegappan
cdo.diff

h_east

unread,
Jul 25, 2015, 12:55:17 PM7/25/15
to vim_dev, Br...@moolenaar.net, yega...@gmail.com
Hi Yegappan and Bram

2015-7-25(Sat) 12:27:56 UTC+9 yega...@gmail.com:
> Hi Hirohito,


>
> On Fri, Jul 24, 2015 at 3:42 PM, h_east wrote:
> > Hi Yegappan, Bram and List
> >
> >> >> >
> >> >> > Thanks for testing the patch. I will send out an updated patch in a few days.
> >> >> > Hopefully this time it will get included. This has been outstanding for more
> >> >> > than two years.
> >> >> >
> >> >>
> >> >> The updated patch (against vim 7.4.796) is attached.
> >> >
> >> > Thanks. So now it's ready to include, right?
> >> >
> >>
> >> Yes. Of course :-)
> >
> > I confirmed this patch.
> >
> > I found unexpected behaviors.
> >
>
> Thanks for testing the patch and sending the bug report. I am attaching
> an updated patch that fixes the two problems. Let me know if you see any
> issues with this attached patch.

I confirmed that reported problem have been fixed.
Thank you for quickly fixes.

I think it is better to discuss.


> > This is my opnion.
> > When the search pattern exists more in a row, I think :cdo/:ldo confuse to use.
> > and the processing time tends to be long.

Do you understand that the results of the following two commands are different, When the search pattern exists more in a row?

(1) :cdo s/\<cmdidx\>/ex_&/g | update
(2) :exec "cdo norm!iex_\<Esc>:w\<CR>"

The (1) is processed all search pattern.
But, The (2) is processed first search pattern in a row.

':cdo' is not necessary, When use only :substitute.

When we use the ':cfdo' command such as ':cdo', Speed is also faster.

:cfdo %s/\<cmdidx\>/ex_&/g | update


So I propose to including patch only ':cfdo' and ':lfdo'.

How do you think?


--
Best regards,
Hirohito Higashi (a.k.a h_east)

>

Yegappan Lakshmanan

unread,
Jul 25, 2015, 1:22:33 PM7/25/15
to h_east, vim_dev, Bram Moolenaar
Hi,
The ":cdo" command executes the supplied command for every valid entry
in the quickfix list. It is upto the supplied command to perform the appropriate
action for every entry.

>
> (1) :cdo s/\<cmdidx\>/ex_&/g | update
>

In this case, the supplied substitute command replaces all the occurrences of
cmdidx in the current line.

>
> (2) :exec "cdo norm!iex_\<Esc>:w\<CR>"
>

In this case, the supplied replaces only the first occurrence of cmdidx. This is
not a problem with the ":cdo" command. This is a problem with the user supplied
command.

>
> The (1) is processed all search pattern.
> But, The (2) is processed first search pattern in a row.
>

This is the expected behavior as this is a problem with the user
supplied command.

>
> ':cdo' is not necessary, When use only :substitute.
>
> When we use the ':cfdo' command such as ':cdo', Speed is also faster.
>
> :cfdo %s/\<cmdidx\>/ex_&/g | update
>
> So I propose to including patch only ':cfdo' and ':lfdo'.
>
> How do you think?
>

No. In some cases the ":cdo/:ldo" commands are useful and in some
other cases ":cfdo/:lfdo" commands are useful.

You are assuming that the ":cdo/:cfdo" commands will only be used
to perform substitutions and the results in the quickfix/location lists are
from a search command (e.g. vimgrep). This is not always the case.
You can populate the quickfix list with output from various tools
(e.g. cscope, tags, lid, global, build output, static analysis output, etc.).

Regards,

Drew Neil

unread,
Jul 26, 2015, 7:54:13 AM7/26/15
to vim...@googlegroups.com
I agree with h_east that if you’re planning to run the :substitute command across multiple files, it makes sense to use:

    :cfdo %s/pattern/replacement/g

and not:

    :cdo s/pattern/replacement/g

I can also see myself wanting to use the :cdo command in combination with :normal for certain types of task. But I’ve come across another problem. Suppose that we have a text file containing these four lines of text:


Now let’s say that we want to turn each occurrence of ‘http’ to ‘https’. (We could use the :substitute command here, but let me use this to demonstrate a problem with using :normal). We’ll use :vimgrep to populate the quickfix list with 6 matches:

    :vimgrep /http\zs:/g %

Then we’ll insert the ’s’ character in front of the colon with this command:

    :cdo normal is

The resulting text looks like this:


In the last line, we get ‘https’, then ‘httsp’, then ‘htstp’. Not ideal!

The problem here is that the quickfix list records line and column numbers. If characters are added or removed near the start of the line, the column numbers for later matches on that line will no longer line up with the match that created the original quickfix list entry.

I’m not sure if this is a problem with the quickfix list, with :cdo, or with :normal.

Drew



--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to a topic in the Google Groups "vim_dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_dev/dfyt-G6SMec/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Drew Neil

unread,
Jul 26, 2015, 8:07:29 AM7/26/15
to vim...@googlegroups.com
Using the same example as before, with this text:
This time running the commands:

    :vimgrep /http\zs:/g %
    :cdo normal o

That should create a new empty line after each match in the quickfix list. To my surprise this worked just fine, producing this output:
    [eof - three blank lines before end of file]

I was expecting this to suffer from a similar problem as the previous example. This time it’s the line numbers (not column numbers) that would fall out of sync with the matches. But it doesn’t happen. Here’s the addresses in the quickfix list before running those commands:

    1 col 5
    2 col 5
    3 col 5
    4 col 5
    4 col 24
    4 col 43

After running the `:cdo normal o` command, the quickfix list contains these addresses:

    1 col 5
    3 col 5
    5 col 5
    7 col 5
    7 col 24
    7 col 43

This suggests that the quickfix list is somehow updated between edits that modify the number of lines in a file. Would it be possible to update the quickfix list could also between edits that modify the number of characters in a line?

Drew


Yegappan Lakshmanan

unread,
Jul 26, 2015, 3:22:20 PM7/26/15
to vim_dev
Hi,

On Sun, Jul 26, 2015 at 4:53 AM, Drew Neil <andrew....@gmail.com> wrote:
> I agree with h_east that if you’re planning to run the :substitute command
> across multiple files, it makes sense to use:
>
> :cfdo %s/pattern/replacement/g
>
> and not:
>
> :cdo s/pattern/replacement/g
>

Depending on the task, you can use either the ":cdo" or the ":cfdo" commands.

If you want to perform text search/replace across all the files in the quickfix
list, then the ":cfdo" command with ":%s/.../g" is the correct option (as it is
more optimal).

This is similar to using the "g" argument to the ":substitute" command to
replace all the matching text in a single line. And using the "%" range
to replace text in all the lines. If you want to replace multiple matching
text across all the lines in a file, then you have to pass both "%" and "g".
If you don't, then the text will not be correctly replaced. This is not a
problem with the ":substitute" command.
This is a problem with the quickfix list functionality. Currently when a line
is added or removed, then the line numbers in the quickfix list entries
are updated. But when a line is modified, the column numbers in the
quickfix list entries are not updated. Refer to the qf_mark_adjust()
function.

In the above example, you should use ":s/../g" instead of the ":normal"
command.

Regards,
Yegappan

Yegappan Lakshmanan

unread,
Jul 26, 2015, 3:24:30 PM7/26/15
to vim_dev
Hi,
As I mentioned in my previous e-mail, the qf_mark_adjust() function is used
to adjust the line numbers in the quickfix list whenever a line is added or
removed from a file. But when a line is modified, the column numbers in
the quickfix list are not currently updated. This is a bug in the quickfix
functionality and needs to be fixed.

- Yegappan

Yegappan Lakshmanan

unread,
Jul 29, 2015, 4:34:11 PM7/29/15
to vim_dev
Hi all,

On Sun, Jul 26, 2015 at 12:22 PM, Yegappan Lakshmanan
<yega...@gmail.com> wrote:
> Hi,
>
> On Sun, Jul 26, 2015 at 4:53 AM, Drew Neil <andrew....@gmail.com> wrote:
>> I agree with h_east that if you’re planning to run the :substitute command
>> across multiple files, it makes sense to use:
>>
>> :cfdo %s/pattern/replacement/g
>>
>> and not:
>>
>> :cdo s/pattern/replacement/g
>>
>
> Depending on the task, you can use either the ":cdo" or the ":cfdo" commands.
>

I haven't see any replies so far. I am not sure whether we are
agreeing to add both the
commands or only the cfdo/lfdo commands? Do you guys think that only
the cfdo/lfdo
commands will be useful?

Regards,
Yegappan

Christian Brabandt

unread,
Jul 30, 2015, 2:21:54 AM7/30/15
to vim...@googlegroups.com
Am 2015-07-29 22:34, schrieb Yegappan Lakshmanan:
> I haven't see any replies so far. I am not sure whether we are
> agreeing to add both the
> commands or only the cfdo/lfdo commands? Do you guys think that only
> the cfdo/lfdo
> commands will be useful?

I think, depending on the task, both options could be useful.

Best,
Christian

Ingo Karkat

unread,
Jul 30, 2015, 3:08:52 PM7/30/15
to vim...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I agree; my ArgsAndMore plugin
(http://www.vim.org/scripts/script.php?script_id=4152) also provides
both :CDoEntry and :CDoFile commands.

- -- regards, ingo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQEcBAEBAgAGBQJVunY+AAoJEA7ziXlAzQ/vL6kIAJRbiSHCSL4JDT07ia8DRPwS
gaQGk7/tmngUs8vpwg8Qokx2KthS75eep69dS5KuzL2/f9c+Mdcs/sYbe7QJYE4Y
r3uZvYhxnnvSWyle6+5OCSurUrc4YqG6qozT4EaBTXS9HvuUS4wVO1COTfirUwsG
+IUYfg6X7esgBegTRyV1S2zliUv6y03de3r44L1zfUgU7/96/ODFFanGhb62Ehwc
ZCaSD1X3ElVDOiFN4ZI3g/I7C/WUH1ndp8dB6EkFEM4+VyJVJdwT6W3/scbrDv3P
eEnF5nJIQqgyN4JULRmFEaxYA8V2P0bzsaUvsxGP7g0nPlrtByxKEkxiWtCVa3E=
=jwPs
-----END PGP SIGNATURE-----

Drew Neil

unread,
Jul 31, 2015, 7:54:51 AM7/31/15
to vim...@googlegroups.com
I can see myself finding uses for both :cdo and :cfdo.

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Drew Neil

unread,
Aug 7, 2015, 9:04:32 AM8/7/15
to vim...@googlegroups.com
Would it make sense to break this patch in two? One patch could contain the implementation for :cfdo and :lfdo. The other patch could contain the implementation for :cdo and :ldo. I think that :cfdo is ready to merge. Whereas :cdo seems to be a bit more controversial and perhaps needs more work?

Drew

Yegappan Lakshmanan

unread,
Aug 8, 2015, 2:33:57 AM8/8/15
to vim_dev
Hi,

On Fri, Aug 7, 2015 at 6:03 AM, Drew Neil <andrew....@gmail.com> wrote:
> Would it make sense to break this patch in two? One patch could contain the
> implementation for :cfdo and :lfdo. The other patch could contain the
> implementation for :cdo and :ldo. I think that :cfdo is ready to merge.
> Whereas :cdo seems to be a bit more controversial and perhaps needs more
> work?
>

I think the last patch is ready for inclusion into Vim. I have fixed all
the reported issues. I am not sure what else needs to be fixed
in the ":cdo" implementation.

Regards,
Yegappan

Drew Neil

unread,
Sep 4, 2015, 10:34:34 AM9/4/15
to vim...@googlegroups.com
If you use homebrew on os x, you can now install Vim with the cdo.diff patch applied by running:

    brew install nelstrom/vim/vim --with-cdo

I made this homebrew tap+formula to make it easier to test out this patch: https://github.com/nelstrom/homebrew-vim

Drew


Bram Moolenaar

unread,
Sep 4, 2015, 3:18:46 PM9/4/15
to Drew Neil, vim...@googlegroups.com

Drew Neil wrote:

> If you use homebrew on os x, you can now install Vim with the cdo.diff
> patch applied by running:
>
> brew install nelstrom/vim/vim --with-cdo
>
> I made this homebrew tap+formula to make it easier to test out this patch:
> https://github.com/nelstrom/homebrew-vim

BTW: if you see any problems with this patch, let me know. I might
include it one of these days.


--
The problem with political jokes is that they get elected.

Niels Kobschaetzki

unread,
Sep 4, 2015, 3:50:11 PM9/4/15
to vim...@googlegroups.com
On 04/09 21:18, Bram Moolenaar wrote:
>
>Drew Neil wrote:
>
>> If you use homebrew on os x, you can now install Vim with the cdo.diff
>> patch applied by running:
>>
>> brew install nelstrom/vim/vim --with-cdo
>>
>> I made this homebrew tap+formula to make it easier to test out this patch:
>> https://github.com/nelstrom/homebrew-vim
>
>BTW: if you see any problems with this patch, let me know. I might
>include it one of these days.

I just saw the presentation by Drew Neil about this and I would really
appreciate it, if this patch could be merged.


And now I have to see what the most easy way is to get a vim that
includes this patch for Linux.

Niels

Yegappan Lakshmanan

unread,
Sep 5, 2015, 5:53:29 PM9/5/15
to vim_dev
Hi Bram,

On Fri, Sep 4, 2015 at 12:18 PM, Bram Moolenaar <Br...@moolenaar.net> wrote:
>
> Drew Neil wrote:
>
>> If you use homebrew on os x, you can now install Vim with the cdo.diff
>> patch applied by running:
>>
>> brew install nelstrom/vim/vim --with-cdo
>>
>> I made this homebrew tap+formula to make it easier to test out this patch:
>> https://github.com/nelstrom/homebrew-vim
>
> BTW: if you see any problems with this patch, let me know. I might
> include it one of these days.
>

I have updated the patch against the latest Vim (7.4.854). It is attached
to this e-mail.

- Yegappan
cdo.diff
Reply all
Reply to author
Forward
0 new messages