exists(*Foo!garbage) = 1 ?

2006-04-29 Thread Srinath Avadhanula
Hi, If there is a function called Foo(), then it looks like exists('*Foo\W.*') evaluates to 1. For example :fun Foo : return 1 :endfun :echo exists('*Foo!asdf') prints 1 This happens not just for functions, but variables etc. also. For variables, I can work around this by

Re: exists(*Foo!garbage) = 1 ?

2006-04-29 Thread Bram Moolenaar
Srinath Avadhanula wrote: If there is a function called Foo(), then it looks like exists('*Foo\W.*') evaluates to 1. For example :fun Foo : return 1 :endfun :echo exists('*Foo!asdf') prints 1 This happens not just for functions, but variables etc. also. For

Re: functions that take much time in load_dummy_buffer() [vimgrep]

2006-04-29 Thread Yakov Lerner
On 4/29/06, Bram Moolenaar [EMAIL PROTECTED] wrote: Yakov Lerner wrote: I identified which functions are slow and which are fast out of functions called (load_dummy_buffer() + wipe_dummy_buffer()) pair. As I wrote earlier this pair of functions is what slows down vimgrep, not the search.

spell function -- suggestion to do: error rate of a file

2006-04-29 Thread Milan Berta
Hello Vim-Dev, Is there any way how to count bad words in a file which is spelled? Or any function which can show an 'error rate' of a file? For example, the number of bad words per ten words, or a percentage of bad words in a file. I snooped the spell.txt help file thorough and found nothing :(

Install Fails on Windows

2006-04-29 Thread Bill McCarthy
Hello Vim Developers, Compiling with MVC or Ming, the exe files are copied from c:\vim\vim70f\src to c:\vim\vim70f (the usual place). But running install produces the following: [c:\vim\vim70f]install This program sets up the installation of Vim 7.0f04 BETA ERROR: Cannot find

Re: spell function -- suggestion to do: error rate of a file

2006-04-29 Thread Yakov Lerner
On 4/29/06, Milan Berta [EMAIL PROTECTED] wrote: Is there any way how to count bad words in a file which is spelled? Or any function which can show an 'error rate' of a file? The script that does what you want is below, and also attached. Press F5 to activate. This is sample output: Total

Re: Install Fails on Windows

2006-04-29 Thread Bram Moolenaar
Bill McCarthy wrote: Compiling with MVC or Ming, the exe files are copied from c:\vim\vim70f\src to c:\vim\vim70f (the usual place). But running install produces the following: [c:\vim\vim70f]install This program sets up the installation of Vim 7.0f04 BETA ERROR: Cannot

Re: vim70f, spell.txt help-file -- 'trie' at line 1569

2006-04-29 Thread Bram Moolenaar
Milan Berta wrote: I'm not sure, but I read somewhere that also pity mistakes in the help-files should be reported. Here we go: There is a misspelled word in spell.txt help-file at line 1569. IMHO, there should be 'tree' instead of 'trie'. That's actually correct. A trie is a special

RE: Install Fails on Windows

2006-04-29 Thread Suresh Govindachar
Bram Moolenaar wrote: Bill McCarthy wrote: Compiling with MVC or Ming, the exe files are copied from c:\vim\vim70f\src to c:\vim\vim70f (the usual place). But running install produces the following: [c:\vim\vim70f]install This program sets up the

the dash and the '.' repeat command

2006-04-29 Thread cga2000
Are there any peculiarities associated with the '-' dash character in vim? I was experimenting with the '.' repeat command and I typed the following: +++ !!! followed

Re: modify a text file

2006-04-29 Thread Vim Visual
Hi Tim, somehow my email was partially deleted... ?? cat file | vim - What stands the - for? Then, clean up the stuff we don't want 1,/received/d $?^\s*For subscribe options?,$d to strip off the header and footer. this worked out nicely My first-pass solution will end

Re: How to customize the default display of Vim?

2006-04-29 Thread Yakov Lerner
On 4/29/06, Chen Long [EMAIL PROTECTED] wrote: Dear all, I am new to Vim. Could any one tell me how to customize the default display of Vim? Say colorscheme, width and height of the screen, vertical line spacing etc? What are those commands I should put them in .vimrc? For colorscheme: :set

Re: Disable scratch buffer

2006-04-29 Thread Yakov Lerner
On 4/29/06, Eric Crahen [EMAIL PROTECTED] wrote: For some reason I get an empty hidden buffer that does show up when I list buffers. Must be some plugin doing this. To find which plugin is doing this, do :scriptnames and look into your ~/.vim/plugin directory. Also, try to start 'vim -u NONE

RE: Disable scratch buffer

2006-04-29 Thread John Player
-Original Message- From: Tim Chase [mailto:[EMAIL PROTECTED] Sent: Friday, April 28, 2006 5:03 PM When I start vim from the command line and provide a filename, how can I prevent a default scratch buffer from also being opened? I'm not sure exactly what you mean by a default

RE: omni + case

2006-04-29 Thread Hugo Ahlenius
| -- but is there any (easy) way to make the preview list all the | alternative capitalizations of a specific keyword? I would like | FunctionName, functionName and functionname etc to |show up in the menu... |:set ignorecase |should do it. Should it? I had it already set, and it doesn't do

getlatestvimscripts

2006-04-29 Thread Hugo Ahlenius
Hi, I just tried the new GLVS script in Vim 7.0f, I am getting an error: SNR27_GetLatestVimScripts: Line 125: E486: Pattern not found: ^- Everything was already current Am I doing something wrong... ? (this is on WinXP) /Hugo -- Hugo Ahlenius fraxinus (@) oxel.net http://www.oxel.net

repeat movement

2006-04-29 Thread David S .
Is there a way to repeat the last cursor movement? Dot (.) repeats last edit, is there an analog for motion, so that, for example, if I press zj to move down a fold I can just hit some other key to repeat that? I am that lazy. Thanks, David S.

Re: ` visual selection -- inconsistent?

2006-04-29 Thread Benji Fisher
On Sat, Apr 29, 2006 at 12:03:12AM -0600, Eric Arnold wrote: :set selection=exclusive Use this text: 123456 2abcde 3abcde 4abcde 5abcde Go to line 4, col 2. Hit ^V or (^Q whichever works). Type kkll until you've highlighted abc abc abc Type ESC For me, now the cursor is

Re: the dash and the '.' repeat command

2006-04-29 Thread Benji Fisher
On Sat, Apr 29, 2006 at 02:42:36AM -0400, cga2000 wrote: Are there any peculiarities associated with the '-' dash character in vim? I was experimenting with the '.' repeat command and I typed the following: +++ !

Re: modify a text file

2006-04-29 Thread Tim Chase
cat file | vim - What stands the - for? It is a standard *nix convention of accepting stdin as the source for the file (in this case, the output of cat). That way, we never actually bung with the original file. If you don't care if it gets hosed in the process, you can just do

Re: Unifying more- and hit-enter- prompts

2006-04-29 Thread Bram Moolenaar
Suresh Govindachar wrote: To get out of the more-prompt, one can hit q or esc. But since the hit-enter-prompt allows entering a command (and does not disallow normal mode commands!), hitting q or esc at the hit-enter-prompt will not only get one out, but will have the

Re: the dash and the '.' repeat command

2006-04-29 Thread Bram Moolenaar
cga (?) wrote: Are there any peculiarities associated with the '-' dash character in vim? I was experimenting with the '.' repeat command and I typed the following: +++ !!

Are these cinoptions possible?

2006-04-29 Thread Eric Crahen
Thanks for all the help so far, one question on formatting. I've read the help on cinoptions and I can't figure this one out. I like my Java like this: // WANTED public void testNullConstructor() throws Throwable { try { new ParameterTypeMatcher((Type[])null); fail(); }

Mapping C-[ ?

2006-04-29 Thread Eric Crahen
Is it possible to map CTRL-[ ? That generates the ESC code, :map C-[ something :map will show that C-[ was converted to Esc Esc something I tried to do some other flavors of the map command but no dice. -- - Eric

Re: Mapping C-[ ?

2006-04-29 Thread Eric Arnold
According to my favorite ASCII table control-[ has always been ESCAPE. What is it that you're looking for? On 4/29/06, Eric Crahen [EMAIL PROTECTED] wrote: Is it possible to map CTRL-[ ? That generates the ESC code, :map C-[ something :map will show that C-[ was converted to Esc Esc

Re: Mapping C-[ ?

2006-04-29 Thread Yakov Lerner
On 4/29/06, Eric Crahen [EMAIL PROTECTED] wrote: Is it possible to map CTRL-[ ? That generates the ESC code, In X11, you can use xmodmap to have Esc and Ctrl-[ send different things, I think. But this is platform-dependent thing. Under xterm, you can customize xterm resources to do it. Maybe

Re: Mapping C-[ ?

2006-04-29 Thread Eric Arnold
KeyTweak on Windows has a pretty good interface. On 4/29/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 4/29/06, Eric Crahen [EMAIL PROTECTED] wrote: Is it possible to map CTRL-[ ? That generates the ESC code, In X11, you can use xmodmap to have Esc and Ctrl-[ send different things, I think.

Re: Mapping C-[ ?

2006-04-29 Thread Eric Arnold
As a curiosity, are there any platforms where the GUI gets/can get the scancodes? On 4/29/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 4/29/06, Eric Crahen [EMAIL PROTECTED] wrote: Is it possible to map CTRL-[ ? That generates the ESC code, In X11, you can use xmodmap to have Esc and Ctrl-[

Re: Mapping C-[ ?

2006-04-29 Thread Eric Crahen
It just depends on how the GUI is getting the information. gnome-terminal has no problem mapping the CTRL-[ differently from ESC, for instance. On 4/29/06, Eric Arnold [EMAIL PROTECTED] wrote: As a curiosity, are there any platforms where the GUI gets/can get the scancodes? On 4/29/06, Yakov

Re: Are these cinoptions possible?

2006-04-29 Thread Jean-Emmanuel Reynaud
I tried to indent your piece of code using vim, and obtained the indentation you like. So what's the difference between your and my configuration ? :filetype -- filetype detection:ON plugin:ON indent:ON :set filetype? -- filetype=java :set indentexpr? -- indentexpr=GetJavaIndent() If your

Re: Are these cinoptions possible?

2006-04-29 Thread Eric Crahen
Hmm that works, I guess its the set cinoptions=:0g0 thing I'd set later on for just generic files. On 4/29/06, Jean-Emmanuel Reynaud [EMAIL PROTECTED] wrote: I tried to indent your piece of code using vim, and obtained the indentation you like. So what's the difference between your and my

Re: How to customize the default display of Vim?

2006-04-29 Thread Chen Long
Thank you. I tried them. Only the command for colorscheme doesn't work. After I start Vim, I can change the color scheme by typing :colorscheme darkblue But if I put it into .vimrc. It doesn't work. Long On Apr 29, 2006, at 2:47 AM, Yakov Lerner wrote: On 4/29/06, Chen Long [EMAIL

how to configure the View rule for Vim-Latex?

2006-04-29 Thread Chen Long
When I open .tex file using Vim. (I have installed Vim-latex). It says that No View rule defined for target pdf Please specify a rule in $VIMRUNTIME/ftplugin/tex/texrc :help Tex_ViewRule_format What should I do? by the way, I am using Mac OS 10.4. Thanks, Long

Folding comments

2006-04-29 Thread cga2000
Is there any way I could use folding to do this: 1. Fold all lines in a file that contain only comments. 2. Optionally delete all the lines that have previously been folded. I have a feeling I am looking for something less sophisticated than the fold feature where I could remove all lines that

synIDattr() doesn't show highlight group of misspelled word

2006-04-29 Thread Yakov Lerner
To see the highlight group of the highlighted char/word, I use the mapping below. I picked it somewhere from tips. It works for syntax and for match highlights. But it shows no highlight group when on misspelled (red) word, althoug highlight is visible on screen. Why ? fu! ShowSyntaxGroup()

Re: ` visual selection -- inconsistent?

2006-04-29 Thread Eric Arnold
On 4/29/06, Benji Fisher [EMAIL PROTECTED] wrote: On Sat, Apr 29, 2006 at 12:03:12AM -0600, Eric Arnold wrote: :set selection=exclusive Use this text: 123456 2abcde 3abcde 4abcde 5abcde Go to line 4, col 2. Hit ^V or (^Q whichever works). Type kkll until you've highlighted abc

Re: Folding comments

2006-04-29 Thread Eric Arnold
Have you seen the fold-expr section? EXPR*fold-expr* The folds are automatically defined by their foldlevel, like with the indent method. The value of the 'foldexpr' option is evaluated to get the foldlevel of a line. Examples: This will create a

Re: Svn and patches

2006-04-29 Thread Suresh Govindachar
PS: While downloading the sources from svn for the very first time involves the checkout (co) command: c:\opt\svn\svn-win32-1.3.1\bin\svn.exe co https://svn.sourceforge.net/svnroot/vim/vim7 making the local copy up-to-date with the latest release involves

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