People,
I live in vim and therefore use vimdiff most of the time for my needs but I have a use case where I only want to diff on the FIRST field of two files ie the files have lines that look like: [dir|file]name | [D|F] | mtime and I need to be able to have vimdiff only working on the [dir|file]name and ignore the rest of the line - is this possible somehow? Thanks, Phil. -- Philip Rhoades PO Box 896 Cowra NSW 2794 Australia E-mail: [hidden email] -- -- You received this message from the "vim_use" 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 the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/8efc939a5f0a85d8d0797a8bd5607f00%40pricom.com.au. |
Philip Rhoades wrote: > I live in vim and therefore use vimdiff most of the time for my needs > but I have a use case where I only want to diff on the FIRST field of > two files ie the files have lines that look like: > > [dir|file]name | [D|F] | mtime > > and I need to be able to have vimdiff only working on the [dir|file]name > and ignore the rest of the line - is this possible somehow? This is currently not possible. And it would be more than a bit of work to implement. At the same time, it can be very useful to be able to diff while ignoring some text. A first idea would be to define a pattern, replace the matched text with spaces, create the diff, then undo the replacement. Perhaps also highlight the ignored text. Optionally this would work the other way: replace the not-matched text with spaces. -- Latest survey shows that 3 out of 4 people make up 75% of the world's population. /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_use" 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 the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/202104011648.131Gm6XB1999673%40masaka.moolenaar.net. |
In reply to this post by philip_rhoades
'Philip Rhoades' via vim_use wrote:
> People, > > I live in vim and therefore use vimdiff most of the time for my needs > but I have a use case where I only want to diff on the FIRST field of > two files ie the files have lines that look like: > > [dir|file]name | [D|F] | mtime > > and I need to be able to have vimdiff only working on the > [dir|file]name and ignore the rest of the line - is this possible > somehow? (https://www.vim.org/scripts/script.php?script_id=3075). I haven't used it to do what you're asking for, but it seems to me that this plugin might help you. Its worth a try, anyway. Chip Campbell -- -- You received this message from the "vim_use" 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 the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/da96fbad-41fe-bef8-6d0c-16e7ca78a8b6%40drchip.org. |
In reply to this post by philip_rhoades
On Do, 01 Apr 2021, 'Philip Rhoades' via vim_use wrote: > People, > > I live in vim and therefore use vimdiff most of the time for my needs but I > have a use case where I only want to diff on the FIRST field of two files ie > the files have lines that look like: > > [dir|file]name | [D|F] | mtime > > and I need to be able to have vimdiff only working on the [dir|file]name and > ignore the rest of the line - is this possible somehow? > > Thanks, Have a look at my plugin: https://github.com/chrisbra/vim-diff-enhanced The README.md has an example of that. Best, Christian -- So kam ich unter die Deutschen. Ich forderte nicht viel und war gefaßt noch weniger zu finden. -- Johann Christian Friedrich Hölderlin -- -- You received this message from the "vim_use" 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 the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20210401170136.GG2834374%40256bit.org. |
Christian, Charles, Bram,
Thanks so much for your responses! - they are much appreciated! Phil. On 2021-04-02 04:01, Christian Brabandt wrote: > On Do, 01 Apr 2021, 'Philip Rhoades' via vim_use wrote: > >> People, >> >> I live in vim and therefore use vimdiff most of the time for my needs >> but I >> have a use case where I only want to diff on the FIRST field of two >> files ie >> the files have lines that look like: >> >> [dir|file]name | [D|F] | mtime >> >> and I need to be able to have vimdiff only working on the >> [dir|file]name and >> ignore the rest of the line - is this possible somehow? >> >> Thanks, > > Have a look at my plugin: > https://github.com/chrisbra/vim-diff-enhanced > > The README.md has an example of that. > > Best, > Christian > -- > So kam ich unter die Deutschen. Ich forderte nicht viel und war > gefaßt noch weniger zu finden. > -- Johann Christian Friedrich Hölderlin > > -- -- Philip Rhoades PO Box 896 Cowra NSW 2794 Australia E-mail: [hidden email] -- -- You received this message from the "vim_use" 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 the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/dd4a5841eef66a35ac5391d790c8ed1e%40pricom.com.au. |
Christian,
I have installed your plugin, set diffopt in .vimrc and all the tests work and :EnhancedDiff histogram command from your web page works but I can't get EnhancedDiffIgnorePat ^[^;]\+; or EnhancedDiffIgnorePat ;[^;]\+$ to work with some manually created files like on your web page. I tried looking at test.sh but I don't understand: -c "if filereadable('vimrc') | so vimrc | endif'" - what is "so"? - and there appears to be an unpaired single quote? Any help appreciated! Thanks, Phil. On 2021-04-02 07:22, 'Philip Rhoades' via vim_use wrote: > Christian, Charles, Bram, > > Thanks so much for your responses! - they are much appreciated! > > Phil. > > > On 2021-04-02 04:01, Christian Brabandt wrote: >> On Do, 01 Apr 2021, 'Philip Rhoades' via vim_use wrote: >> >>> People, >>> >>> I live in vim and therefore use vimdiff most of the time for my needs >>> but I >>> have a use case where I only want to diff on the FIRST field of two >>> files ie >>> the files have lines that look like: >>> >>> [dir|file]name | [D|F] | mtime >>> >>> and I need to be able to have vimdiff only working on the >>> [dir|file]name and >>> ignore the rest of the line - is this possible somehow? >>> >>> Thanks, >> >> Have a look at my plugin: >> https://github.com/chrisbra/vim-diff-enhanced >> >> The README.md has an example of that. >> >> Best, >> Christian >> -- >> So kam ich unter die Deutschen. Ich forderte nicht viel und war >> gefaßt noch weniger zu finden. >> -- Johann Christian Friedrich Hölderlin >> >> -- > > -- > Philip Rhoades > > PO Box 896 > Cowra NSW 2794 > Australia > E-mail: [hidden email] > > -- -- Philip Rhoades PO Box 896 Cowra NSW 2794 Australia E-mail: [hidden email] -- -- You received this message from the "vim_use" 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 the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/005dbdcb964b75f4e7d5b872d450298a%40pricom.com.au. |
'so' would be short for 'source'
On Friday, April 2, 2021 at 7:55:16 AM UTC-4 Philip Rhoades wrote: Christian, -- You received this message from the "vim_use" 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 the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/78f064a0-7f2e-4738-80fb-e55295375889n%40googlegroups.com. |
rwm,
On 2021-04-03 00:07, [hidden email] wrote: > 'so' would be short for 'source' Ah . . of course . . thanks! Phil. > On Friday, April 2, 2021 at 7:55:16 AM UTC-4 Philip Rhoades wrote: > >> Christian, >> >> I have installed your plugin, set diffopt in .vimrc and all the >> tests >> work and >> >> :EnhancedDiff histogram >> >> command from your web page works but I can't get >> >> EnhancedDiffIgnorePat ^[^;]\+; >> >> or >> >> EnhancedDiffIgnorePat ;[^;]\+$ >> >> to work with some manually created files like on your web page. >> >> I tried looking at test.sh but I don't understand: >> >> -c "if filereadable('vimrc') | so vimrc | endif'" >> >> - what is "so"? - and there appears to be an unpaired single quote? >> >> Any help appreciated! >> >> Thanks, >> >> Phil. >> >> On 2021-04-02 07:22, 'Philip Rhoades' via vim_use wrote: >>> Christian, Charles, Bram, >>> >>> Thanks so much for your responses! - they are much appreciated! >>> >>> Phil. >>> >>> >>> On 2021-04-02 04:01, Christian Brabandt wrote: >>>> On Do, 01 Apr 2021, 'Philip Rhoades' via vim_use wrote: >>>> >>>>> People, >>>>> >>>>> I live in vim and therefore use vimdiff most of the time for my >> needs >>>>> but I >>>>> have a use case where I only want to diff on the FIRST field of >> two >>>>> files ie >>>>> the files have lines that look like: >>>>> >>>>> [dir|file]name | [D|F] | mtime >>>>> >>>>> and I need to be able to have vimdiff only working on the >>>>> [dir|file]name and >>>>> ignore the rest of the line - is this possible somehow? >>>>> >>>>> Thanks, >>>> >>>> Have a look at my plugin: >>>> https://github.com/chrisbra/vim-diff-enhanced >>>> >>>> The README.md has an example of that. >>>> >>>> Best, >>>> Christian >>>> -- >>>> So kam ich unter die Deutschen. Ich forderte nicht viel und war >>>> gefaßt noch weniger zu finden. >>>> -- Johann Christian Friedrich Hölderlin >>>> >>>> -- >>> >>> -- >>> Philip Rhoades >>> >>> PO Box 896 >>> Cowra NSW 2794 >>> Australia >>> E-mail: [hidden email] >>> >>> -- >> >> -- >> Philip Rhoades >> >> PO Box 896 >> Cowra NSW 2794 >> Australia >> E-mail: [hidden email] > > -- > -- > You received this message from the "vim_use" 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 the Google > Groups "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [hidden email]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/vim_use/78f064a0-7f2e-4738-80fb-e55295375889n%40googlegroups.com > [1]. > > > Links: > ------ > [1] > https://groups.google.com/d/msgid/vim_use/78f064a0-7f2e-4738-80fb-e55295375889n%40googlegroups.com?utm_medium=email&utm_source=footer -- Philip Rhoades PO Box 896 Cowra NSW 2794 Australia E-mail: [hidden email] -- -- You received this message from the "vim_use" 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 the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/eebed565f17d82ccf26827ad396f4c22%40pricom.com.au. |
Free forum by Nabble | Edit this page |