Re: Matching a non-match

2021-10-14 Thread Tim Chase
On 2021-10-14 17:34, A. Wik wrote: > Yes, I think so. Is it because \@! is zero-width that it must be > paired with something (eg. ".") that does have width? > > And it matches an empty line because of the \%( ... \)*? Exactly, on both fronts.  -tim -- -- You received this message from

Re: Matching a non-match

2021-10-14 Thread A. Wik
Hi all, On Wed, 13 Oct 2021 at 14:36, Tim Chase wrote: > > On 2021-10-11 23:45, A. Wik wrote: > > > or if you want to match the entire line, you can use: > > > > > > /^\%(\%(exim.input\)\@!.\)*$/ > > > > > > That breaks down to

Re: Matching a non-match

2021-10-13 Thread Tim Chase
On 2021-10-11 23:45, A. Wik wrote: > > or if you want to match the entire line, you can use: > > > > /^\%(\%(exim.input\)\@!.\)*$/ > > > > That breaks down to > > > > ^ from the start of the line > > \%(…\)*zero or more of

Re: Matching a non-match

2021-10-11 Thread A. Wik
(.*exim.input\)\@ > you can use which only finds the start of the line: > >/^\%(.*exim.input\)\@! > > or if you want to match the entire line, you can use: > > /^\%(\%(exim.input\)\@!.\)*$/ > > That breaks down to > > ^ from the start of the line > \

Re: Matching a non-match

2020-12-29 Thread Kenny Stauffer
In a simple test file, this did what I think you're asking: /\v^(.*exim[/]input)@! Notice the use of @! instead of @ Hi all, > > Browsing a directory listing, sometimes I hit lines like these: > ./spool/exim/input/1FM8sl-4n-Ix-H > ./spool/exim/input/1FM8sn-4u-OF-D >

Re: Matching a non-match

2020-12-20 Thread Tim Chase
On 2020-12-20 11:09, A. Wik wrote: > Browsing a directory listing, sometimes I hit lines like these: > ./spool/exim/input/1FM8sl-4n-Ix-H > ./spool/exim/input/1FM8sn-4u-OF-D > ./spool/exim/input/1E9dsQ-4f-MO-D > [... thousands of similar lines ...] > > How can I use "/" to find the

Re: Matching a non-match - workaround: less

2020-12-20 Thread Christian Brabandt
On So, 20 Dez 2020, Sven Guckes wrote: > workaround: > open the file with "less" and right after initiating search with '/' > type '!' and the prompt will switch to "Non-match /". now enter > eg "spool.exim.input" and less will skip all those lines.

Re: Matching a non-match - workaround: less

2020-12-20 Thread Tim Chase
On 2020-12-20 14:53, Sven Guckes wrote: > workaround: > open the file with "less" and right after initiating search with '/' > type '!' and the prompt will switch to "Non-match /". now enter > eg "spool.exim.input" and less will skip all those lines. :-)

Re: Matching a non-match

2020-12-20 Thread Charles Campbell
A. Wik wrote: Hi all, Browsing a directory listing, sometimes I hit lines like these: ./spool/exim/input/1FM8sl-4n-Ix-H ./spool/exim/input/1FM8sn-4u-OF-D ./spool/exim/input/1E9dsQ-4f-MO-D [... thousands of similar lines ...] How can I use "/" to find the next line not matching the

Re: Matching a non-match - workaround: less

2020-12-20 Thread Sven Guckes
* A. Wik [2020-12-20 14:39]: > Browsing a directory listing, sometimes I hit lines like these: > ./spool/exim/input/1FM8sl-4n-Ix-H > ./spool/exim/input/1FM8sn-4u-OF-D > ./spool/exim/input/1E9dsQ-4f-MO-D > [... thousands of similar lines ...] > > How can I use "/" to find the next

Matching a non-match

2020-12-20 Thread A. Wik
Hi all, Browsing a directory listing, sometimes I hit lines like these: ./spool/exim/input/1FM8sl-4n-Ix-H ./spool/exim/input/1FM8sn-4u-OF-D ./spool/exim/input/1E9dsQ-4f-MO-D [... thousands of similar lines ...] How can I use "/" to find the next line not matching the above pattern?

Re: How to search a match on a line and then make a change on the next line?

2020-05-14 Thread Tim Chase
attern is the same. By (re)using the pattern from the :g in the :s by using an empty pattern here: s//replacement/flags it (re)captures the portion captured from the same pattern found in the :g part of the command. So if you happened to have two adjacent lines both containing "c

Re: How to search a match on a line and then make a change on the next line?

2020-05-14 Thread boB Stepp
On Thu, May 14, 2020 at 12:52:29PM -0500, Tim Chase wrote: On 2020-05-14 12:27, boB Stepp wrote: On Thu, May 14, 2020 at 08:00:38AM -0500, Tim Chase wrote: > :%s/\(\/\1 Thank you, this works. I had to look up some of the flags you used before I understood what you are doing. In my particular

Re: How to search a match on a line and then make a change on the next line?

2020-05-14 Thread Tim Chase
On 2020-05-14 12:27, boB Stepp wrote: > On Thu, May 14, 2020 at 08:00:38AM -0500, Tim Chase wrote: > > :%s/\(\/\1 > > Thank you, this works. I had to look up some of the flags you used > before I understood what you are doing. In my particular example I > found I did not need to use "\+", "\<"

Re: How to search a match on a line and then make a change on the next line?

2020-05-14 Thread boB Stepp
than # field pobox (with the leading hash+space)? In the above I want to change the lines starting with "pobox" to match the format of the line above it, e.g., "field pobox", "field work_pobox" and "field other_pobox", respectively. My best effort so far

Re: How to search a match on a line and then make a change on the next line?

2020-05-14 Thread Tim Chase
field pobox (with the leading hash+space)? > In the above I want to change the lines starting with "pobox" to > match the format of the line above it, e.g., "field pobox", "field > work_pobox" and "field other_pobox", respectively. My best effort > so far to

Re: How to search a match on a line and then make a change on the next line?

2020-05-13 Thread Tony Mechelynck
, string > field other_state = State, string > field other_zip = Zipcode, string > field other_country = Country, string > > In the above I want to change the lines starting with "pobox" to match the > format of the line above it, e.g., "field pobox", "field

How to search a match on a line and then make a change on the next line?

2020-05-13 Thread boB Stepp
ddress, string field other_address2 = Address2, string pobox = "PO Box", string field other_city = City, string field other_state = State, string field other_zip = Zipcode, string field other_country = Country, string In the above I want to change the lines starting with "pobox" to ma

Re: match string in part of List buffer starting at index

2020-01-17 Thread Ni Va
It's done. Thank you Le ven. 17 janv. 2020 à 16:34, 'Andy Wokula' via vim_use < vim_use@googlegroups.com> a écrit : > Am 17.01.2020 um 08:48 schrieb Ni Va: > > Hi, > > > > Would like to match a string onto a part of List starting to Nth index ? > > > > Th

Re: match string in part of List buffer starting at index

2020-01-17 Thread 'Andy Wokula' via vim_use
Am 17.01.2020 um 08:48 schrieb Ni Va: Hi, Would like to match a string onto a part of List starting to Nth index ? Thank you Check out match(), matchstr(), matchstrpos() etc with List argument for {expr} and {start} index. -- Andy -- -- You received this message from the "vim_use"

Re: match string in part of List buffer starting at index

2020-01-17 Thread Shlomi Fish
On Fri, 17 Jan 2020 04:42:30 -0800 (PST) Ni Va wrote: > That sort of thing > match(s:buffer[startidx : ] > Try using https://learnvimscriptthehardway.stevelosh.com/chapters/27.html#joining or a loop or whatever. > Le vendredi 17 janvier 2020 09:40:36 UTC+1, Shlomi

Re: match string in part of List buffer starting at index

2020-01-17 Thread Ni Va
That sort of thing match(s:buffer[startidx : ] Le vendredi 17 janvier 2020 09:40:36 UTC+1, Shlomi Fish a écrit : > > On Thu, 16 Jan 2020 23:48:00 -0800 (PST) > Ni Va > wrote: > > > Hi, > > > > Would like to match a string onto a part of List starting t

Re: match string in part of List buffer starting at index

2020-01-17 Thread Shlomi Fish
On Thu, 16 Jan 2020 23:48:00 -0800 (PST) Ni Va wrote: > Hi, > > Would like to match a string onto a part of List starting to Nth index ? > > Thank you > Hi, what do you mean? -- Shlomi Fish https://www.shlomifish.org/ Let’s talk about restores instead of back

match string in part of List buffer starting at index

2020-01-16 Thread Ni Va
Hi, Would like to match a string onto a part of List starting to Nth index ? Thank you -- -- 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

Re: highlight match fails

2019-10-10 Thread Ni Va
Was overloaded by this one : " syn match s7JumpStatement /^\(L*\d\+:\)*\s\+\zs\(SPA\|SPL\|SPBNB\|SPBN\|SPBB\|SPB\|SPBI\|SPBIN\|SLW\|SPO\|SPS\|SPZ\|SPN\|SPP\|SPM\|SPPZ\|SPMZ\|SPU\|LOOP\)\(\w\)\@!/ Le jeudi 10 octobre 2019 15:57:44 UTC+2, Ni Va a écrit : > > Hi, > > I would

highlight match fails

2019-10-10 Thread Ni Va
Hi, I would like to recognize that label near SPBN. SPBN _003; syn match s7JumpToLabel /^\s\+\(SPBN\|SPB\|SPA\)\s\+\zs\w\+/ ===> seems to highlight on normal search. but syntax highlight does not success : syn match s7JumpToLabel /^\s\+\(SPBN\|SPB\|SPA\)\s\+\z

Re: how to match the first pattern

2018-08-03 Thread Sand Glass
On Tuesday, July 31, 2018 at 4:57:41 PM UTC+8, Michael Wagner wrote: > On Jul 30, 2018 um 18:46:42, Sand Glass wrote: > > On Monday, July 30, 2018 at 8:13:26 PM UTC+8, Tony Mechelynck wrote: > > > > > > Ah yes, there are several regular-expression "dialects", often quite > > > similar but not

Re: how to match the first pattern

2018-07-31 Thread Chr. von Stuckrad
On Tue, 31 Jul 2018, Michael Wagner wrote: > On Jul 30, 2018 um 18:46:42, Sand Glass wrote: > If you are on Linux, you can test 'txt2regex'. Interesting! And a good way to compose for more than one of the dialects. Bit ALAS, it does not know (as far as I saw) about 'shortest' aka non-greedy

Re: how to match the first pattern

2018-07-31 Thread Michael Wagner
On Jul 30, 2018 um 18:46:42, Sand Glass wrote: > On Monday, July 30, 2018 at 8:13:26 PM UTC+8, Tony Mechelynck wrote: > > > > Ah yes, there are several regular-expression "dialects", often quite > > similar but not always strictly identical, and depending on whether > > you are using grep (which

Re: how to match the first pattern

2018-07-30 Thread Sand Glass
gt;> On Saturday, July 28, 2018 at 3:18:23 PM UTC+8, Sand Glass wrote: > > >> > how can I stop the pattern at the first "]"? > > >> It's good in vim. Then I try to use the regular in perl script, but > > >> failed. > > > > >

Re: how to match the first pattern

2018-07-30 Thread Sand Glass
how can I stop the pattern at the first "]"? > >> It's good in vim. Then I try to use the regular in perl script, but failed. > > > > Same 'thing', i.e. the shortest match, so (in linux 'man perlre') > > as far as I remember a '?' behind the '*' makes it 'non-greed

Re: how to match the first pattern

2018-07-30 Thread Tony Mechelynck
he regular in perl script, but failed. > > Same 'thing', i.e. the shortest match, so (in linux 'man perlre') > as far as I remember a '?' behind the '*' makes it 'non-greedy' > and this \[.*?\] gives 'the next closing ']' . > > Stucki Ah yes, there are several regular-expression

Re: how to match the first pattern

2018-07-30 Thread Chr. von Stuckrad
On Mon, 30 Jul 2018, Sand Glass wrote: > On Saturday, July 28, 2018 at 3:18:23 PM UTC+8, Sand Glass wrote: > > how can I stop the pattern at the first "]"? > It's good in vim. Then I try to use the regular in perl script, but failed. Same 'thing', i.e. the shortest ma

Re: how to match the first pattern

2018-07-30 Thread Sand Glass
On Saturday, July 28, 2018 at 3:18:23 PM UTC+8, Sand Glass wrote: > This is my code block: > ### > output [NUM_STAGE-1:0] enable; > input [7:0] big_grad_thr;//8'h10 [2:0] > ### > I want to find pattern "[NUM_STAGE-1:0]" "[7:0]", > I tried '/\[.*\]', but the result is "[7:0]

Re: how to match the first pattern

2018-07-28 Thread Tony Mechelynck
but the result is "[7:0] big_grad_thr;//8'h10 [2:0]", > how can I stop the pattern at the first "]"? See :help pattern-overview The * multi matches "as many as possible" of the preceding atom. To match "as few as possible", use \{-} instead. Best regards, T

how to match the first pattern

2018-07-28 Thread Sand Glass
This is my code block: ### output [NUM_STAGE-1:0] enable; input [7:0] big_grad_thr;//8'h10 [2:0] ### I want to find pattern "[NUM_STAGE-1:0]" "[7:0]", I tried '/\[.*\]', but the result is "[7:0] big_grad_thr;//8'h10 [2:0]", how can I stop the pattern at the first "]"? -- --

Re: Perform diff as exact line match

2018-06-29 Thread Arun
; > > > See ":help diff.txt" > > Hi Tony, > Specifically, I need to match lines completely ignore partial differences. > I have the most recent version of vim with a diff utility, however I do not > see anything diff.txt or diffopt that allows me to specify matche

Re: Perform diff as exact line match

2018-06-29 Thread Joseph L. Casale
On Friday, June 29, 2018 at 10:55:25 AM UTC-6, Gary Johnson wrote: > There's also sdiff: > > sdiff file1 file2 | less > > or > > sdiff file1 file2 | vim - That worked brilliantly! Thanks. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply

Re: Perform diff as exact line match

2018-06-29 Thread Gary Johnson
On 2018-06-29, arocker wrote: > >> diff --changed-group-format= file1 file2 > >> comm -12 file1 file2 > >> > > > That's insightful but is the side-by-side comparison I was hoping for in > > vim so I could visually assess how the collections differed. > > > > Pipe into less? E.g. comm

Re: Perform diff as exact line match

2018-06-29 Thread Tim Chase
On 2018-06-28 18:30, Joseph L. Casale wrote: > Does a means or plugin exist to perform a diff between two > tabs/files that compares entire lines? I've occasionally hacked this by inserting a unique tag (usually just an incrementing number) after each line in the file, something like :windo

Re: Perform diff as exact line match

2018-06-29 Thread arocker
>> diff --changed-group-format= file1 file2 >> comm -12 file1 file2 >> > That's insightful but is the side-by-side comparison I was hoping for in > vim so I could visually assess how the collections differed. > Pipe into less? E.g. comm -12 file1 file2 | less -- -- You received

Re: Perform diff as exact line match

2018-06-29 Thread Joseph L. Casale
On Friday, June 29, 2018 at 8:57:45 AM UTC-6, Gary Johnson wrote: > I _think_ I understand what you want, but I don't know of a way to > make Vim's internal comparison algorithm do that. > > Either of these two Linux commands will generate an output of only > the lines common to file1 and file2,

Re: Perform diff as exact line match

2018-06-29 Thread Gary Johnson
ee ":help diff.txt" > > Hi Tony, > Specifically, I need to match lines completely ignore partial differences. > I have the most recent version of vim with a diff utility, however I do not > see anything diff.txt or diffopt that allows me to specify matches must be > comp

Re: Perform diff as exact line match

2018-06-29 Thread Joseph L. Casale
On Thursday, June 28, 2018 at 7:46:51 PM UTC-6, Tony Mechelynck wrote: > No plugin required, provided that you have a Vim compiled with +diff > and that the diff utility is installed and can be found on your $PATH. > > See ":help diff.txt" Hi Tony, Specifically, I need to

Re: Perform diff as exact line match

2018-06-28 Thread Tony Mechelynck
On Fri, Jun 29, 2018 at 3:30 AM, Joseph L. Casale wrote: > Does a means or plugin exist to perform a diff between two tabs/files that > compares entire lines? > > Thanks. No plugin required, provided that you have a Vim compiled with +diff and that the diff utility is installed and can be found

Perform diff as exact line match

2018-06-28 Thread Joseph L. Casale
Does a means or plugin exist to perform a diff between two tabs/files that compares entire lines? Thanks. -- -- 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

Re: Change only second match on a line...

2018-02-15 Thread 'Grant Taylor' via vim_use
On 02/15/2018 06:54 PM, Tim Chase wrote: The easiest way on most platforms is to just pipe it through sed which does the dirty work for you: :%! sed 's/old/new/2' Yep, that would do it. Sometimes the solution is to look outside of vim. If you don't have sed available... I shudder to

Re: Change only second match on a line...

2018-02-15 Thread Tim Chase
On 2018-02-15 17:16, 'Grant Taylor' via vim_use wrote: > Is there a way to change only the second (or any specific) instance > of a pattern on a line? > > Sort of like how 's/old/new/' changes the first instance of "old" > to "new", but for the second (or any specific) instance. The easiest way

Change only second match on a line...

2018-02-15 Thread 'Grant Taylor' via vim_use
tance of "old" twice and then changing the first instance of the "new" pattern back to the "old" pattern? Extrapolating the above sequence out to subsequent instances would be more and more annoying. I know that I can build a full RE that will match the first, seco

Re: Puzzling regexp match

2017-10-29 Thread Lifepillar
On 29/10/2017 19:45, Dominique Pellé wrote: Lifepillar <lifepil...@lifepillar.me> wrote: I might be missing something trivial, but I need others's eyes to look at it. Why are these patterns :echo match('x', "[)-~]") :echo match('x', "[(-~]") :echo match('x

Re: Puzzling regexp match

2017-10-29 Thread Dominique Pellé
Lifepillar <lifepil...@lifepillar.me> wrote: > I might be missing something trivial, but I need others's > eyes to look at it. Why are these patterns > > :echo match('x', "[)-~]") > :echo match('x', "[(-~]") > :echo match('x', "[(->]") >

Puzzling regexp match

2017-10-29 Thread Lifepillar
I might be missing something trivial, but I need others's eyes to look at it. Why are these patterns :echo match('x', "[)-~]") :echo match('x', "[(-~]") :echo match('x', "[(->]") :echo match('x', "[)->]") matching? It seems they match any

Re: Creating a syntax file need to grab a global variable to match.

2017-08-20 Thread Robert
> > > It defaults to: > > > > startDelim is: {{+ > > endDelim is: +}} > > > > I would like to grab the global variable g:startDelim and g:endDelim and > > use that in my syntax matching group. > > Bob - > Have you tried something like t

Re: Creating a syntax file need to grab a global variable to match.

2017-08-20 Thread Sergey Golitsynskiy
uld like to grab the global variable g:startDelim and g:endDelim and use > that in my syntax matching group. Bob - Have you tried something like this: exe "syntax match mystartKeyword /" . g:startDelim . "/" exe "syntax match myKeyword /" . g:endDelim . &qu

Creating a syntax file need to grab a global variable to match.

2017-08-19 Thread Robert
. Since the end user can remap it and I do using || instead of the curly brackets, I need to grab and use that global variable. I can force match it to my own choice with: syntax match mystartKeyword "\v\|\|\+" syntax match myKeyword "\v\+\|\|" But that's not optimal. Is th

Re: how to prevent syntax match for repeated chars

2017-06-02 Thread Erhy
Am Donnerstag, 1. Juni 2017 22:09:09 UTC+2 schrieb Erhy: > Hello, > the syntax script highlights + ++ +++ > I want highlight only for one + for syn match scilabArithmetic "[+-/\\*\^]\{1}" I wrote also for each operator e.g. syn match scilabOverrun "[\*]\{2,}"

how to prevent syntax match for repeated chars

2017-06-01 Thread Erhy
Hello, the syntax script highlights + ++ +++ I want highlight only for one + Have you a tip for me? Erhy -- -- 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

RE: How to prevent asterisk key from advancing to next match when pressed

2017-01-17 Thread Waters, Bill
Look at the SearchAlternatives plugin. When you add an item to the search list, it does not advance to the next match. -Original Message- From: vim_use@googlegroups.com [mailto:vim_use@googlegroups.com] On Behalf Of Slartibartfast Sent: Wednesday, December 14, 2016 1:03 AM To: vim_use

Re: Syntax match first word of line

2016-12-27 Thread Ni Va
ers. > > > -- > Don't stop where the ink does. > > Shawn H Corey Ok it works well to highlight word just after non words with this pattern : syn match s7Accumulator /^\(_\d\+:\)*\W*\zs\(POP\|ENT\)/ But on this sentence : Entree_Word

Re: Syntax match first word of line

2016-12-27 Thread Shawn H Corey
On Tue, 27 Dec 2016 10:08:50 -0800 Bryan Richter wrote: > p.s. Your search pattern is finding the first word that follows some > whitespace, since you used \s\+ ("ONE or more whitespace chars"). Is > that what you meant? If you wanted "the first word, no exceptions" you >

Re: Syntax match first word of line

2016-12-27 Thread Bryan Richter
On Tue, Dec 27, 2016 at 08:59:18AM -0800, Ni Va wrote: > Hi, > > I would like to syntax match the first word but don't know the syntax > > syn match firstWordMatch/^\s\+\w\+/ > > How to map just the \(\w\+\) pattern inside global pattern ? Add \zs, which spe

Syntax match first word of line

2016-12-27 Thread Ni Va
Hi, I would like to syntax match the first word but don't know the syntax syn match firstWordMatch/^\s\+\w\+/ How to mapp just the \(\w\+\) pattern inside global pattern ? Thanks -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your r

Re: How to prevent asterisk key from advancing to next match when pressed

2016-12-15 Thread kamaraju kusumanchi
On Wed, Dec 14, 2016 at 4:03 AM, Slartibartfast <his.royal.slartn...@gmail.com> wrote: > I frequently use the asterisk key (*) in conjunction with 'hlsearch' to > highlight all occurrences of a word in a file. Normally when I do this I > don't actually want to advance to the next

Re: How to prevent asterisk key from advancing to next match when pressed

2016-12-14 Thread Tim Chase
On 2016-12-14 04:34, Slartibartfast wrote: > > :nnoremap * :let @/='\'.expand('cword>').'\>' > > Wow, what on earth does that mean? > > I tried it all the same and yes it does indeed work in gVim but I > have no idea why. It remaps the "*" key to run the ex command that follows. let @/=

Re: How to prevent asterisk key from advancing to next match when pressed

2016-12-14 Thread Slartibartfast
> :nnoremap * :let @/='\'.expand('cword>').'\>' Wow, what on earth does that mean? I tried it all the same and yes it does indeed work in gVim but I have no idea why. I also tried it in Notepad++ and Android Studio (with their respective Vim plugins) and unfortunately it doesn't for either

Re: How to prevent asterisk key from advancing to next match when pressed

2016-12-14 Thread Tim Chase
On 2016-12-14 01:03, Slartibartfast wrote: > Anyone know a way to achieve setting the search word like this > without causing the screen to be scrolled? I'm sure it must be > possible but I'm having trouble working it out myself. Could do something like :nnoremap * :let

How to prevent asterisk key from advancing to next match when pressed

2016-12-14 Thread Slartibartfast
I frequently use the asterisk key (*) in conjunction with 'hlsearch' to highlight all occurrences of a word in a file. Normally when I do this I don't actually want to advance to the next match so I use 'nnoremap' to automatically wind back to the occurrence I was on when I pressed the key

Re: discrepancy in regular expression match using bufdo command

2016-12-08 Thread Gary Johnson
On 2016-12-08, sinbad wrote: > No, i didn't. Is it the same case with all other scripting languages too ? > I just found overloading to be counter intuitive. There seem to be a good > reason for doing so, which i'm missing. I think what you may be missing is that the backslash is not being

Re: discrepancy in regular expression match using bufdo command

2016-12-08 Thread sinbad
No, i didn't. Is it the same case with all other scripting languages too ? I just found overloading to be counter intuitive. There seem to be a good reason for doing so, which i'm missing. Thanks -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply

Re: discrepancy in regular expression match using bufdo command

2016-12-08 Thread 'Jürgen Krämer' via vim_use
Hi, sinbad schrieb am 08.12.2016 um 14:03: > On Thursday, December 8, 2016 at 2:51:51 PM UTC+5:30, jott...@googlemail.com > wrote: > >> inside double quotes the backslash has a special meaning. > > sounds like bad design choice to overload the meaning of an operator like > that. Anyway i got

Re: discrepancy in regular expression match using bufdo command

2016-12-08 Thread sinbad
On Thursday, December 8, 2016 at 2:51:51 PM UTC+5:30, jott...@googlemail.com wrote: >inside double quotes the backslash has a special meaning. sounds like bad design choice to overload the meaning of an operator like that. Anyway i got it working by using :argdo. Thanks for the help. -- --

Re: discrepancy in regular expression match using bufdo command

2016-12-08 Thread 'Jürgen Krämer' via vim_use
Hi, sinbad schrieb am 08.12.2016 um 08:57: > > I have a file contents as follows, i want to change the text from abc("def"); > to > foo(("def")); in multiple files. > > It works if i run the command, but the same thing fails if i run the same > command using bufdo; > > works->

discrepancy in regular expression match using bufdo command

2016-12-07 Thread sinbad
Hi, I have a file contents as follows, i want to change the text from abc("def"); to foo(("def")); in multiple files. It works if i run the command, but the same thing fails if i run the same command using bufdo; works-> :s/abc(\(.*\));/foo((\1));/gc fails-> :bufdo execute

Re: How to omit the "E385: search hit BOTTOM without match for" error message produced by vim script file?

2016-10-17 Thread Bryan Richter
On Mon, Oct 17, 2016 at 02:37:02AM -0700, Igor Forca wrote: > Hi, I have found out a solution without while loop. So in indent.vim > replace all from "execute" to the EOF with: > > :silent g/(SELECT\c/normal! v%2> > > Problem solved. > > P.S. It would still be nice to have some reference to

Re: How to omit the "E385: search hit BOTTOM without match for" error message produced by vim script file?

2016-10-17 Thread Igor Forca
Hi, I have found out a solution without while loop. So in indent.vim replace all from "execute" to the EOF with: :silent g/(SELECT\c/normal! v%2> Problem solved. P.S. It would still be nice to have some reference to documentation how to handle the error codes. Regards -- -- You received

Re: How to omit the "E385: search hit BOTTOM without match for" error message produced by vim script file?

2016-10-16 Thread Igor Forca
Ahhh my mistake. Attached data.sql above is AFTER indent.vim is already applied. Original data.sql is attached in this post. Sorry for confusion. -- -- 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

How to omit the "E385: search hit BOTTOM without match for" error message produced by vim script file?

2016-10-16 Thread Igor Forca
data.sql 2. :source indent.vim Scripts does exactly! what I want, the only problem is at the end it reports error: E385: search hit BOTTOM without match for: (SELECT This error is logical, Vim hit the bottom and it is not allowed to go to the beginning of the buffer because "set nowrapscan&q

Re: syntax match bug: 'keepend' not officially supported, but required in some cases

2016-09-30 Thread Charles E Campbell
Brett Stahlman wrote: The syntax documentation suggests that the 'keepend' argument applies only to syntax regions, not syntax matches. But if I highlight a buffer containing only the following line... ABCDE ...with the following syntax definitions... syn match A /A/ syn match Inside /[A-Z

Re: syntax match bug: 'keepend' not officially supported, but required in some cases

2016-09-29 Thread Brett Stahlman
ontaining only the following line... >> >> ABCDE >> >> ...with the following syntax definitions... >> >> syn match A /A/ >> syn match Inside /[A-Z]\+/ transparent contained containedin=A >> hi A guifg=blue >> >> ...the match group "A"

Re: syntax match bug: 'keepend' not officially supported, but required in some cases

2016-09-29 Thread Bram Moolenaar
Brett Stahlman wrote: > The syntax documentation suggests that the 'keepend' argument applies > only to syntax regions, not syntax matches. But if I highlight a > buffer containing only the following line... > > ABCDE > > ...with the following syntax definitions... >

Match pattern not containing subpattern in between

2016-09-21 Thread Nicola
Hello, I can't figure out how to match a pattern with the following structure: ; 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, sen

Re: syntax match bug: 'keepend' not officially supported, but required in some cases

2016-09-19 Thread Brett Stahlman
ontaining only the following line... >> >> ABCDE >> >> ...with the following syntax definitions... >> >> syn match A /A/ >> syn match Inside /[A-Z]\+/ transparent contained containedin=A >> hi A guifg=blue >> >> ...the match gr

Re: syntax match bug: 'keepend' not officially supported, but required in some cases

2016-09-19 Thread Bram Moolenaar
Brett Stahlman wrote: > The syntax documentation suggests that the 'keepend' argument applies > only to syntax regions, not syntax matches. But if I highlight a > buffer containing only the following line... > > ABCDE > > ...with the following syntax definitions... >

syntax match bug: 'keepend' not officially supported, but required in some cases

2016-09-18 Thread Brett Stahlman
The syntax documentation suggests that the 'keepend' argument applies only to syntax regions, not syntax matches. But if I highlight a buffer containing only the following line... ABCDE ...with the following syntax definitions... syn match A /A/ syn match Inside /[A-Z]\+/ transparent contained

Re: Using ^ (match start of line) and \% (match column) together

2016-06-08 Thread Nikolay Aleksandrovich Pavlov
2016-06-08 11:40 GMT+03:00 Nicola <nvitacolo...@gmail.com>: > On 2016-06-07 20:47:07 +, Nikolay Aleksandrovich Pavlov said: > >> 2016-06-07 22:45 GMT+03:00 Nicola <nvitacolo...@gmail.com>: >>> >>> The following patterns both match up to column

Re: Using ^ (match start of line) and \% (match column) together

2016-06-08 Thread Nicola
On 2016-06-07 20:47:07 +, Nikolay Aleksandrovich Pavlov said: 2016-06-07 22:45 GMT+03:00 Nicola <nvitacolo...@gmail.com>: The following patterns both match up to column 17 included: /.*\%17v /.*\%17v. If ^ is added, the two are no more equivalent: /^.*\%17v <-- matches up

Re: Using ^ (match start of line) and \% (match column) together

2016-06-07 Thread Nikolay Aleksandrovich Pavlov
2016-06-07 22:45 GMT+03:00 Nicola <nvitacolo...@gmail.com>: > The following patterns both match up to column 17 included: > > /.*\%17v > /.*\%17v. > > If ^ is added, the two are no more equivalent: > > /^.*\%17v <-- matches up to column 16 > /^.*\%17v.

Using ^ (match start of line) and \% (match column) together

2016-06-07 Thread Nicola
The following patterns both match up to column 17 included: /.*\%17v /.*\%17v. If ^ is added, the two are no more equivalent: /^.*\%17v <-- matches up to column 16 /^.*\%17v.<-- matches up to column 17 Is this a bug? Seeing this with Vim 7.4 1-1864. Nicola -- -- You re

Re: Why the \p{Han} can't match Chinese in my Vim?

2016-04-17 Thread Ben Fritz
On Sunday, April 17, 2016 at 9:59:05 PM UTC-5, 李哲 wrote: > https://re2.googlecode.com/hg/doc/syntax.html > > I read the article and find a way to match the Chinese in vim, but it doesn't > work here. What's wrong with it? > > Vim support the perl regex, and I tried the `\

Why the \p{Han} can't match Chinese in my Vim?

2016-04-17 Thread 李哲
https://re2.googlecode.com/hg/doc/syntax.html I read the article and find a way to match the Chinese in vim, but it doesn't work here. What's wrong with it? Vim support the perl regex, and I tried the `\v\p{Han}` consider the `magic`, but it doesn't work either. How can I fix it? Tnx

Re: Expected "syntax disable" to work, to match "syntax enable"

2015-10-15 Thread Matt Ackeret
On Wed, 14 Oct 2015, Gary Johnson wrote: >> So I guess this is an enhancement request for "disable" to work too, since it >> is IMHO the logical thing to try. (Maybe "on" should work for "enable" >> too..) > >There is a ":syntax on" command as well as ":syntax enable", but >they do slightly

Expected "syntax disable" to work, to match "syntax enable"

2015-10-14 Thread Matt Ackeret
Short version: On a shared account (for a buildbot setup), someone has a crazy (imho) .vimrc setup with syntax coloring, etc. I wanted to turn off the coloring and not just move the file out of the way. Since I saw "syntax enable" in the .vimrc, I expect(ed) "syntax disable" to work.. But it

Re: Expected "syntax disable" to work, to match "syntax enable"

2015-10-14 Thread Gary Johnson
On 2015-10-14, Matt Ackeret wrote: > Short version: On a shared account (for a buildbot setup), someone has a crazy > (imho) .vimrc setup with syntax coloring, etc. I wanted to turn off the > coloring > and not just move the file out of the way. > > Since I saw "syntax enable" in the .vimrc, I

match() to get the offsets of all matches of a pattern in a string

2015-07-28 Thread BPJ
I have a string of rows of dashes alternating with spaces, where the number of dashes/spaces is variable - --- --- I want to get a List of the offsets of all the space sequences, kind of a match() with /g (that's the best I can do to describe it...) In the case above

Re: match() to get the offsets of all matches of a pattern in a string

2015-07-28 Thread BPJ
Den 2015-07-28 18:02, BPJ skrev: I have a string of rows of dashes alternating with spaces, where the number of dashes/spaces is variable - --- --- I want to get a List of the offsets of all the space sequences, kind of a match() with /g (that's the best I can do

Re: which match-highlighting is in effect (if any) at a point in a file?

2015-03-30 Thread LCD 47
On 30 March 2015, Nikolay Pavlov zyx@gmail.com wrote: 2015-03-30 7:55 GMT+03:00 LCD 47 lcd...@gmail.com: On 28 March 2015, Charles E Campbell drc...@campbellfamily.biz wrote: Hello! In using :match, :2match, :3match, or matchadd(), one may specify special highlighting. Any easy

Re: which match-highlighting is in effect (if any) at a point in a file?

2015-03-30 Thread Charles E Campbell
LCD 47 wrote: On 28 March 2015, Charles E Campbell drc...@campbellfamily.biz wrote: Hello! In using :match, :2match, :3match, or matchadd(), one may specify special highlighting. Any easy way for a vimscript to know which, if any, highlighting match is active? Such highlighting overrides

Re: which match-highlighting is in effect (if any) at a point in a file?

2015-03-30 Thread Charles E Campbell
Nikolay Pavlov wrote: 2015-03-30 7:55 GMT+03:00 LCD 47 lcd...@gmail.com: On 28 March 2015, Charles E Campbell drc...@campbellfamily.biz wrote: Hello! In using :match, :2match, :3match, or matchadd(), one may specify special highlighting. Any easy way for a vimscript to know which, if any

Re: which match-highlighting is in effect (if any) at a point in a file?

2015-03-29 Thread LCD 47
On 28 March 2015, Charles E Campbell drc...@campbellfamily.biz wrote: Hello! In using :match, :2match, :3match, or matchadd(), one may specify special highlighting. Any easy way for a vimscript to know which, if any, highlighting match is active? Such highlighting overrides the usual

Re: which match-highlighting is in effect (if any) at a point in a file?

2015-03-29 Thread Nikolay Pavlov
2015-03-30 7:55 GMT+03:00 LCD 47 lcd...@gmail.com: On 28 March 2015, Charles E Campbell drc...@campbellfamily.biz wrote: Hello! In using :match, :2match, :3match, or matchadd(), one may specify special highlighting. Any easy way for a vimscript to know which, if any, highlighting match

  1   2   3   4   5   >