Re: Trouble building Huge Vim8 on CentOS 7
Mun wrote: I tried to find a yum package that provides SMlib.h, but my system said: "No matches found". Sigh. I found I had to create my own reverse index of packages in my distro to find files. basically a: "rpm -qpl path-to-pkg/pkg.rpm > path-to-rpmlist/pkg.rpm.lst" for each rpm in my distro (so each rpm file list ends up in a different file). It's the only way to find a file that I've found. It's 550Meg of just rpm-file lists. That said, how to find files in your distro, isn't really a 'vim question', but a question for people who know how to find things in your distro. Dunno if it is helpful, but in suse13.2, it's in libSM-devel. -- -- 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 vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Can I include /range/ in substitute pattern?
Lol serious??? Donkey Kong is my all time fave!! Cheers, JakyKong. On 21 Mar 2017 14:14, "jakyk...@theanythingbox.com" < jakyk...@theanythingbox.com> wrote: On Tuesday, March 21, 2017 at 5:44:56 AM UTC-7, Pablo Contreras wrote: > Hi Jakykong, > > love the name :) > > (I was a big Kong fan in my time) Oddly enough, I think in nearly 15 years of using this moniker, you're the first to notice that connection! :) > > I think I wasn't explaining myself clearly. > > Also I was a bit confused. > > What I was trying to do was this: (AutoIt3 BASIC) > > = > Dim $K_MAINGUIWIDTH > > $K_MAINGUIWIDTH = 320 > > .. > > GUICreate( "hello world!", 200, 100 > = > say I'm interested in that string $K_MAINGUIWIDTH right at the top there > > it's a GUI in AutoIt3 > > I was looking change the GUICreate to use $K_MAINGUIWIDTH instead of a set 200 > > I got confused because /RANGE/ and s// are different. The > /RANGE/s//NEW TEXT/ is a special case where Vim lets you use the > previously used pattern as the search pattern in the s// > > In fact my replacement can be achieved in s// exclusively > > you do: > 1s/\(\_.\{-}\)\($K_MAINGUIWIDTH\)\(\_.\{-}\)200/\1\2\3\2/ > > ask Vim to go skip through the entire fie >\_.\{-} > until it matches $K_MAINGUIWIDTH > then keep going >\_.\{-}+ > until you match 200 > > then your substitute string you just put those things back > \1\2\3 > then add your desired string > \2 > > Works for me! > > Cheers, Pablo. > > > > On 3/21/17, jakyk...@theanythingbox.comwrote: > > On Tuesday, March 14, 2017 at 10:28:23 AM UTC-7, Pablo Contreras wrote: > > > >> > >> my previous trick: > >> > >> :/kites/s//.. / > >> > >> doesn't work here because I'm trying to match both 'kites' and 'and > >> bikes' > >> > >> Is this too ambitious? > >> > >> Thanks in advance! Pablo. > > > > If you had searched /kites/ first, I'd suggest / to paste the search > > register, but clearly that isn't what you're after. If you do it that way, > > > > /kites > > :s/\(/\)\(.*\)\(bikes\)/\3\2\1/ > > > > would shorthand typing kites (Just in case I'm not being clear about the key > > sequence here, / means ctrl+r then '/', and these are two commands, one > > to search and one to substitute) > > > > That works for your example on my machine. > > > > > > -- > > -- > > 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 a topic in the > > Google Groups "vim_use" group. > > To unsubscribe from this topic, visit > > https://groups.google.com/d/topic/vim_use/wKhhteq8SKI/unsubscribe. > > To unsubscribe from this group and all its topics, send an email to > > vim_use+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. > > I think you can simplify this further. First, 1s is unnecessary, s on its own defaults to replacing only the first occurrence of a pattern (you need the /g flag to change that behavior) and like most commands operates on the current line only by default (you need a range larger than 1 to change that behavior). The movements you're doing may also be a bit overkill, depending on the situation precisely; if you simply match on GUICreate instead of the 200 it will probably narrow the results to one of a few calls (since GUICreate isn't something I would expect to be called massively often) - then just use the /gc flag to confirm which ones need substitution over the whole file (or most of it). Finally, \zs can simplify your substitution. It lets you define where the match actually starts *after* some other matching. So, Give this a go: %s/^GUICreate.*, \zs200/$K_MAINGUIWIDTH/gc Just hit 'y' or 'n' a few times as relevant. Hope it helps! -- -- 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 a topic in the Google Groups "vim_use" group. To unsubscribe from this topic, visit https://groups.google.com/d/ topic/vim_use/wKhhteq8SKI/unsubscribe. To unsubscribe from this group and all its topics, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- -- 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 vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Matchit plugin modifying virtualedit
David Fishburn wrote: > > ... > > > I triggered it by simply hitting % on a { in a Java file. > > > > It's very possible that it's set somewhere else. The problem is that > > the matchit plugin always sets it empty, also when it already was empty. > > > > let restore_options = " ve=" . . restore_options > > set ve= > > > > This should be change to: > > > > if != '' > > let restore_options = " ve=" . . restore_options > > set ve= > > endif > > > > Should also happen for 'ignorecase'. > > > > > I tested the "if !=" change and that does appear to solve my issue. It also didn't change where it's set from? Then it must have had a value when the plugin was loaded. -- hundred-and-one symptoms of being an internet addict: 177. You log off of your system because it's time to go to work. /// Bram Moolenaar -- b...@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/// -- -- 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 vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Can I include /range/ in substitute pattern?
On Tuesday, March 21, 2017 at 5:44:56 AM UTC-7, Pablo Contreras wrote: > Hi Jakykong, > > love the name :) > > (I was a big Kong fan in my time) Oddly enough, I think in nearly 15 years of using this moniker, you're the first to notice that connection! :) > > I think I wasn't explaining myself clearly. > > Also I was a bit confused. > > What I was trying to do was this: (AutoIt3 BASIC) > > = > Dim $K_MAINGUIWIDTH > > $K_MAINGUIWIDTH = 320 > > .. > > GUICreate( "hello world!", 200, 100 > = > say I'm interested in that string $K_MAINGUIWIDTH right at the top there > > it's a GUI in AutoIt3 > > I was looking change the GUICreate to use $K_MAINGUIWIDTH instead of a set 200 > > I got confused because /RANGE/ and s// are different. The > /RANGE/s//NEW TEXT/ is a special case where Vim lets you use the > previously used pattern as the search pattern in the s// > > In fact my replacement can be achieved in s// exclusively > > you do: > 1s/\(\_.\{-}\)\($K_MAINGUIWIDTH\)\(\_.\{-}\)200/\1\2\3\2/ > > ask Vim to go skip through the entire fie >\_.\{-} > until it matches $K_MAINGUIWIDTH > then keep going >\_.\{-}+ > until you match 200 > > then your substitute string you just put those things back > \1\2\3 > then add your desired string > \2 > > Works for me! > > Cheers, Pablo. > > > > On 3/21/17, jakyk...@theanythingbox.comwrote: > > On Tuesday, March 14, 2017 at 10:28:23 AM UTC-7, Pablo Contreras wrote: > > > >> > >> my previous trick: > >> > >> :/kites/s//.. / > >> > >> doesn't work here because I'm trying to match both 'kites' and 'and > >> bikes' > >> > >> Is this too ambitious? > >> > >> Thanks in advance! Pablo. > > > > If you had searched /kites/ first, I'd suggest / to paste the search > > register, but clearly that isn't what you're after. If you do it that way, > > > > /kites > > :s/\(/\)\(.*\)\(bikes\)/\3\2\1/ > > > > would shorthand typing kites (Just in case I'm not being clear about the key > > sequence here, / means ctrl+r then '/', and these are two commands, one > > to search and one to substitute) > > > > That works for your example on my machine. > > > > > > -- > > -- > > 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 a topic in the > > Google Groups "vim_use" group. > > To unsubscribe from this topic, visit > > https://groups.google.com/d/topic/vim_use/wKhhteq8SKI/unsubscribe. > > To unsubscribe from this group and all its topics, send an email to > > vim_use+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. > > I think you can simplify this further. First, 1s is unnecessary, s on its own defaults to replacing only the first occurrence of a pattern (you need the /g flag to change that behavior) and like most commands operates on the current line only by default (you need a range larger than 1 to change that behavior). The movements you're doing may also be a bit overkill, depending on the situation precisely; if you simply match on GUICreate instead of the 200 it will probably narrow the results to one of a few calls (since GUICreate isn't something I would expect to be called massively often) - then just use the /gc flag to confirm which ones need substitution over the whole file (or most of it). Finally, \zs can simplify your substitution. It lets you define where the match actually starts *after* some other matching. So, Give this a go: %s/^GUICreate.*, \zs200/$K_MAINGUIWIDTH/gc Just hit 'y' or 'n' a few times as relevant. Hope it helps! -- -- 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 vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Matchit plugin modifying virtualedit
> > ... > > I triggered it by simply hitting % on a { in a Java file. > > It's very possible that it's set somewhere else. The problem is that > the matchit plugin always sets it empty, also when it already was empty. > > let restore_options = " ve=" . . restore_options > set ve= > > This should be change to: > > if != '' > let restore_options = " ve=" . . restore_options > set ve= > endif > > Should also happen for 'ignorecase'. > > I tested the "if !=" change and that does appear to solve my issue. Thanks, David -- -- 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 vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Can I include /range/ in substitute pattern?
Hi Jakykong, love the name :) (I was a big Kong fan in my time) I think I wasn't explaining myself clearly. Also I was a bit confused. What I was trying to do was this: (AutoIt3 BASIC) = Dim $K_MAINGUIWIDTH $K_MAINGUIWIDTH = 320 .. GUICreate( "hello world!", 200, 100 = say I'm interested in that string $K_MAINGUIWIDTH right at the top there it's a GUI in AutoIt3 I was looking change the GUICreate to use $K_MAINGUIWIDTH instead of a set 200 I got confused because /RANGE/ and s// are different. The /RANGE/s//NEW TEXT/ is a special case where Vim lets you use the previously used pattern as the search pattern in the s// In fact my replacement can be achieved in s// exclusively you do: 1s/\(\_.\{-}\)\($K_MAINGUIWIDTH\)\(\_.\{-}\)200/\1\2\3\2/ ask Vim to go skip through the entire fie \_.\{-} until it matches $K_MAINGUIWIDTH then keep going \_.\{-} until you match 200 then your substitute string you just put those things back \1\2\3 then add your desired string \2 Works for me! Cheers, Pablo. On 3/21/17, jakyk...@theanythingbox.comwrote: > On Tuesday, March 14, 2017 at 10:28:23 AM UTC-7, Pablo Contreras wrote: > >> >> my previous trick: >> >> :/kites/s//.. / >> >> doesn't work here because I'm trying to match both 'kites' and 'and >> bikes' >> >> Is this too ambitious? >> >> Thanks in advance! Pablo. > > If you had searched /kites/ first, I'd suggest / to paste the search > register, but clearly that isn't what you're after. If you do it that way, > > /kites > :s/\(/\)\(.*\)\(bikes\)/\3\2\1/ > > would shorthand typing kites (Just in case I'm not being clear about the key > sequence here, / means ctrl+r then '/', and these are two commands, one > to search and one to substitute) > > That works for your example on my machine. > > > -- > -- > 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 a topic in the > Google Groups "vim_use" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/vim_use/wKhhteq8SKI/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- 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 vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.