Sorting columns in a file

2006-08-03 Thread Eric Leenman
Hi, I have file which contains hexadecimal numbers like below: 04F --- 05F --- 052 --- 188 --- 2D4 --- 173 --- 040 --- 18D 051 --- 040 --- 05F --- 1CA --- 2E8 --- 14F --- 040 --- 1E2 051 --- 040 --- 069 --- 1B9 --- 2D7 --- 15E --- 040 --- 1A6 051 ---

syntax highlighting problem with vim7 for multiline macro in C

2006-08-03 Thread Srinivas Rao. M
Hi, I am facing this syntax highlighting problem here for the following code segment. The problem is if we put this code in a file having .c extension. The same macro color is shown for the main() function also. Does anyone else faced this problem with vim7 ? regards, s

RE: Vim and cscope

2006-08-03 Thread Sibin P. Thomas
Could someone help me here; I tried what Dave suggested but with no success. Regards, Sibin -Original Message- From: Sibin P. Thomas [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 6:25 AM ... I tried integrating Cscope 15.4 with Vim7.0 on WinXP (I have installed cygwin

Re: Sorting columns in a file

2006-08-03 Thread Peter Hodge
Hi Eric, I am assuming you want to re-order the columns horizontally, in which case Visual Block Mode is what you want. Press CTRL+V to start selecting a column, use 'x' to delete it, and 'P' (upper-case P) to paste it (I find upper-case P is more logical for Visual Block paste). HTH, regards,

Re: Sorting columns in a file

2006-08-03 Thread Eric Leenman
Hi Peter [snip] I am assuming you want to re-order the columns horizontally, in which case Sorry for not making my self clear. I want to re-order the columns vertical So column 1 is already OK, running from 04F ... ... 052 Column 2 should be 040 ... 040 045 046 052 05F ect. [snip] I

Chip's block substitution script

2006-08-03 Thread Robert Cussons
Sorry Chip, you are absolutely right, I obviously didn't test it thoroughly enough the last time, just tried it out again and of course it does as you said and reassembles the strings again when you are finished. Very nice little script. Thanks, Rob.

Re: Tab bar

2006-08-03 Thread Yakov Lerner
On 8/3/06, Bart van Kuik [EMAIL PROTECTED] wrote: Can anyone tell me whether I can customize the tab bar in vim 7.0 (vim, not gvim). Colours, etc. :he hl-TabLine :he hl-TabLineFill :he hl-TabLineSel :he 'tabline' Yakov

Re: syntax highlighting problem with vim7 for multiline macro in C

2006-08-03 Thread Yakov Lerner
On 8/3/06, Srinivas Rao. M [EMAIL PROTECTED] wrote: I am facing this syntax highlighting problem here for the following code segment. The problem is if we put this code in a file having .c extension. The same macro color is shown for the main() function also. Does anyone else faced this problem

Re: Can't find terminal library when compiling Vim7.0

2006-08-03 Thread Johnathan
Can someone please tell me what library I'm suppose to point to with --with-tlib. Did you install the ncurses-dev package? I also use Kubuntu 6.06, but didn't use the --with-tlib config option. Cheers Tom. I installed the ncurses-dev package and vim 7 compiled and runs beautifully! :D

Re: syntax highlighting problem with vim7 for multiline macro in C

2006-08-03 Thread Srinivas Rao. M
On Thu, 2006-08-03 at 14:09, Yakov Lerner wrote: On 8/3/06, Srinivas Rao. M [EMAIL PROTECTED] wrote: I am facing this syntax highlighting problem here for the following code segment. The problem is if we put this code in a file having .c extension. The same macro color is shown for the

How to scroll up and down without changing horizontal pos

2006-08-03 Thread Eric Leenman
Hi, I'm using page-up and page-down to scroll. Also ctrl-home and ctrl-end. This moves the cursor to the beginning of the line. How can this be avoided. I need to the cursor to stay where it is, as the lines are 1000+ characters long Rgds, Eric

Re: How to scroll up and down without changing horizontal pos

2006-08-03 Thread Eric Leenman
[snip] nmap silentPageDown :exe norm .winheight(0).jcr nmap silentPageUp :exe norm .winheight(0).kcr nmap silentc-home :let x=col('.')bar1barexe norm .x.barcr nmap silentc-end:let x=col('.')bar$barexe norm .x.barcr [snip] This works great. I'm trying to map them also to visaul-mode

Re: How to scroll up and down without changing horizontal pos

2006-08-03 Thread A.J.Mechelynck
Eric Leenman wrote: [snip] nmap silentPageDown :exe norm .winheight(0).jcr nmap silentPageUp :exe norm .winheight(0).kcr nmap silentc-home :let x=col('.')bar1barexe norm .x.barcr nmap silentc-end:let x=col('.')bar$barexe norm .x.barcr [snip] This works great. I'm trying to map them

Select prev visual block + 5 hor pos more

2006-08-03 Thread Eric Leenman
Hi, With gv you can re-select the previous visual block. Is it possible to give a horizontal shift with it? Like + or - 5? Best Regards, Eric _ On the road to retirement? Check out MSN Life Events for advice on how to get there!

Re: Select prev visual block + 5 hor pos more

2006-08-03 Thread Tim Chase
With gv you can re-select the previous visual block. Is it possible to give a horizontal shift with it? Like + or - 5? Natively? Not as far as I know. However, if you haven't already discovered the o command in block-wise-visual-mode, it does bounce you to the opposite corner of the block.

Re: Select prev visual block + 5 hor pos more

2006-08-03 Thread A.J.Mechelynck
Eric Leenman wrote: Hi, With gv you can re-select the previous visual block. Is it possible to give a horizontal shift with it? Like + or - 5? Best Regards, Eric You can indent or unindent visually selected lines with or . However, IIUC this is a linewise (not blockwise) operation.

vim@vim.org

2006-08-03 Thread Bart van Kuik
Do you know of a way to do that in Windows? It's a bother trying to remember not to press CAPS when I'm using Windows. http://vankuik.nl/cgi/wiki.cgi/download/capslock_becomes_escape.reg

Re: Sorting columns in a file

2006-08-03 Thread Charles E Campbell Jr
Eric Leenman wrote: Hi, I have file which contains hexadecimal numbers like below: 04F --- 05F --- 052 --- 188 --- 2D4 --- 173 --- 040 --- 18D 051 --- 040 --- 05F --- 1CA --- 2E8 --- 14F --- 040 --- 1E2 051 --- 040 --- 069 --- 1B9 --- 2D7 --- 15E ---

Re: How to scroll up and down without changing horizontal pos

2006-08-03 Thread Charles E Campbell Jr
Eric Leenman wrote: I'm using page-up and page-down to scroll. Also ctrl-home and ctrl-end. This moves the cursor to the beginning of the line. How can this be avoided. I need to the cursor to stay where it is, as the lines are 1000+ characters long Hello! Perhaps:set ve=all nosol will

Search and Replace with a Regular Expression

2006-08-03 Thread Marv Boyes
Hello, all. I've been tasked with migrating a large MS Works database into the 21st century. The thing's original setup didn't enforce any sort of standardization in data entry, so there are nearly as many different formats and styles in the data as there have been people entering it. My best bet

Re: My apologies to Chip Campbell

2006-08-03 Thread Charles E Campbell Jr
Tien Pham wrote: I am terribly sorry that I misspelled your name Chip. My apologies No problem! You should see what people do to my last name Chip Campbell

Re: syntax highlighting problem with vim7 for multiline macro in C

2006-08-03 Thread Charles E Campbell Jr
Srinivas Rao. M wrote: I am facing this syntax highlighting problem here for the following code segment. The problem is if we put this code in a file having .c extension. The same macro color is shown for the main() function also. Does anyone else faced this problem with vim7 ? regards, s

Re: Select prev visual block + 5 hor pos more

2006-08-03 Thread Charles E Campbell Jr
Eric Leenman wrote: With gv you can re-select the previous visual block. Is it possible to give a horizontal shift with it? Like + or - 5? Do you mean to move a selected block horizontally, or to have the same visual block selection geometry shift? Regards, Chip Campbell

Re: Select prev visual block + 5 hor pos more

2006-08-03 Thread Ben K.
With gv you can re-select the previous visual block. Is it possible to give a horizontal shift with it? Like + or - 5? Could you cut away the finished block and paste to another place, and do gv again? Not quite reliable, but may work. Regards, Ben K. Developer http://benix.tamu.edu

Re: Search and Replace with a Regular Expression

2006-08-03 Thread Jürgen Krämer
Hi, Marv Boyes wrote: Hello, all. I've been tasked with migrating a large MS Works database into the 21st century. The thing's original setup didn't enforce any sort of standardization in data entry, so there are nearly as many different formats and styles in the data as there have been

Re: Search and Replace with a Regular Expression

2006-08-03 Thread Tim Chase
I can't seem ot get the hang of it for this particular job. Well, even as a regexp wonk, it's a bit of a daunting task you have before you. :) Most of the problem is with dates, in that I have a mishmash of formats. Since you don't mention any other problematic sections, I guess I'll

Re: Search and Replace with a Regular Expression

2006-08-03 Thread martin kraegeloh
part of a good job is to choose the right tool. use perl for this kind of task. use vim to edit the perl script ;-) and search cpan before creating your own solutions! /martin begin:vcard fn:Martin Kraegeloh n:Kraegeloh;Martin adr:;;Am Alten Pfarrhof 24;Oberbergkirchen;;84564;Germany

Re: Search and Replace with a Regular Expression

2006-08-03 Thread A.J.Mechelynck
Tim Chase wrote: [...] I broke it out into multiple lines to hopefully make more sense of it. The first two substitute() lines add a zero on the left of whatever they found, and then take whatever the rightmost two characters of the result are...effectively padding them with zeros on the left

Re: Search and Replace with a Regular Expression

2006-08-03 Thread Charles E Campbell Jr
Marv Boyes wrote: For example, let's say I have some dates that look like this: 7-30-05 12-5-2006 10-2-06 What I'd like to end up with is this... 07/30/2005 12/05/2006 10/02/2006 ...without, of course, having to re-type every single one

Re: Search and Replace with a Regular Expression

2006-08-03 Thread Charles E Campbell Jr
martin kraegeloh wrote: part of a good job is to choose the right tool. use perl for this kind of task. use vim to edit the perl script ;-) and search cpan before creating your own solutions! Two problems with this approach: * Perl's regular expressions don't appear to be much more

Checking if a variable exists in a given tab

2006-08-03 Thread Max Dyckhoff
I'm sure this is an easy one, I just can't find the answer anywhere. I'm writing my own tabline function (based heavily on the one by Tony Mechelynck, thanks!) and I want to be able to name a tab manually. The best way I can think to do this is to have a tab local variable, such as

using vim with GNUscreen

2006-08-03 Thread uber goonz
Hi, I am having problem using vim when i invoke it from GNUscreen. i have the following vimrc set nocompatible set showmatch set ruler set virtualedit=all set number set title set ls=2 set tabstop=4 set shiftwidth=4 syntax on set background=dark it works from from normal terminal. but when

Re: Checking if a variable exists in a given tab

2006-08-03 Thread A.J.Mechelynck
Max Dyckhoff wrote: I'm sure this is an easy one, I just can't find the answer anywhere. I'm writing my own tabline function (based heavily on the one by Tony Mechelynck, thanks!) and I want to be able to name a tab manually. The best way I can think to do this is to have a tab local variable,

Re: using vim with GNUscreen

2006-08-03 Thread A.J.Mechelynck
uber goonz wrote: Hi, I am having problem using vim when i invoke it from GNUscreen. i have the following vimrc set nocompatible set showmatch set ruler set virtualedit=all set number set title set ls=2 set tabstop=4 set shiftwidth=4 syntax on set background=dark it works from from normal

Re: Search and Replace with a Regular Expression

2006-08-03 Thread Tim Chase
right('0'.submatch(1), 2) to zero-pad to 2 places. Alas, the substitute() trick is the easiest way I've found to simulate this. [...] (0 . submatch(1))[-2:] Hmmm...a nifty new feature in vim7 that is here on my work machine, but unavailable on my hosting service (still running

RE: Checking if a variable exists in a given tab

2006-08-03 Thread Max Dyckhoff
If by making the desired tab current you mean using :tabn {count} then it isn't allowed. I imagine changing tabs within the tabline function would be A Bad Thing, and would cause recursion. I hadn't thought about using a global array of names, although it would be a pain to maintain when one

yank append to unnamed register (*quotequote* register)

2006-08-03 Thread Noah Spurrier
Is it possible to Yank Append directly to the unnamed register? That is, without affecting any of the other named registers. I know that the unnamed register also holds the same text as was last yanked to a named register, but I wanted to Yank Append without affecting any of those. Yours, Noah

Re: Search and Replace with a Regular Expression

2006-08-03 Thread A.J.Mechelynck
Tim Chase wrote: right('0'.submatch(1), 2) to zero-pad to 2 places. Alas, the substitute() trick is the easiest way I've found to simulate this. [...] (0 . submatch(1))[-2:] Hmmm...a nifty new feature in vim7 that is here on my work machine, but unavailable on my hosting service

Re: Search and Replace with a Regular Expression

2006-08-03 Thread Tim Chase
(0 . submatch(1))[-2:] Hmmm...a nifty new feature in vim7 that is here on my work machine, but unavailable on my hosting service (still running 6.3). Looks like a much-needed pilfering from Python's handy slicing syntax. :) well, then, strpart(0 . submatch(1), strlen(submatch(1)) -

can vim do this?

2006-08-03 Thread Lev Lvovsky
I recently started work at a company where the predominant text editor happens to be emacs. I've been using vim for a while now, though only recently started getting into the more advanced functionality beyond simple editing (highlighting, folding, tags etc...). Watching one of my

Re: yank append to unnamed register (*quotequote* register)

2006-08-03 Thread Yakov Lerner
On 8/3/06, Noah Spurrier [EMAIL PROTECTED] wrote: Is it possible to Yank Append directly to the unnamed register? That is, without affecting any of the other named registers. I know that the unnamed register also holds the same text as was last yanked to a named register, but I wanted to Yank

Re: can vim do this?

2006-08-03 Thread Diwaker Gupta
* autocomplete - say that I've declared a constant variable in Perl named MY_CONSTANT, later, to have the editor fill it in, I type in MY_, and some other key-stroke, and CONSTANT gets typed in for you Ctrl-N * goto when compiling - when compiling with make for example, and there is a problem

Re: Help with unwanted shell character expansion

2006-08-03 Thread Yakov Lerner
On 8/3/06, Bob Hiestand [EMAIL PROTECTED] wrote: As is too often the case, I didn't read enough documentation. I think this is not a well-known feature. On 7/31/06, Bob Hiestand [EMAIL PROTECTED] wrote: Question two: Is there a way to set the buffer name without the name being subject to

Re: can vim do this?

2006-08-03 Thread Tim Chase
* autocomplete - say that I've declared a constant variable in Perl named MY_CONSTANT, later, to have the editor fill it in, I type in MY_, and some other key-stroke, and CONSTANT gets typed in for you Well, I usually just use ^N and ^P in insert mode to cycle through available completion

Re: can vim do this?

2006-08-03 Thread Bob Hiestand
On 8/3/06, Lev Lvovsky [EMAIL PROTECTED] wrote: I recently started work at a company where the predominant text editor happens to be emacs. I've been using vim for a while now, though only recently started getting into the more advanced functionality beyond simple editing (highlighting,

Re: Search and Replace with a Regular Expression

2006-08-03 Thread Bill McCarthy
On Thu 3-Aug-06 9:49am -0600, Jürgen Krämer wrote: snipped Very nice explanation! Two minor cosmetic improvements are (1) to use Vim's line continuation to break up that very long line and (2) making the regex very magic (your use of comma eliminated 2 escapes, \v eliminates another 13 escapes.

Re: Search and Replace with a Regular Expression

2006-08-03 Thread Ben K.
For example, let's say I have some dates that look like this: 7-30-05 12-5-2006 10-2-06 What I'd like to end up with is this... 07/30/2005 12/05/2006 10/02/2006 Sorry this is a bit off topic: I just wanted to add that ms excel, or

Re: can vim do this?

2006-08-03 Thread Gary Johnson
On 2006-08-03, Tim Chase [EMAIL PROTECTED] wrote: * ctags variable name references - assuming I'm using ctags, how can I replace the name of a variable throughout my code base? Not sure on this one. One can add the files in question to the argument/buffer list and then use :argdo

Re: can vim do this?

2006-08-03 Thread Benji Fisher
On Thu, Aug 03, 2006 at 02:23:39PM -0700, Lev Lvovsky wrote: * regional undo - can I select a region, and perform an undo for all of the changes only in that region? This has been requested before, but it is not implemented and I do not expect that it will be added any time soon. The

What is the information in the leftmost two columns and how do I turn it off?

2006-08-03 Thread M. Edward (Ed) Borasky
I recently updated to vim 7.0 on a Gentoo Linux system. Since then, some, but not all, of my editing sessions start out normally. After a second or two, though, the file is shifted right two columns and numbers appear in the first column and signs in the second column. What does this mean?

Re: once again - how to unsubscribe?

2006-08-03 Thread A.J.Mechelynck
Ulrich Lauther wrote: On Wed, Aug 02, 2006 at 09:47:05AM +0200, Ulrich Lauther wrote: the automated mechanism for unsubsrcibing from this list still doesn't work. Actually it does! I just unsubscribed from my old address, and subscribed using my new email address. Just follow the instructions

Forget the buf_T reference when processing a 'close' netbeans command

2006-08-03 Thread Xavier de Gaye
Bug description: === Vim version 7.0 When receiving a netbeans 'close' command, vim does delete the specified buffer, but the buffer's reference (buf_list[bufno].bufp called here 'this_memory_address') is still kept in buf_list[]. It may happen that this_memory_address is once again