Capturing group in regex

2010-02-28 Thread rameo
Lets say I want to search all number [0-9] with regex and what to put a _ sign after every number. Normally I can capture the group using $1 but this doesn't work in gvim. :s%/[0-9]/$1_/g -- doesn't work. tnx in advance. -- You received this message from the vim_use maillist. Do not

Re: Capturing group in regex

2010-02-28 Thread Teemu Likonen
* 2010-02-28 01:42 (-0800), rameo wrote: Lets say I want to search all number [0-9] with regex and what to put a _ sign after every number. Normally I can capture the group using $1 but this doesn't work in gvim. In regexp replace strings you can use to refer back to the whole match or \1

Smart expandtab at beginning of line vs in mid-line?

2010-02-28 Thread Michael Ludwig
For indenting at the beginning of the line, I want tabs. But in mid-line, I want them to be expanded to spaces. Can this be achieved in Vim? bla.callSomeMethod( eins, zwei ); // jau bla.callAnotherMethod( eins, zwei, drei ); // jaujau The reason for

file manager recommendations

2010-02-28 Thread Daniel Fetchinson
Hi vimmers! There are a couple of vim-like file managers out there, most notably vifm, but also there are plugins for vim itself, like VimExplorer. I'm wondering if anybody has experiences with any such vim-like file manager functionality and what the majority of the folks use here. VE seems to

Re: FedoraCore 8

2010-02-28 Thread Benjamin R. Haskell
On Sat, 27 Feb 2010, Suresh Govindachar wrote: Hello, I tried 3 ways to install vim-with-everything on Fedora Core 8, but failed: Attempt 1) vim-7.2.tar.bz2 - typing make resulted in the following error: [...] checking for tgetent()... configure: error: NOT FOUND!

Re: Open a new file if the file doesn't exist when using ctrl+W_ctrl+F?

2010-02-28 Thread Benjamin R. Haskell
On Thu, 25 Feb 2010, Peng Yu wrote: On Feb 25, 12:58 am, Christian Brabandt cbli...@256bit.org wrote: On Thu, February 25, 2010 3:33 am, Peng  Yu wrote: I see the following line on the above page. But I'm not sure what 'Leader' represents here. Would you please let me know?

dictionary functions: Is there a magic missing-attribute method/function?

2010-02-28 Thread Tom Link
Hi, I vaguely remember that such a thing exists but it could well be that I'm confusing vimscript with some other language. It there such a thing as a missing method/attribute function for dictionaries? So that I could write code like this: let x = {} function! x.__Missing__(name) dict

Winmanager + color directories / sorting

2010-02-28 Thread rameo
Is it possible to color the directories in Winmanager as in NERDTree? (p.e. all directories blue?) I can't find out as well how to sort the files and directories in Winmanager not case sensitive. --- ps: I like NerdTree a lot but there is no buffermanager inside. (Is

Re: FedoraCore 8

2010-02-28 Thread Benjamin R. Haskell
On Sun, 28 Feb 2010, Matt Wozniski wrote: On Sat, Feb 27, 2010 at 7:36 PM, Benjamin R. Haskell v...@benizi.com wrote: So, you might have 'curses' or 'ncurses' installed, but you also need 'curses-devel' or 'ncurses-dev' (I don't know the correct name). You'll probably need several

Can't remap C-j

2010-02-28 Thread sidgalt
Hey, I just installed a vim c/c++ plugin from here http://www.vim.org/scripts/script.php?script_id=213. Now I'm unable to map C-j to any command (I usually map it to 4j) Any help would be appreciated. Thanks -- You received this message from the vim_use maillist. Do not top-post! Type your

Re: dictionary functions: Is there a magic missing-attribute method/function?

2010-02-28 Thread Tim Chase
Tom Link wrote: I vaguely remember that such a thing exists but it could well be that I'm confusing vimscript with some other language. It there such a thing as a missing method/attribute function for dictionaries? So that I could write code like this: [snip pseudo-code] Does such a fallback

Re: dictionary functions: Is there a magic missing-attribute method/function?

2010-02-28 Thread Tom Link
Hi, I suspect you're reaching for the get() function which allows an optional 3rd parameter for a default Thanks. But with the get() function the caller would have to know how the values are computed and the computed value isn't added to the dictionary. This doesn't make it a good solution for

Re: Close all buffers, stay open

2010-02-28 Thread Tim Johnson
* Tim Johnson t...@johnsons-web.com [100227 19:04]: * sc tooth...@swbell.net [100227 17:03]: On Saturday 27 February 2010 07:11:05 pm Tim Johnson wrote: For my purposes, it would be great if I could close all buffers, but keep vim open. ... one thing i like to [easily] do is close

Re: Capturing group in regex

2010-02-28 Thread rameo
Yes! That works fine. thank you Teemu. -- 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: FedoraCore 8

2010-02-28 Thread Suresh Govindachar
Just to end the thread on installing vim on certain unix systems (based on replies from Benjamin R. Haskell and Matt Wozniski): 1) Build of sources might not work since the installation might not have some developer packages needed for the build process. One would think that an

Re: iMac slow in vi

2010-02-28 Thread Miklos Somogyi
On 27/02/2010, at 09:34 PM, Keyan wrote: On 27 Feb 2010, at 02:23, Miklos Somogyi wrote: Hello Folks, I bought a 27 i7 iMac. It is blazingly fast re any job, except in vi. E.g. inserting or deleting a character takes noticeable time. have you considered MacVim? i have a macbook

Re: Naive question: scrolling down keeping only 1 line

2010-02-28 Thread Jean Johner
Hello Mat, I have copied your code in the _vimrc of my local PC. It works perfectly. I have copied it in the _vimrc of my office PC on which I work from home via a Remote desktop connection using VPN. It works also very good, but you can see a very little trembling in the display when you scroll

Re: iMac slow in vi

2010-02-28 Thread Keyan
On 28 Feb 2010, at 22:47, Miklos Somogyi wrote: On 27/02/2010, at 09:34 PM, Keyan wrote: On 27 Feb 2010, at 02:23, Miklos Somogyi wrote: Hello Folks, I bought a 27 i7 iMac. It is blazingly fast re any job, except in vi. E.g. inserting or deleting a character takes noticeable time.

Re: vi, search string and comment line howto?

2010-02-28 Thread Tim Chase
Did my reply not come through on the 26th? In short, the pipe can be used to string together *ex* commands, not normal-mode commands. Even then only certain ex commands can be separated by the pipe as detailed at :help :bar I've pasted my original reply below in case it didn't come

RE: Smart expandtab at beginning of line vs in mid-line?

2010-02-28 Thread John Beckett
Michael Ludwig wrote: For indenting at the beginning of the line, I want tabs. But in mid-line, I want them to be expanded to spaces. The first has general principles; the second is on your point: http://vim.wikia.com/wiki/Indenting_source_code

RE: vi, search string and comment line howto?

2010-02-28 Thread John Beckett
omonte7 wrote: Subject: vi, search string and comment line howto? The answers to your previous post are here: http://groups.google.com/group/vim_use/browse_thread/thread/3ff28355fd3416fa John -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the

Re: Any limitation of autocmd when the bufdo is processing ?

2010-02-28 Thread winterTTr
On Fri, Feb 26, 2010 at 3:41 PM, winterTTr winterttr@gmail.com wrote: Actually, i meet a problem like below. I tried to update a specific unlisted buffer every time the BufEnter event happens. the Code like below( just an example, not the real code ): I am trying to use the set

Re: Smart expandtab at beginning of line vs in mid-line?

2010-02-28 Thread Michael Ludwig
John Beckett schrieb am 01.03.2010 um 11:25:35 (+1100): Michael Ludwig wrote: For indenting at the beginning of the line, I want tabs. But in mid-line, I want them to be expanded to spaces. The first has general principles; the second is on your point:

Re: building console version on unices (was: iMac slow in vi)

2010-02-28 Thread Miklos Somogyi
On 27/02/2010, at 08:17 PM, Florian Rehnisch wrote: * Miklos Somogyi m...@netspace.net.au [100227 09:28]: On 27/02/2010, at 06:20 PM, Florian Rehnisch wrote: You get a certain speedup when you use the console version and build vim w/o gui facilities. This is my shell function receipt:

Programmatically detect a current highlight setting?

2010-02-28 Thread Wincent Colaiuta
I'm writing a plug-in and want to temporarily hide the cursor. It would be really neat if I could do highlight Cursor NONE and later restore the highlight setting to whatever it was before. But I am not sure how to capture the old setting. Evidently highlight Cursor _echoes_ the current setting,

Re: Split window automatically when opening 2 or 3 files

2010-02-28 Thread Tony Mechelynck
On 03/01/10 21:39, Gary Johnson wrote: On 2009-12-31, Brock Henry wrote: Hi, I want to have Vim (on Windows), automatically split the window if I open two files (using right-click explorer integration - Open in Single VIM Window). Actually, a new right-click integration that did this (Open in