Re: alt keys in bash

2006-06-25 Thread Gerald Lai
On Tue, 20 Jun 2006, Vincent Wang wrote: Gerald Lai wrote: On Mon, 19 Jun 2006, Mike wrote: I am switching from windows to linux for my development environment, and working on 'porting' my .vimrc file. I have tons of Alt key remappings, but I am having trouble getting them working in plain

Re: Using tags to quick complete funtion names

2006-06-25 Thread Gerald Lai
On Sat, 24 Jun 2006, Hari Krishna Dara wrote: [snip] I did try this to store the complete func and restore it after c-xc-u fun DoCompleteRegex() let cf = completefunc set completefunc=CompleteWithSimpleRegex normal c-xc-u set completefunc=cf

RE: Script to create automatic case statements

2006-06-23 Thread Gerald Lai
On Fri, 23 Jun 2006, Max Dyckhoff wrote: If there are many values for the enum then I will generally jump to the tag and do as you do; copy the values and do an :s on them. What I was wondering though was basically can I make vim insert every entry from the ^N popup menu?, which is listing all

Re: No-echo for shell command from vim.

2006-06-22 Thread Gerald Lai
On Thu, 22 Jun 2006, Ajay Gupta wrote: (Re-sending because it didnt appear the first time) Hello all. I have included the following function in my .vimrc: function! CScope_Refresh() set nocsverb cs kill 0 Following find searches for .c and .h files

Re: after :vert sba hide all windows again except the active on

2006-06-22 Thread Gerald Lai
On Thu, 22 Jun 2006, Johannes Schwarz wrote: J?rgen Kr?mer [EMAIL PROTECTED] 22.06.2006 10:22 Hi, Johannes Schwarz wrote: I just realized the :sba or even better the :vert sba command. Is it possible to hide all windows again except the active one, which the cursor is in?

Re: Differences in the gf command between Windows and Linux

2006-06-21 Thread Gerald Lai
On Wed, 21 Jun 2006, A.J.Mechelynck wrote: Tom Purl wrote: I've become a very big fan of using the pyGTD http://96db.com/pyGTD/ script from within Vim 7. pyGTD creates file output that looks similar to this: 3.61 1:00 Get your hair cut C=0 P=4 CRC=33B0 I=4 U=4 T=1H [EMAIL

Re: Backspace and Delete working same way. delete after cursor

2006-06-19 Thread Gerald Lai
On Mon, 19 Jun 2006, Sushmit Khanna wrote: Hi, I was initially having some problems with backspace key, specially in insert mode. In insert mode I was getting the ^? signs when backspace is pressed. This got fixed by :fixdel Now the issue is that the backspace is not deleting chars *before*

filename completion ignorecase for Vim 7

2006-06-17 Thread Gerald Lai
Hi all, For Vim 7, it seems that filename completion in the :cmdline ignores case when searching for matches. For example, :e FTab matches both foo.txt Foo.txt This is different from Vim 6 where it only matches Foo.txt Is there any way to revert back to the old behavior? -- Gerald

Re: filename completion ignorecase for Vim 7

2006-06-17 Thread Gerald Lai
On Sat, 17 Jun 2006, Bram Moolenaar wrote: Gerald Lai wrote: For Vim 7, it seems that filename completion in the :cmdline ignores case when searching for matches. For example, :e FTab matches both foo.txt Foo.txt This is different from Vim 6 where it only matches Foo.txt

Re: filename completion ignorecase for Vim 7

2006-06-17 Thread Gerald Lai
On Sat, 17 Jun 2006, A.J.Mechelynck wrote: Gerald Lai wrote: On Sat, 17 Jun 2006, Bram Moolenaar wrote: Gerald Lai wrote: For Vim 7, it seems that filename completion in the :cmdline ignores case when searching for matches. For example, :e FTab matches both foo.txt Foo.txt

Re: synchronize current working directory - problem with vim7

2006-06-17 Thread Gerald Lai
On Sat, 17 Jun 2006, K.S.Sreeram wrote: [EMAIL PROTECTED] wrote: :he netrw-problems In particular, look at P6. Thanks for the pointer, but unfortunately doing let g:netrw_keepdir = 0 in _vimrc file does not seem to have any effect at all! Here's what happens: 1) run gvim.exe 2) :pwd

Re: Makefile indentation with spaces for line continuation

2006-06-16 Thread Gerald Lai
On Fri, 16 Jun 2006, John Orr wrote: [snip] Another alternative might be to enable expandtab (to get the spaces) and enter the tab characters explicitly - is there any easy way of inserting a tab character when expandtab is enabled? Yes. In Insert mode, you could either (a) hit Ctrl-v

Re: ***SPAM*** Problem with regexp in macro

2006-06-15 Thread Gerald Lai
On Thu, 15 Jun 2006, Sylvain wrote: [snip] I'm using setline() function to replace the line..so I will delete it before I add mine, it's not very elegant so if anyone has a better way, I will take it also :-) [snip] I modified Vimtip#329 some time ago to be able to swap visual highlighted

Re: Working with windows line endings

2006-06-14 Thread Gerald Lai
On Wed, 14 Jun 2006, Tim Chase wrote: I have set fileformats=unix,dos at the bottom of my _vimrc, but still see the ^M's. My guess is that the file in question has one line that lacks a ^M in the line, and thus, it vim concludes that it must use unix-style line-endings. The likely culprit

Re: Problem with example in :help complete()

2006-06-12 Thread Gerald Lai
On Mon, 12 Jun 2006, A.J.Mechelynck wrote: Gerald Lai wrote: On Sun, 11 Jun 2006, A.J.Mechelynck wrote: Gerald Lai wrote: Hi all, [On Windows Vim 7.0, binary at ftp://ftp.vim.org/pub/vim/pc/gvim70.exe] I'm having trouble getting the example in :help complete() to work. When I hit F5

Re: negative match pattern, again

2006-06-12 Thread Gerald Lai
On Mon, 12 Jun 2006, Yakov Lerner wrote: On 6/12/06, Gerald Lai [EMAIL PROTECTED] wrote: On Mon, 12 Jun 2006, Gerald Lai wrote: On Mon, 12 Jun 2006, Yakov Lerner wrote: On 6/12/06, Tim Chase [EMAIL PROTECTED] wrote: I need to match lines using g// (not v//); those lines having 'foo

Re: negative match pattern, again

2006-06-12 Thread Gerald Lai
On Mon, 12 Jun 2006, Charles E Campbell Jr wrote: Gerald Lai wrote: On Mon, 12 Jun 2006, Gerald Lai wrote: On Mon, 12 Jun 2006, Yakov Lerner wrote: On 6/12/06, Tim Chase [EMAIL PROTECTED] wrote: I need to match lines using g// (not v//); those lines having 'foo' and NOT having /)\s

Problem with example in :help complete()

2006-06-11 Thread Gerald Lai
Hi all, [On Windows Vim 7.0, binary at ftp://ftp.vim.org/pub/vim/pc/gvim70.exe] I'm having trouble getting the example in :help complete() to work. When I hit F5 in Insert mode, I get this: Error detected while processing function ListMonths: line1: E523: Not allowed here I have

RE: Tab complete filenames

2006-06-08 Thread Gerald Lai
couldn't test the mapping, as I was on my Linux box with Vim 6.3, so I just fired away. I'm glad that it worked out :) -- Gerald -Original Message- From: Hari Krishna Dara [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 11:16 AM To: Max Dyckhoff Cc: Gerald Lai; vim org Subject

Re: Changing a long list of entries with corresponding index

2006-06-06 Thread Gerald Lai
On Tue, 6 Jun 2006, Gary Johnson wrote: On 2006-06-06, Salman Mohsin [EMAIL PROTECTED] wrote: Hi, I have a long list of city names (more than 2,000 of them) in a file, each name on a separate line. I'd like to modify each line so that: ABERFOYLE . . ZURICH Becomes: cities[0] = ABERFOYLE .

Re: Changing a long list of entries with corresponding index

2006-06-06 Thread Gerald Lai
On Tue, 6 Jun 2006, Charles E Campbell Jr wrote: Salman Mohsin wrote: I have a long list of city names (more than 2,000 of them) in a file, each name on a separate line. I'd like to modify each line so that: ABERFOYLE . . ZURICH Becomes: cities[0] = ABERFOYLE . . cities[2039] = ZURICH Is

Re: Alt key mapping trouble under windows XP

2006-06-04 Thread Gerald Lai
On Sun, 4 Jun 2006, Eyal Raab wrote: Hi, I'm using VIM 7.0 under windows XP. [snip] What I'm trying to do is to keep using the h,j,k,l in insert mode by mapping the alt-key to them. Something like: :map M-j escji [snip] :map does not include Insert mode mapping. See :help map-modes. This

Re: How to use map to exchange g and G keys?

2006-06-03 Thread Gerald Lai
On Fri, 2 Jun 2006, Steven Starr wrote: On Fri, 2 Jun 2006, Steven Starr wrote: I have been using vim since version 4, and never had this problem before. I have always (in VI before vim and thereafter) used the following to exchange the use of the g and G keys in my .vimrc file.

Re: How to use map to exchange g and G keys?

2006-06-02 Thread Gerald Lai
On Fri, 2 Jun 2006, Steven Starr wrote: I have been using vim since version 4, and never had this problem before. I have always (in VI before vim and thereafter) used the following to exchange the use of the g and G keys in my .vimrc file. :noremap g G :noremap G g Now that

Re: problem (expanded): undo/redo messages often immediately hidden

2006-06-02 Thread Gerald Lai
On Sat, 3 Jun 2006, A.J.Mechelynck wrote: Eric Arnold wrote: Have you tried resizing your command line: :set cmdheight=10 I have, and I still see the problem. Have you tried reproducing it? I could, with no problem. I can't test this because my home computer with Vim 7 is down. What

Re: How to use map to exchange g and G keys?

2006-06-02 Thread Gerald Lai
On Fri, 2 Jun 2006, Steven Starr wrote: On Fri, 2 Jun 2006, Steven Starr wrote: I have been using vim since version 4, and never had this problem before. I have always (in VI before vim and thereafter) used the following to exchange the use of the g and G keys in my .vimrc file.

Re: Java indenting

2006-06-02 Thread Gerald Lai
On Fri, 2 Jun 2006, Jeff Lanzarotta wrote: Hello, I have a Java indenting questions. When editing C code if I have something like: void function(int x, int y int z) The second line of the declaration indents automatically, right under the first parameter, after pressing enter

Re: Reassigning F keys in eVim

2006-06-01 Thread Gerald Lai
On Thu, 1 Jun 2006, John R. Culleton wrote: [snip] functions, e.g., F3 activates an external program. The equivalent map command would be imap F3 Ctrl-O:!pdftex book.texCra [snip] When I try to import such a string it just gets added to the file as text. [snip] Change Ctrl-O to C-O:

Re: vimrun fails

2006-05-28 Thread Gerald Lai
On Sun, 28 May 2006, Juan Lanus wrote: Hi, I'm researching a problem that all ! commands fail, since many versions ago (6.4 more or less), in one of my W2K PCs. Now it has vim70. Also, the EXE installer cannot set the Edit with vim option. Both problens started together. Can't solve it, and

Re: Per document dictionay modifications?

2006-05-28 Thread Gerald Lai
On Sun, 28 May 2006, Geoffrey Alan Washburn wrote: Gerald Lai wrote: Since 'spellfile' cannot be set from a modeline for security reasons, you can try placing something like this in your vimrc: autocmd BufWinEnter * \ if expand(%:t) == myfile1.txt | \ set spellfile=myspell1.latin1

Re: Jumping to Headline in h1Headline/h1

2006-05-26 Thread Gerald Lai
On Fri, 26 May 2006, Tim Chase wrote: [snip] I've also had times where, while I regularly use the fH varient of matters to go forward to the first character in the tag, sometimes I get stung, as in [c] lilook here!/li (with the cursor on [c]). Using fl (eff ell) in attempt to jump to the

Re: Can not run any command with ! in W2K

2006-05-26 Thread Gerald Lai
On Fri, 26 May 2006, Juan Lanus wrote: [snip] The problem is that any ! command returns, for example !!dir returns (after a couple seconds): E485: Can't read file x.tmp If I do :!dir a console opens and says: C:\WINNT\system32\CMD.EXE /c dir shell returned -1 Hit any key to close

Re: Can not run any command with ! in W2K

2006-05-26 Thread Gerald Lai
On Fri, 26 May 2006, Juan Lanus wrote: On 5/26/06, Gerald Lai [EMAIL PROTECTED] wrote: My first assessment would be to check if C:\WINNT\system32\CMD.EXE does exist. Does it? Yes it does. I'm not at that PC now, but I assume it's there because I can open DOS windows with the usual shortcut

Re: viminfo feature not working after upgrade from vim6.2-vim7.0

2006-05-24 Thread Gerald Lai
On Wed, 24 May 2006, Srinivas Rao. M wrote: Thanks Tony, It works after adding those 4 lines into my ~/.vimrc. But i never used to do this in my older version of vim6.3. How come it used to work then ? It may be a possibility but check your system-wide .vimrc at /etc/vimrc for when you

Re: How to get cygwin command line to know where it is

2006-05-23 Thread Gerald Lai
On Wed, 24 May 2006, A.J.Mechelynck wrote: Eric Arnold wrote: Off hand, I can't remember the exact name, but I think that there is a special rc filename that is executed even when it isn't a login shell. [...] Yes, I think so too, and I don't remember it offhand either, but man bash

Omnitags [WAS: missing system functions in .vim/systags]

2006-05-23 Thread Gerald Lai
On Sun, 21 May 2006, Yakov Lerner wrote: I created systags per ':help ft-c-omni' suggestion: ctags -R -f ~/.vim/systags /usr/include /usr/local/include and added systags to tags (set tags+=~/.vim/systags). Now I find that system() does not appear in ~/.vim/systags generated as above. This is

Help doc grammar mistakes

2006-05-21 Thread Gerald Lai
I noticed a grammar mistake at :help xfree-xterm scroll down 57 lines Original: ... but not everybody is it using yet.] Should be: ... but not everybody is using it yet.] Also at :help hpterm-color scroll down 1 line Original: ... for a hpterm ... Should be: ... for an

Re: cmapping woes

2006-05-21 Thread Gerald Lai
On Sun, 21 May 2006, Eric Arnold wrote: I've been trying to map cd if it's the first two characters on the :ex line. I've tried all the combinations I can think of. On several of them, I seem to be getting errors as if expr is run in the sandbox (that dog won't hunt). The only one that

Re: How to insert increasing numbers in each line of a file

2006-05-20 Thread Gerald Lai
On Sat, 20 May 2006, Tim Chase wrote: I don't really know how to do this but im sure that there's a solution. I have some file and i need to insert a number before each line and a separator. The number is the line number. Is there any way in vim to do this easily? Well, the canonical way to

Re: right-to-left text selection

2006-05-20 Thread Gerald Lai
On Sat, 20 May 2006, Jared wrote: On 5/18/2006 1:52 AM, Gerald Lai wrote: On Tue, 16 May 2006, Gerald Lai wrote: I just thought of another more pleasing workaround, if you're interested. Try: nnoremap 2-LeftMouse viwo vnoremap 2-LeftDrag LeftDrag This way, if you wish to select the last

Re: Oddities bugs

2006-05-19 Thread Gerald Lai
On Thu, 18 May 2006, Yegappan Lakshmanan wrote: Hi Gerald, On 5/18/06, Gerald Lai [EMAIL PROTECTED] wrote: Hello all :) Just rehashing the recent threads that suggested some odd behavior with Vim 7. I haven't heard much about them on vim@vim.org, perhaps they've been fixed already. Anyway

RE: Mappings fail in gvim...

2006-05-19 Thread Gerald Lai
On Fri, 19 May 2006, Malhotra, Vijendra wrote: -Original Message- From: Gerald Lai [mailto:[EMAIL PROTECTED] Sent: Tuesday 16 May 2006 12:35 To: Malhotra, Vijendra Cc: vim@vim.org Subject: Re: Mappings fail in gvim... On Tue, 16 May 2006, Malhotra, Vijendra wrote: I have

Re: Split not visible in putty

2006-05-19 Thread Gerald Lai
On Fri, 19 May 2006, Sanjaya wrote: I searched the vim mailing list archive at http://marc.theaimsgroup.com/ regarding the problems I am having but couldn't find any related threads. This thread has a mention of your problem: http://www.webservertalk.com/archive295-2005-2-906323.html I

Re: Extending Vim7 with plugins

2006-05-19 Thread Gerald Lai
On Fri, 19 May 2006, Meino Christian Cramer wrote: [snip] IMHO the help files are only for those, who are know already, what they are searching for. A newbie gets hopelessly lost. The help files are very extensive. Because of this, it has to cover each topic in a brief, accurate and concise

RE: Visual Block: $ vs. ^ inconsistency?

2006-05-19 Thread Gerald Lai
On Fri, 19 May 2006, Suresh Govindachar wrote: James Vega wrote: On Fri, May 19, 2006 at 07:47:41AM -0700, Suresh Govindachar wrote: In visual block mode (C-V) one can get jagged right edges by hitting $. But hitting ^ does not result in jagged left edges. Why the

Re: Vertical selection

2006-05-18 Thread Gerald Lai
On Thu, 18 May 2006, John Love-Jensen wrote: Hi Eddine, Is it possible to make a vertical selection in a text, to have a rectangular selection in the text ? If so, how ? Yes, you are looking for the Visual mode blockwise. ^V to initiate Visual mode blockwise. Use movement keys to get to

Re: Vertical selection (fwd)

2006-05-18 Thread Gerald Lai
[I wasn't sure if Eddine sent this out to everybody, so I'm forwarding this to the list.] You're welcome, Eddine :) -- Gerald -- Forwarded message -- Date: Thu, 18 May 2006 22:20:24 +0200 From: Baha-Eddine MOKADEM [EMAIL PROTECTED] To: Gerald Lai [EMAIL PROTECTED] Subject: Re

Oddities bugs

2006-05-18 Thread Gerald Lai
Hello all :) Just rehashing the recent threads that suggested some odd behavior with Vim 7. I haven't heard much about them on vim@vim.org, perhaps they've been fixed already. Anyway, here are the archive links all in one place: i_CTRL-E when completeopt has longest

Re: Multiline file appearing in one line under Vim

2006-05-17 Thread Gerald Lai
On Wed, 17 May 2006, Baha-Eddine MOKADEM wrote: 2006/5/17, Georg Dahn [EMAIL PROTECTED]: Hi! My guess is: notepad breaks at column 1024. In notepad the first two lines of your file have exact 1024 characters. This could be a notepad limitation. Best wishes, Georg Is there a way to make

Re: echon space ?

2006-05-16 Thread Gerald Lai
On Tue, 16 May 2006, Eric Arnold wrote: Does anybody understand why trailing spaces in an echon string don't actually show up? echon \ngimme let inp = getchar() echon nr2char(inp) I think echo/echon is doing fine. It's getchar() that's eating up trailing spaces. Compare @a's for: :redir

Re: gvim when x server is shut down

2006-05-16 Thread Gerald Lai
On Wed, 17 May 2006, Dennis Nezic wrote: when i exit my wm (e16), since it doesn't (and shouldn't) close any other programs, gvim is stuck without an x server, and doesn't handle this loss gracefully. effectively, it's as if it was kill -9'ed ... and thus leaves temporary files behind, which i

Re: How to auto-set font and size?

2006-05-15 Thread Gerald Lai
On Mon, 15 May 2006, Donal wrote: Now that my primary issue of getting Windows Explorer to use gvim to open .prg files has been fixed, I have 2 further issues. I will seperate them so they do not get confused... My eyes are not what they once were, and I use a high-res monitor. I don't want

Re: How to auto-set font and size? (fwd)

2006-05-15 Thread Gerald Lai
[You're welcome :) I think you may have wanted to send this to the list.] -- Forwarded message -- Date: Mon, 15 May 2006 13:20:09 -0500 From: Donal [EMAIL PROTECTED] To: Gerald Lai [EMAIL PROTECTED] Subject: Re: How to auto-set font and size? At 01:11 PM 5/15/2006, Gerald wrote

Re: Moving windows horizontally from col to col

2006-05-15 Thread Gerald Lai
On Tue, 16 May 2006, Marc Weber wrote: I like the way you can move windows in wmii. 1 | 2 --+-- 3 | 4 if your cursor is in window 1 and you move the window to the right you get | 1 3 | 2 | 4 [improved illustrations] So I've tried to implement this in vim.. It works (not for preview

Re: Mappings fail in gvim...

2006-05-15 Thread Gerald Lai
On Tue, 16 May 2006, Malhotra, Vijendra wrote: I have the following mappings that work fine on vim but don't on gvim any idea why Window manipulation Ctrl left == Ctrl W l map ^[Oc ^Wl Ctrl left map ^[Od ^Wh Ctrl+Down == Ctrl-W + j map ^[Ob ^Wj Ctrl+Up == Ctrl-W + k map ^[Oa ^Wk You're

Re: echo question

2006-05-14 Thread Gerald Lai
On Sun, 14 May 2006, Yakov Lerner wrote: On 5/14/06, Jared [EMAIL PROTECTED] wrote: I have a simple question that I can't seem to figure out. When I use the echo command to echo a statement on my open window, it simply displays that message in the status bar. However, if I use echo in a

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

2006-05-14 Thread Gerald Lai
On Sun, 14 May 2006, Eric Arnold wrote: On 5/9/06, Gerald Lai [EMAIL PROTECTED] wrote: On Tue, 9 May 2006, Hari Krishna Dara wrote: On Tue, 9 May 2006 at 10:29am, Yegappan Lakshmanan wrote: Hi Scot, On 5/9/06, Scot P. Floess [EMAIL PROTECTED] wrote: Is there anyway to move the tabs

Re: sourcing vimrc files

2006-05-14 Thread Gerald Lai
On Sun, 14 May 2006, Jared wrote: [snip] Longer and more complicated, but now I can check to see if the file exists before sourcing it. However, this also causes a problem: when I try to source the file containing this function, it gives me an error saying that it cannot replace the function

Re: set highlight color?

2006-05-12 Thread Gerald Lai
On Fri, 12 May 2006, Jared wrote: How do I change the background color used for cursorline in Vim 7.0? I'd like to make it a few shades darker. It looks like it can be set with hl-CursorLine, but I can't figure out how to actually do it. I currently use the following setting in .gvimrc to

Re: Indentation question...

2006-05-12 Thread Gerald Lai
On Fri, 12 May 2006, John Schmerge wrote: Hi all, I've got a question about changing vim's indentation behavior for c/c++: Is it possible to get the editor to insert tabs to signify *indentation* level, and to insert spaces to align text *after* the indentation? I've been trying to find some

Re: Set color block of text

2006-05-12 Thread Gerald Lai
On Fri, 12 May 2006, Richard Emberson wrote: Is there a way in a vim script to set the color (fg/bg) to a block of text? say from line 12 to line 15 and from column 4 to column 9. The text in this block can be anything, not syntax. Perhaps something like :match Todo /\%11l\%16l\%3c\%10c/

RE: Bug i_CTRL-X s and arrow

2006-05-11 Thread Gerald Lai
On Wed, 10 May 2006, Suresh Govindachar wrote: [snip] Confirmed for 7.0 release. It seems that i_up-arrow i_down-arrow work un-intuitively as compared to i_ctrl-p i_ctrl-n, respectively. Not exactly -- the bug is _NOT_ un-intutiveness. To both Suresh and Edward: please read my

i_C-r= + \C-o

2006-05-11 Thread Gerald Lai
[GVim 7.0 release for Windows] This is how I do my PageUp/Down: inoremap PageDown C-oC-dC-oC-dC-oC-y inoremap PageUp C-oC-uC-oC-uC-oC-e If I do inoremap PageDown C-r=\ltC-o\ltC-d\ltC-o\ltC-d\ltC-o\ltC-yCR inoremap PageUp

RE: Column Selection

2006-05-11 Thread Gerald Lai
On Thu, 11 May 2006, Suresh Govindachar wrote: Elias Chatzigeorgiou wrote: I use the mswin behaviour and insert mode for editing (source mswin.vim and set insertmode in _vimrc ) To enable column selection I use the sequence: CTRL-O, g, CTRL-H and hold the SHIFT during the

RE: Column Selection

2006-05-11 Thread Gerald Lai
On Thu, 11 May 2006, Hari Krishna Dara wrote: On Thu, 11 May 2006 at 6:37pm, Gerald Lai wrote: On Thu, 11 May 2006, Suresh Govindachar wrote: Elias Chatzigeorgiou wrote: I use the mswin behaviour and insert mode for editing (source mswin.vim and set insertmode in _vimrc

RE: Commenting out a block of text

2006-05-10 Thread Gerald Lai
On Wed, 10 May 2006, David Fishburn wrote: As Yakov mentioned, your question recently came up in this list. It started with http://www.vim.org/tips/tip.php?tip_id=346 Incidently I just updated this tip (May 8th) to handle the case where Vim automatically indents the line while you are in

Re: basic question: quick split like awk

2006-05-10 Thread Gerald Lai
On Wed, 10 May 2006, Ben K. wrote: Hi, Is there a way to split a line automatically like awk would? Given A quick brown fox jumped over , awk '{print $3}' ... == brown or like in perl split(':',$line)... I'd like to do within vim something like :s/{some notation}/\3

RE: Indentation and blank lines

2006-05-09 Thread Gerald Lai
On Tue, 9 May 2006, Arm?nio Pinto wrote: -Original Message- From: J?rgen Kr?mer [mailto:[EMAIL PROTECTED] Sent: ter?a-feira, 9 de Maio de 2006 16:04 To: vim mailing list Subject: Re: Indentation and blank lines Hi Arm?nio Pinto wrote: I'm using Vim to edit Java code.

Re: fast file opening / find file as you type

2006-05-09 Thread Gerald Lai
On Tue, 9 May 2006, Benjamin Reitzammer wrote: [snip] Regarding :find. It does not do path-full completion, and no 'incremental completion menu'. To write such plugin, you'd need to process every typed character. Yes I tried, :find and that it's not doing completion of my filename, is

Re: Vim 7 mapping change?

2006-05-09 Thread Gerald Lai
On Tue, 9 May 2006, Robin Becker wrote: I am trying out Vim 7.0 and see a major difference in the way my old mappings work. I have for many years mapped g to G so I can use the lower case g to jump around the file instead of shift+g. Under 6.4 and earlier that works well, but with vim 7 I

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

2006-05-09 Thread Gerald Lai
On Tue, 9 May 2006, Hari Krishna Dara wrote: On Tue, 9 May 2006 at 10:29am, Yegappan Lakshmanan wrote: Hi Scot, On 5/9/06, Scot P. Floess [EMAIL PROTECTED] wrote: Is there anyway to move the tabs in a tabbed window around using the mouse? I see the menu options for a tab when I right

Re: Auto-Commands popup message

2006-05-08 Thread Gerald Lai
On Mon, 8 May 2006, Mark Volkmann wrote: On 5/8/06, Bram Moolenaar [EMAIL PROTECTED] wrote: Mark Volkmann wrote: When I start Vim 7 under Windows XP, I always get a popup message dialog that says Auto-Commands. Is there a way to prevent this? Check your startup scripts for a lonely au

RE: Commenting out a block of text

2006-05-07 Thread Gerald Lai
On Sun, 7 May 2006, Peter Slizik wrote: Use \t for a normal tag wrap. Use \T for a markup tag wrap of the form a../a. Dear Gerald, seems that \t and \T do the same thing. After a quick look at the source, I think you intended to support /* */ and HTML tags differently. For me, both

Re: Newbie problem: Beginners script pitfall

2006-05-07 Thread Gerald Lai
On Sun, 7 May 2006, Meino Christian Cramer wrote: Hi, [snip] OK, if you're just starting out, before writing scripts, you would need to jump through a few hoops first. Please pardon me if you are already familiar with what I'm about to write. I'm just taking it from the top. First, get

RE: Commenting out a block of text

2006-05-05 Thread Gerald Lai
On Fri, 5 May 2006, Max Dyckhoff wrote: -Original Message- From: Yakov Lerner [mailto:[EMAIL PROTECTED] Sent: Friday, May 05, 2006 11:45 AM To: Max Dyckhoff Cc: vim@vim.org Subject: Re: Commenting out a block of text On 5/5/06, Max Dyckhoff [EMAIL PROTECTED] wrote: F4 I want to do a

Re: hiding lines

2006-05-04 Thread Gerald Lai
On Thu, 4 May 2006, Jack Donohue wrote: :v (and :g) made my day..! Yes, I use this a lot if I just want to filter out a set of lines, or see only lines containing some text (like the old XEDIT command). But what I'd really like to to is continue editing in this view and not lose all the

Re: deleting repeated blocks of text

2006-05-04 Thread Gerald Lai
On Thu, 4 May 2006, Tim Chase wrote: Which command should I add in the script to tell vi to embed it in the correct place? At the moment I do it by telling vi something like go to line XXX, delete everything, insert text: :386,$d o CTRL + v + ESC :r /tmp/arXiV_2.txt :w! ~pau/WWW/arXiV.html

Re: scripted :isearch?

2006-05-04 Thread Gerald Lai
On Thu, 4 May 2006, Neil Bird wrote: Around about 04/05/06 10:07, Yakov Lerner typed ... Do you mean function a-la :ilist that returns list of matches instead of printing them on the screen ? Actually, I finally sussed how ballooneval works and I thought that it might be cool to show the

Re: deleting repeated blocks of text

2006-05-03 Thread Gerald Lai
On Wed, 3 May 2006, Gerald Lai wrote: On Wed, 3 May 2006, Vim Visual wrote: Hi, this is the continuation of a post... The point is that I have a file where blocks of text appear sometimes once, sometimes twice or even three times etc... I would like to find out how to delete the blocks

Re: regex @vim, negating a group

2006-05-02 Thread Gerald Lai
On Tue, 2 May 2006, o1792 wrote: [snip] if you want to find anything that is not any word ending in ion, well the regex group you're looking at is \(\.\+ion\\), but how do you negate that? Put it all in square brackets and provide a caret ^ at the beginning? Nope. in fact group within square

Re: mouse selected text on winxp

2006-05-01 Thread Gerald Lai
On Mon, 1 May 2006, oystercatcher wrote: Greetings, Sorry if this is an obvious one but I searched using a variety of arguments and nothing was too clear. I also looked at _gvimrc and changed the line highlight Normal guibg=white # from gray80 which made it much easier to see the

Re: issues with taglist and minibuffer explorer

2006-05-01 Thread Gerald Lai
On Mon, 1 May 2006, James Vega wrote: On Mon, May 01, 2006 at 06:45:24PM +0530, jagpreet wrote: [snip] Furthermore if I close(:q), either of the files and switch to another file by selecting it from the buffer window it opens the files in black and white(vi ) mode, like syntax off commend is

Re: txt.vim - Universal syntax script for all txt docs, logs and other strange files

2006-04-30 Thread Gerald Lai
On Sat, 29 Apr 2006, Tomasz Kalkosi?ski wrote: Hello This is a good idea! I have a couple of suggestions: (1) HiLink txtString Normal The highlight for alphabetic text may be too strong if linked to Identifier. Yes, it is linked to Identifier. The point is that Normal text is

Re: History and set history=xx

2006-04-30 Thread Gerald Lai
On Sun, 30 Apr 2006, Yakov Lerner wrote: On 4/30/06, Gerald Lai [EMAIL PROTECTED] wrote: On Sun, 30 Apr 2006, Yakov Lerner wrote: On 4/30/06, Bram Moolenaar [EMAIL PROTECTED] wrote: :help 'compatible' where (among other things) you can find the warning This is a special kind

Re: How to auto-escape space in filename when write

2006-04-30 Thread Gerald Lai
On Sun, 30 Apr 2006, Yakov Lerner wrote: On 4/30/06, Eddy Zhao [EMAIL PROTECTED] wrote: Very often, when I - snip some notes from web - paste them into an empty buffer - yank the key sentence as filename - then try to :write Vim report E77: Too many file names. How can the spaces in

Re: txt.vim - Universal syntax script for all txt docs, logs and other strange files

2006-04-30 Thread Gerald Lai
On Sun, 30 Apr 2006, Russell Bateman wrote: Gerald Lai wrote: On Sat, 29 Apr 2006, Tomasz Kalkosi???ski wrote: Hello This is a good idea! I have a couple of suggestions: (1) HiLink txtString Normal The highlight for alphabetic text may be too strong if linked to Identifier. Yes

Re: History and set history=xx

2006-04-30 Thread Gerald Lai
On Sun, 30 Apr 2006, Yakov Lerner wrote: On 4/30/06, Gerald Lai [EMAIL PROTECTED] wrote: On Sun, 30 Apr 2006, Yakov Lerner wrote: On 4/30/06, Gerald Lai [EMAIL PROTECTED] wrote: On Sun, 30 Apr 2006, Yakov Lerner wrote: On 4/30/06, Bram Moolenaar [EMAIL PROTECTED] wrote: :help

Re: highlighting tabbed text

2006-04-30 Thread Gerald Lai
On Mon, 1 May 2006, Michael Naumann wrote: Is there a way to highlight a sequence of non-tabs followed by a sequence of tabs (/^[^\t]\+\t\+/) differently from the next such sequence? For example in the line a\tb\t\tc\td I want a\t to be color1, b\t\t to be color2 and c\t to be color3

Re: modify a text file

2006-04-29 Thread Gerald Lai
On Sat, 29 Apr 2006, Vim Visual wrote: [snip] I solved it like this: :1,/received/d :$?^\s*For subscribe options?,$d :let @a='' :g/hole\|relativistic\|LISA\|black\|supermassive\|intermediate/?^\s*astro-ph?,/^\s*astro-ph/-y A :%d :put a :1d :%s!^\s*astro-ph/\(\d\+\)!a

Re: brackets placement in vim

2006-04-28 Thread Gerald Lai
On Fri, 28 Apr 2006, Justin Randall wrote: Hi, I would like to know if there is an easy way to fix the placement of { } brackets in vim so that they fall two or three spaces intented. For example in a C++ file I'm currently working on, I have: if (pExample != NULL) { // code here } What

Re: ` visual selection -- inconsistent?

2006-04-28 Thread Gerald Lai
On Fri, 28 Apr 2006, Eric Arnold wrote: On 4/28/06, Eric Arnold [EMAIL PROTECTED] wrote: The end of the visual selection as gotten by` seems to depend on whether the cursor was between the end_col - 1, and end_col, or between end_col, and end_col + 1. The GUI gvim seems to have the

Re: autochdir doesnt work right

2006-04-27 Thread Gerald Lai
On Thu, 27 Apr 2006, Eric Crahen wrote: I've tried all variation of BufEnter and autchdir commands to get the cwd switched to that of the file that is open. None of them ever work when I specify a file on the command line. The buffer for the file I specify is open, but the cwd is right where I

Re: autochdir doesnt work right

2006-04-27 Thread Gerald Lai
On 4/27/06, Eric Crahen [EMAIL PROTECTED] wrote: On 4/27/06, Gerald Lai [EMAIL PROTECTED] wrote: On Thu, 27 Apr 2006, Eric Crahen wrote: I've tried all variation of BufEnter and autchdir commands to get the cwd switched to that of the file that is open. None of them ever work when I

Re: autochdir doesnt work right

2006-04-27 Thread Gerald Lai
On Thu, 27 Apr 2006, Eric Crahen wrote: On 4/27/06, Gerald Lai [EMAIL PROTECTED] wrote: On 4/27/06, Eric Crahen [EMAIL PROTECTED] wrote: On 4/27/06, Gerald Lai [EMAIL PROTECTED] wrote: On Thu, 27 Apr 2006, Eric Crahen wrote: I've tried all variation of BufEnter and autchdir commands

Re: File - register

2006-04-27 Thread Gerald Lai
On Thu, 27 Apr 2006, Suresh Govindachar wrote: Hello, What's the best way to get the contents of a file into a register? I tried the following (file is foo.bat), but it doesn't get rid of the new buffer: :new|r foo.bat|1d|normal ayG|q! So why does the q! get lost, and is there a

Re: Backslash in maps

2006-04-27 Thread Gerald Lai
On Thu, 27 Apr 2006, Suresh Govindachar wrote: Hello, Why does the following _single_ line map generate the E10 error?: nmap space :let @a=substitute(getline('.'),'\(^.*|\s*\)\|\(\s\s*$\)','','g') How would it be fixed? What do you intend to do with the mapping? First, replace all |

Re: Bug in i_^X

2006-04-26 Thread Gerald Lai
On Wed, 26 Apr 2006, Hari Krishna Dara wrote: In Vim 6.3, hitting ^X in insert mode when the cursor is on the number: 08) produced: 03778) This is a bug which seems to be fixed in Vim 7.0f, but it doesn't work right, as it now produces: 7) instead of: 07) If the string is say,

Re: Insert Visual mode

2006-04-26 Thread Gerald Lai
On Wed, 26 Apr 2006, Benji Fisher wrote: On Wed, Apr 26, 2006 at 05:17:01PM +0200, Bram Moolenaar wrote: Benji Fisher wrote: This mode seems to be similar to Insert mode, but Esc takes me to Visual mode instead of Normal mode. AFAICT this is undocumented. This is a really weird mode,

RE: Making * search for strings

2006-04-26 Thread Gerald Lai
On Wed, 26 Apr 2006, Halim, Salman wrote: I use the extreme version: vnoremap silent * yy:let @/='\(' . substitute( escape( @y, '$*^[]~\/.' ), '\_s\+', '\\_s\\+', 'g' ) . '\)'cr:set hlscr This escapes a lot of stuff, including replacing any whitespace with a generic expression that includes

Re: Making * search for strings

2006-04-25 Thread Gerald Lai
On Tue, 25 Apr 2006, Suresh Govindachar wrote: Hello, By default, * searches for words: /\stuff_below_cursor\ but I would like it to search for strings: /stuff_below_cursor One way is to use the following map * yiw:let @/[EMAIL PROTECTED]cr Is there a better way? (/yiw didn't

  1   2   >