Re: Matching JUST the nth occurence of a text in a line

2006-12-01 Thread mzyzik
All, I am puzzled by a slightly more complicated version: how to match a '%' character following the 2nd occurrence of home? --Matt On Fri, Dec 01, 2006 at 09:09:17AM -0500, Charles E Campbell Jr wrote: Peter Hodge wrote: Try: /^.\{-}home.\{-}\zshome for your reference:

Re: Matching JUST the nth occurence of a text in a line

2006-12-01 Thread mzyzik
On Fri, Dec 01, 2006 at 10:34:14AM -0500, Charles E Campbell Jr wrote: [EMAIL PROTECTED] wrote: I am puzzled by a slightly more complicated version: how to match a '%' character following the 2nd occurrence of home? /^.\{-}\%(home.\{-1,}\)\{N}home.\{-}\zs% This pattern doesn't

anyone know how to execute a selection?

2006-11-25 Thread mzyzik
All, What I want is similar to evaluating a region in emacs. I want to be able to make a selection of vim code, and then execute it. :source only takes files. As for :exe, I have tried this: :exe getreg(''), and found it to be unreliable. Anyone have ideas? --Matt

Re: anyone know how to execute a selection?

2006-11-25 Thread mzyzik
Fantastic. Thanks. --Matt On Sat, Nov 25, 2006 at 02:13:11PM -0600, Bill McCarthy wrote: On Sat 25-Nov-06 1:40pm -0600, [EMAIL PROTECTED] wrote: What I want is similar to evaluating a region in emacs. I want to be able to make a selection of vim code, and then execute it. :source

should space exit completion menu?

2006-11-19 Thread mzyzik
All, Recently I was appreciating the beauty of using pumvisible() to setup all kinds of mappings for the completion menu (ex. enter to do c-y). I noticed when messing around with all of that, that space actually exits the menu. Is this the desired behavior? Sometimes I am doing line completion

completion tip from vim.org

2006-11-18 Thread mzyzik
All, Due to some good feedback I've gotten on this tip, I'm posting it to this list. Here is the link: http://www.vim.org/tips/tip.php?tip_id=1386 The tip shows you how to make the completion popup menu in Vim work exactly like in IDEs. Meaning, you can just launch the menu whenever you want,

Re: buffer list count

2006-11-13 Thread mzyzik
On Tue, Nov 14, 2006 at 02:04:40AM +0100, A.J.Mechelynck wrote: Eggum, DavidX S wrote: Matt, You can speed up the calculations considerably if you keep several things in mind: - buffer numbers are never reused. - built-in vim functions are written in C and are very fast - although you can

buffer list count

2006-11-12 Thread mzyzik
All, I am trying to keep track of the number of buffers in the buffer list. I'm doing this with the following code: autocmd BufAdd * let g:zbuflistcount += 1 autocmd BufDelete * let g:zbuflistcount -= 1 The problem is I found this to be very unreliable in some circumstances, and

Re: buffer list count

2006-11-12 Thread mzyzik
On Sun, Nov 12, 2006 at 07:14:49PM -0600, Bill McCarthy wrote: On Sun 12-Nov-06 6:17pm -0600, [EMAIL PROTECTED] wrote: I am trying to keep track of the number of buffers in the buffer list. I'm doing this with the following code: autocmd BufAdd * let g:zbuflistcount += 1

how can these two act differently?

2006-11-08 Thread mzyzik
All, I decided to make a mapping that simply hits down whenever the popup menu comes up. This is to make the popup behavior work more like in IDEs, where the user can just select the nearest completion item at any moment by hitting enter (c-y does this in Vim). Here are two mappings I tried to

Re: Flickering of completion menu

2006-11-07 Thread mzyzik
I would also love a flicker-less popup menu. I use the completion excessively, since I've found it makes coding faster and less error prone. I noticed the menu only flickers in some cases. --Matt On Wed, Nov 08, 2006 at 10:10:09AM +1100, Peter Hodge wrote: Hello, I agree, it would be great

avoiding unneeded buffer scrolling

2006-11-05 Thread mzyzik
All, It bothers me how when switching between tabs (gt) or switching between buffers (:bn, :bp), sometimes a buffer will end up being shifted/scrolled up/down within its window. For the occasions that I want to shift the buffer I have keys like zz to do this manually. I don't want this to happen

Re: getchar() trick with recursive expr map

2006-10-20 Thread mzyzik
Great. Yeah it always bothered me that there's no way to monitor every keypress unless you map every key, which is quite ugly. --Matt On Thu, Oct 19, 2006 at 11:26:53PM -0700, Hari Krishna Dara wrote: I remember someone posting a patch to add a new event called GetChar to receive an event

Re: Searching for selected text

2006-09-30 Thread mzyzik
I don't like this one more, but it's a good alternative: g/ g? Also, I feel that one day might do something in visual; at least visual line mode. --Matt On Sat, Sep 30, 2006 at 01:37:59PM +0200, Bram Moolenaar wrote: Sometimes people ask me for a command to search for the

Re: Vim BOF session

2006-09-03 Thread mzyzik
On Sun, Sep 03, 2006 at 01:21:06PM +0200, Mikolaj Machowski wrote: Dnia sobota, 2 wrze?nia 2006 12:36, Kim Schulz napisa?: Omnicompletion++: --- Omnicompletion is a great new feature, but I would like to see it become even stronger. The intellisense plugin for gvim on

Re: tab split scrolling problem

2006-06-25 Thread mzyzik
All, Can someone please try this out and confirm: On Tue, Jun 20, 2006 at 09:18:40PM -0400, [EMAIL PROTECTED] wrote: All, I mentioned this problem once on the list before; however, the issue wasn't reproducible. Now I found a way to consistently reproduce it. 1. Open a new plain vim in a

Re: tab split scrolling problem

2006-06-25 Thread mzyzik
All, Can someone please try this out and confirm: On Tue, Jun 20, 2006 at 09:18:40PM -0400, [EMAIL PROTECTED] wrote: All, I mentioned this problem once on the list before; however, the issue wasn't reproducible. Now I found a way to consistently reproduce it. 1. Open a new plain vim in a

tab split scrolling problem

2006-06-20 Thread mzyzik
All, I mentioned this problem once on the list before; however, the issue wasn't reproducible. Now I found a way to consistently reproduce it. 1. Open a new plain vim in a terminal. 2. :h to open a help window. 3. :wincmd o to close all other windows except the help window. 4. G to go to the

Re: completion question

2006-06-18 Thread mzyzik
All, I'm curious to know peoples' opinions on this matter, especially Bram, since he's back. The issue is about whether the completion popup menu should disappear when the user hits backspace all the way back to the initial pre-completed state. Right now, the popup window disappears. --Matt On

commandline window

2006-06-01 Thread mzyzik
All, Is there an elegant way of checking if the current window is a command line window other than seeing if the buffer name is command-line ? --Matt

Re: VIM script replacement question

2006-05-25 Thread mzyzik
Nikos, The one line :%s way that was posted before is the truly elegant way of solving this problem. However, I found that macros are especially appropriate in this case. I was able to execute the whole task in 15 seconds by recording a macro for the first line, and then playing it back 26 times.

Re: [vim7] a strange behavior of completeopt

2006-05-16 Thread mzyzik
On Tue, May 16, 2006 at 08:57:57AM -0400, Benji Fisher wrote: On Tue, May 16, 2006 at 04:06:27PM +0800, Linsong wrote: Hi, all I encounter a strange problem when use vim7, the following steps will reproduce the problem: 1. run vim with command: vim -u NONE -U NONE 2. set the

Re: Vertical splits

2006-05-15 Thread mzyzik
You can always do a :vertical before the command, and whenever there is a split inside the command, the split will be vertical. --Matt On Mon, May 15, 2006 at 05:27:29AM -0700, Salman Khilji wrote: Regarding my previous post, I would like to change teh default behavior of VIM to prefer

Re: Is there a way to move tabs around via the mouse?

2006-05-14 Thread mzyzik
On Sun, May 14, 2006 at 03:28:23PM -0600, Eric Arnold wrote: I've uploaded the patch. It's at proof-of-concept stage. Eric, I noticed you've made a few patches. I especially like the one where you introduced the GetChar event. This is a fantastic idea because the getchar() function itself is

Re: :bd should NOT close the Window

2006-05-12 Thread mzyzik
You can try my short script which does exactly what you want: http://www.vim.org/tips/tip.php?tip_id=1078 --Matt On Fri, May 12, 2006 at 08:38:24PM +0300, Yakov Lerner wrote: On 5/12/06, Salman Khilji [EMAIL PROTECTED] wrote: When you have a window split, issuing a :bd command closes the

Re: [Maybe Off Topic]: To Bram: About your paid job

2006-05-10 Thread mzyzik
Working for Google is indeed a great honor, and they probably gave you an 'offer you cannot refuse'. I hope you can spend some of the time you work at Google to develop Vim, I know they let their workers do so (this is something you know better than I am). Any way, if you do want to

Re: cursor shape in terminal vim

2006-05-05 Thread mzyzik
I use urxvt (rxvt-unicode). It supports cursor shape and blinking. --Matt On Fri, May 05, 2006 at 11:27:52PM +0200, Bram Moolenaar wrote: William O'Higgins Witteman wrote: How do I set vim in the terminal to use the pipe character for the cursor when in insert mode? This seems to be

Re: completeopt: menu|menuone + longest = bug?

2006-05-01 Thread mzyzik
On Tue, May 02, 2006 at 12:13:37AM +0200, Bram Moolenaar wrote: Eric Van Dewoestine wrote: I know about this: When you type the . and there no complete match was inserted (showing the longest common text in this example), Vim assumes you are extending the text to reduce the list of

Re: probably known bug

2006-04-28 Thread mzyzik
On Fri, Apr 28, 2006 at 04:08:32PM +0200, Nikolai Weibull wrote: On 4/28/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I found a bug related to syntax highlighting, although I wouldn't be surprised if people already know about this. Simply, the syntax highlighting sometimes gets messed up and

Re: swapping tab and escape

2006-04-27 Thread mzyzik
Yes... I, Matt, who recommended the tab mappings, do no advise mapping tab this way for command line because of the lack of completion. However, you can do a ctrl-d for a kind of completion. --Matt On Thu, Apr 27, 2006 at 01:58:53AM -0700, Gerald Lai wrote: On Thu, 27 Apr 2006, Robert Cussons

gm command

2006-04-21 Thread mzyzik
All, I use gm, H, M, L commands often. I noticed that gm aims at half the screenwidth, rather than half the line width. I realized that if it aimed at half the line width, it would be more useful. Could it be considered to change the behavior of gm. Is there any good reason why it functions the

Re: swapping caps lock and escape

2006-04-10 Thread mzyzik
On Mon, Apr 10, 2006 at 11:54:50AM +0200, Robert Cussons wrote: Thanks for the suggestions, at the moment I think, I like Gerhard's the most. I have created the file, and I'll just have to see tomorrow morning as I don't want to close everything and lock out and in again just now. Thanks