Re: Yanking multi-line pattern matches
Hari Krishna Dara wrote: On Wed, 6 Sep 2006 at 12:18pm, Druce, Richard wrote: I'm trying to select all the text matching a (multi-line) pattern so I can put it into a separate document. I thought the global command would work but it only copies the first matching line, does anyone know a command to do this? I don't see any Vim primitives to work with multi-line matches. I think the searchpos() function should be extended to return the [line, col] of the end of the match as well. May be I am missing something, but in the absence of primitives, you can probably write a function which will try to guess what the matching lines are, something like this (only partly tested): None of this is necessary. The simple solution is to use the uppercase name of a register, which appends to the register, rather than the lower case version, which replaces. For example, the A register is identical to the a register, but what you put into A adds to a, instead of replacing it. So, you want: :g/foobie bletch/y A After this, register a will contain every line that has foobie bletch in it. However, it also contains whatever was in it previously, so make sure the register you use is empty first. The uppercase registers are really useful for moving arbitrary chunks of code to a combined destination. Find the first set of lines you want to move and delete them into a lower-case register, e.g. r5dd. Then, go and find the other lines you want and use the upper-case register, e.g. R32dd. Finally, go to your destination and paste either register, e.g. rp.
Re: Yanking multi-line pattern matches
On 9/6/06, Elliot Shank [EMAIL PROTECTED] wrote: Hari Krishna Dara wrote: On Wed, 6 Sep 2006 at 12:18pm, Druce, Richard wrote: I'm trying to select all the text matching a (multi-line) pattern so I can put it into a separate document. I thought the global command would work but it only copies the first matching line, does anyone know a command to do this? I don't see any Vim primitives to work with multi-line matches. I think the searchpos() function should be extended to return the [line, col] of the end of the match as well. May be I am missing something, but in the absence of primitives, you can probably write a function which will try to guess what the matching lines are, something like this (only partly tested): None of this is necessary. The simple solution is to use the uppercase name of a register, which appends to the register, rather than the lower case version, which replaces. I think the point of the question was how to yank multiple lines corresponding to multi-line pattern. For single-line pattern, you're right, it's trivial. Yakov
Re: quick and dirty compile
Sibin P. Thomas wrote: Thank a lot to everyone! I added the following to my _vimrc file to get what I wanted nmap C-F9 :MakecompileCR nmap F5 :MakexecCR :!%.exeCR command Makecompile :se makeprg=gcc\ -o\ %.o\ % | :make! command Makexec :se makeprg=gcc\ -o\ %\ % | :make! Regards, Sibin We're not within a makefile: I don't believe % will be interpreted. Passing %.o (with % interpreted by Vim) to the shell would mean the current file, and read stdio from a file named .o. Use %:r.o or, if it doesn't work, command Makexec -nargs=0 -bar \ exe 'set makeprg=gcc\ -o\ ' \ . fnamemodify(expand('%'),':p:r') \ . '.o\ ' \ . expand('%') \ | make! with single quotes to avoid interpretation of backslashes before the :set command. See :help filename-modifiers Best regards, Tony.
Re: Yanking multi-line pattern matches
On Wed, 6 Sep 2006 at 7:01am, Yakov Lerner wrote: On 9/6/06, Elliot Shank [EMAIL PROTECTED] wrote: Hari Krishna Dara wrote: On Wed, 6 Sep 2006 at 12:18pm, Druce, Richard wrote: I'm trying to select all the text matching a (multi-line) pattern so I can put it into a separate document. I thought the global command would work but it only copies the first matching line, does anyone know a command to do this? I don't see any Vim primitives to work with multi-line matches. I think the searchpos() function should be extended to return the [line, col] of the end of the match as well. May be I am missing something, but in the absence of primitives, you can probably write a function which will try to guess what the matching lines are, something like this (only partly tested): None of this is necessary. The simple solution is to use the uppercase name of a register, which appends to the register, rather than the lower case version, which replaces. I think the point of the question was how to yank multiple lines corresponding to multi-line pattern. For single-line pattern, you're right, it's trivial. Yakov Right, Thanks Yakov. For single-line patterns, there is also a trick you can use to write the matches directly to the file. I think it is: :g/pattern/.w! file -- Hari __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Yanking multi-line pattern matches
Yakov Lerner wrote: On 9/6/06, Elliot Shank [EMAIL PROTECTED] wrote: Hari Krishna Dara wrote: On Wed, 6 Sep 2006 at 12:18pm, Druce, Richard wrote: I'm trying to select all the text matching a (multi-line) pattern so I can put it into a separate document. I thought the global command would work but it only copies the first matching line, does anyone know a command to do this? I don't see any Vim primitives to work with multi-line matches. I think the searchpos() function should be extended to return the [line, col] of the end of the match as well. May be I am missing something, but in the absence of primitives, you can probably write a function which will try to guess what the matching lines are, something like this (only partly tested): None of this is necessary. The simple solution is to use the uppercase name of a register, which appends to the register, rather than the lower case version, which replaces. I think the point of the question was how to yank multiple lines corresponding to multi-line pattern. For single-line pattern, you're right, it's trivial. Yakov What about (untested) :s/foo\_.{-}bar/\=(submatch(0) . nr2char(min([0, setreg(@, submatch(0), c)]))) - execute it with the cursor on the line where the match starts - all on one line - the part after the dot is supposed to append the empty string to the replace by text while setting the unnamed register to the matched text To put it into a separate document then: :new :0put :wq Best regards, Tony.
Re: Search and replace as per format
Srinivas Rao. M wrote: Hi Tim, Charles, I am rather looking at a generic substitution where the number of open quotes are matched, and then add an argument to log(). IN a generic aproach we may have a variable number of arguments, just like thwe way printf() supports. The strings like module name, LOG_LEVEL_DEBUG, and The Value of status= can be anything. All these needs to be substituted in the .c files. regards, Srini... On Tue, 2006-09-05 at 12:54 -0400, Charles E Campbell Jr wrote: Srinivas Rao. M wrote: Hi Vimmers, I am tasked to replace the pattern log(module_name, LOG_LEVEL_DEBUG, The Value of status=%d message, status); to log(module_name, LOG_LEVEL_DEBUG, %s:The Value of status=%d message,__FUNCTION__, status); [...] Well, please describe exactly what you want to do, and in particular, how to determine which string(s) to modify (like The Value of... and which not to (like module name). I suspect the problem can be solved with an :args command (such as :args **/*.[ch]) followed by :argdo g/\log(/s/something/something/g. Possibly wrapping it in a function if things like __FUNCTION__ must be specified on each invocation. Best regards, Tony.
Re: Yanking multi-line pattern matches
On 9/6/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 9/6/06, Druce, Richard [EMAIL PROTECTED] wrote: I'm trying to select all the text matching a (multi-line) pattern so I can put it into a separate document. I thought the global command would work but it only copies the first matching line, does anyone know a command to do this? :g/multi-line-pattern/normal v//eAy There was error in the command above. Working command is: let @a='' clear the register :silent! g/multi-line-pattern/exe normal v//e\n\Ay This accumulates multi-lines containing multiline patterns into register A. Explanation: v//e turn current pattern into visual selection Ay append visual selection to register A For best results, make pattern match up to and including the trailing \n of the last line of the mathing line (append .*\n if needed). Otherwise, last substring of the previous match will merge with first substring of next match in A. Yakov
RE: [help?] ezmlm warning
I got exactly the same message. No explanation, such messages come occassionally, very annoying. ---Zdenek -Original Message- From: Max Dyckhoff [mailto:[EMAIL PROTECTED] Sent: 05 September 2006 17:48 To: vim@vim.org Subject: [help?] ezmlm warning Has anyone else had this problem? Looking at the bounce message at the bottom shows that 131.107.1.8 (Microsoft's mail server) doesn't like 160.45.45.151 (is this the mailing list server?) because it is listed on spamcop (although a quick check of spamcop shows that isn't true). Anything I should be doing? Cheers, Max -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 05, 2006 8:36 AM To: Max Dyckhoff Subject: ezmlm warning Hi! This is the ezmlm program. I'm managing the vim@vim.org mailing list. Messages to you from the vim mailing list seem to have been bouncing. I've attached a copy of the first bounce message I received. If this message bounces too, I will send you a probe. If the probe bounces, I will remove your address from the vim mailing list, without further notice. I've kept a list of which messages from the vim mailing list have bounced from your address. Copies of these messages may be in the archive. To retrieve a set of messages 123-145 (a maximum of 100 per request), send an empty message to: [EMAIL PROTECTED] To receive a subject and author list for the last 100 or so messages, send an empty message to: [EMAIL PROTECTED] Here are the message numbers: 68464 ... 68686 --- Enclosed is a copy of the bounce message I received. Return-Path: Received: (qmail 658 invoked for bounce); 24 Aug 2006 21:56:46 - Date: 24 Aug 2006 21:56:46 - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: failure notice Hi. This is the qmail-send program at foobar.math.fu-berlin.de. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out. [EMAIL PROTECTED]: 131.107.1.8 does not like recipient. Remote host said: 550 5.7.1 Email rejected because 160.45.45.151 is listed by bl.spamcop.net. Please see http://www.spamcop.net/bl.shtml for more information. If you still need assistance contact [EMAIL PROTECTED] Giving up on 131.107.1.8.
man pages in gvim
Hello! If I hit K in normal mode, then I get man page for the word I'm in. But in gvim this does not quite work. First I get the warning Terminal is not fully functional, and then comes the man page with formatting like this [1mSYNOPSIS[0m [1m#include sys/poll.h[0m [1mint poll(struct pollfd *[4m[22mufds[24m[1m, unsigned int [4m[22mnfds[24m[1m, int [4m[22mtimeout[24m[1m);[0m [1mDESCRIPTION[0m AFAIK, this is the preformatted man page. If I look at the man file, then I see exactly that. Out of curiousity, I've tried to use the tip 167 (I believe) to redirect output of man into vim, but got very similar result. On the other hand hitting K in terminal vim displays the page correctly. Do I miss some settings? vim-7.0. Thank you -- Minds, like parachutes, function best when open
Re: man pages in gvim
I don't know how to fix the problem, but I use manpageview.vim(http://vim.sourceforge.net/scripts/script.php?script_id) to view man page, info page, python docs, perl docs and more(the plugin is configurable to view other help docs similiar with man page). It works perfectly. Suggest you give it a try. Best regards, Vincent http://vincent:8080/lps-3.1/my-apps/sportbook-trunk/src/livebet/bo-client/index.lzx?debug=truelzr=swf6game_id=99livebet_bo_xml_external_host=vincentlivebet_bo_xml_external_port=8107livebet_bo_http_external_host=vincentlivebet_bo_http_external_port=8091lbfo_host0=vincentlbfo_xml_port0=8007lbfo_http_port0=8097bo_server_ip=vincentbo_server_port=8090livebet_bo_use_secure_protocol=0session_id=21b145dddf9fbaaae269301a2720758alivebet_bo_client_sending_ack_interval=10Andrei A. Voropaev wrote: Hello! If I hit K in normal mode, then I get man page for the word I'm in. But in gvim this does not quite work. First I get the warning Terminal is not fully functional, and then comes the man page with formatting like this [1mSYNOPSIS[0m [1m#include sys/poll.h[0m [1mint poll(struct pollfd *[4m[22mufds[24m[1m, unsigned int [4m[22mnfds[24m[1m, int [4m[22mtimeout[24m[1m);[0m [1mDESCRIPTION[0m AFAIK, this is the preformatted man page. If I look at the man file, then I see exactly that. Out of curiousity, I've tried to use the tip 167 (I believe) to redirect output of man into vim, but got very similar result. On the other hand hitting K in terminal vim displays the page correctly. Do I miss some settings? vim-7.0. Thank you -- The tool that save the most labor in a programming project is probably a text-editing system -- The Mythical Man-Month Try to make life easier ... http://vincent-wang.livejournal.com
Re: man pages in gvim
On 9/6/06, Andrei A. Voropaev [EMAIL PROTECTED] wrote: Hello! If I hit K in normal mode, then I get man page for the word I'm in. But in gvim this does not quite work. First I get the warning Terminal is not fully functional, and then comes the man page with formatting like this [1mSYNOPSIS[0m I also get Terminal is not fully functional, but otherwise, contents of the manpage looks normal. This is FC5 fedora core linux, vim7.0.86/gtk2. The message Terminal is not fully functional comes from 'less' pager, it seems. Try these things: 1. export MANPAGER=more or set kp=man\ -P\ more 2. If that does not fix the problem, then try this: set kp=myman where myman is following 1-liner script which you need to puto put it into your PATH --- myman #!/bin/sh man $@ | col -b | more Yakov
html file to cvs
Hi all, I have the following problem: I have a huge pack of html files (1000) and I want to extract some info on cvs files. The html source looks like this: ./code / bSource:/b/code/ 338 (13): 853-860 MAR 26 1998nbsp;/code /bAddresses:/b/code/ a href=http:./code/ Northwestern Univ,/a/code /the above block is repeated =20 times. I want a cvs file that will look like this: 1998;Northwestern Univ; 1998;ETc; I tried few things but I cannot reach a working code. One of main issues is how discriminate years from 4digit pages, e.g 1987. I have attached a html source file (since it is impossible to cut paste the whole code here) but I've got a failure notice. I have published a html file in the following address: http://users.uoi.gr/npatsop/portal_002.htm Thanks in advance, Nikos -- Nikolaos A. Patsopoulos, MD Department of Hygiene and Epidemiology University of Ioannina School of Medicine University Campus Ioannina 45110 Greece Tel: (+30) 26510-97804 mobile: +30 6972882016 Fax: (+30) 26510-97867 (care of Nikolaos A. Patsopoulos) e-mail: [EMAIL PROTECTED]
Re: man pages in gvim
On Wed, Sep 06, 2006 at 09:44:22AM +, Yakov Lerner wrote: On 9/6/06, Andrei A. Voropaev [EMAIL PROTECTED] wrote: Hello! If I hit K in normal mode, then I get man page for the word I'm in. But in gvim this does not quite work. First I get the warning Terminal is not fully functional, and then comes the man page with formatting like this 1mSYNOPSIS0m I also get Terminal is not fully functional, but otherwise, contents of the manpage looks normal. This is FC5 fedora core linux, vim7.0.86/gtk2. The message Terminal is not fully functional comes from 'less' pager, it seems. Try these things: 1. export MANPAGER=more or set kp=man\ -P\ more Aha, that gave me an idea. After reading thru the man pages for man, I've found that it passes the formatting to grotty program. The man page for grotty says that newer version puts into the output escape sequences for colors and bold/italic. These are the ones that cause problems for col -b, since it does not recognize them. So col -b simply strips esc codes leaving all those pesky 1m and 0m behind. To overcome that problem one may add -c option in /etc/man.conf to the command lines for NROFF TROFF and JNROFF. Thank you for help -- Minds, like parachutes, function best when open
RE: quick and dirty compile
I have tested it and it works without any hitch on my system. (WinXp SP2 with Cygwin) Regards, Sibin -Original Message- From: A.J.Mechelynck [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 06, 2006 12:55 PM To: Sibin P. Thomas Cc: Yegappan Lakshmanan; vim@vim.org Subject: Re: quick and dirty compile Sibin P. Thomas wrote: Thank a lot to everyone! I added the following to my _vimrc file to get what I wanted nmap C-F9 :MakecompileCR nmap F5 :MakexecCR :!%.exeCR command Makecompile :se makeprg=gcc\ -o\ %.o\ % | :make! command Makexec :se makeprg=gcc\ -o\ %\ % | :make! Regards, Sibin We're not within a makefile: I don't believe % will be interpreted. Passing %.o (with % interpreted by Vim) to the shell would mean the current file, and read stdio from a file named .o. Use %:r.o or, if it doesn't work, command Makexec -nargs=0 -bar \ exe 'set makeprg=gcc\ -o\ ' \ . fnamemodify(expand('%'),':p:r') \ . '.o\ ' \ . expand('%') \ | make! with single quotes to avoid interpretation of backslashes before the :set command. See :help filename-modifiers Best regards, Tony. - Disclaimer - This message(including attachment if any)is confidential and may be privileged.Before opening attachments please check them for viruses and defects.MindTree Consulting Private Limited (MindTree)will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside.If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission. -
Re: Smarter Indent (an odd problem)
Let me take this opportunity to try once again to drum up support for an idea that I have proposed before. IMO it is too restrictive to make options (such as syntax highlighting, 'textwidth', and indent-related options) apply to a whole file. There should be a convenient, consistent way to tell vim to treat different sections of a file as having different file types. Examples: * code snippets in an e-mail * PHP in an HTML file (or vice-versa) * perl/python/ruby inside a vim script * comments, text, and math inside LaTeX/plain TeX/conTeXt --Benji Fisher Something like Textmate's scope selectors? http://macromates.com/textmate/manual/scope_selectors I'm not a Mac user, just read about it. Andy ___ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Re: quick and dirty compile
Sibin P. Thomas [EMAIL PROTECTED] wrote: If you are compiling with gmake, and there is no Makefile in your directory, a simple nnoremap F5 :make %cr should be enough. BTW, 'makeprg' is meant to be defined in terms of $*. Then, we can define the mapping to pass % to :make. -- Luc Hermitte
Re: Smarter Indent (an odd problem)
On 8/7/06, Benji Fisher [EMAIL PROTECTED] wrote: On Sat, Aug 05, 2006 at 02:24:45PM -0400, JStrom wrote: Recently though, I noticed that the PHP formatting also uses the HTML formatting code, and I do like PHP's smart-indentation. Is there some way I can tell vim to bring the indentation settings back alive within the ?php ... ? tags? Let me take this opportunity to try once again to drum up support for an idea that I have proposed before. IMO it is too restrictive to make options (such as syntax highlighting, 'textwidth', and indent-related options) apply to a whole file. There should be a convenient, consistent way to tell vim to treat different sections of a file as having different file types. Examples: * code snippets in an e-mail * PHP in an HTML file (or vice-versa) * perl/python/ruby inside a vim script * comments, text, and math inside LaTeX/plain TeX/conTeXt True. I use perl -e perl scripts embedded into shell scripts, and I am missing perl syntax inside shell scripts. OTOH, it is possible in vim. What is missing here is some doc section in the syntax.vim doc. Doc sestion that'd describe the official recommended method of embedding one syntax (filetype) into another; like php syntax includes the html syntax. Yakov
mixed filetypes (was: Smarter Indent)
On Wed, Sep 06, 2006 at 11:54:23AM +, Yakov Lerner wrote: On 8/7/06, Benji Fisher [EMAIL PROTECTED] wrote: Let me take this opportunity to try once again to drum up support for an idea that I have proposed before. IMO it is too restrictive to make options (such as syntax highlighting, 'textwidth', and indent-related options) apply to a whole file. There should be a convenient, consistent way to tell vim to treat different sections of a file as having different file types. Examples: * code snippets in an e-mail * PHP in an HTML file (or vice-versa) * perl/python/ruby inside a vim script * comments, text, and math inside LaTeX/plain TeX/conTeXt True. I use perl -e perl scripts embedded into shell scripts, and I am missing perl syntax inside shell scripts. OTOH, it is possible in vim. What is missing here is some doc section in the syntax.vim doc. Doc sestion that'd describe the official recommended method of embedding one syntax (filetype) into another; like php syntax includes the html syntax. Syntax coloring can be made to work, but what about options, key mappings, etc.? If you use omnicompletion in your perl files, wouldn't you like it to work when you are embedding perl in a shell script? HTH --Benji Fisher
Re: mixed filetypes (was: Smarter Indent)
On 9/6/06, Benji Fisher [EMAIL PROTECTED] wrote: On Wed, Sep 06, 2006 at 11:54:23AM +, Yakov Lerner wrote: On 8/7/06, Benji Fisher [EMAIL PROTECTED] wrote: Let me take this opportunity to try once again to drum up support for an idea that I have proposed before. IMO it is too restrictive to make options (such as syntax highlighting, 'textwidth', and indent-related options) apply to a whole file. There should be a convenient, consistent way to tell vim to treat different sections of a file as having different file types. Examples: * code snippets in an e-mail * PHP in an HTML file (or vice-versa) * perl/python/ruby inside a vim script * comments, text, and math inside LaTeX/plain TeX/conTeXt True. I use perl -e perl scripts embedded into shell scripts, and I am missing perl syntax inside shell scripts. OTOH, it is possible in vim. What is missing here is some doc section in the syntax.vim doc. Doc sestion that'd describe the official recommended method of embedding one syntax (filetype) into another; like php syntax includes the html syntax. Syntax coloring can be made to work, but what about options, key mappings, etc.? If you use omnicompletion in your perl files, wouldn't you like it to work when you are embedding perl in a shell script? I believe this all can be done using CursorMoved event, in the script-land. An idea for ambitious plugin ? Yakov
au event at subwindow resize ?
Which autoevent do I get when subwindow is resized like at Ctrl-W+ ? Yakov
write line number to STDOUT
When a text file is reopened with vim, the cursor appears where it was left last time. But this is not robust, at least to my experience (at least when vim is updated, I've lost information about the position of the cursor). So, unless there is a way to really keep the information, I would like to make a script (in Perl, probably) that would work like this: readwithvim mytextfile The script readwithvim would read a text file containing the last line number (saved last time the script was used) and would call vim to open the text file mytextfile in that line number (this part is easy). On quitting vim, the current line number should be written to a text file. This is the part I don't know how to implement. It had to execute a script on exit, and it had to pass the line number to the script... On the other hand, if vim could write the line number to STDOUT on exit, the value could be catched by the parent script readwithvim. Any idea? -- Jorge Almeida
Re: [help?] ezmlm warning
yeah i also get them, and it also happens on other lists i'm on too (php user mail list). --Brendon On 9/6/06, Zdenek Sekera [EMAIL PROTECTED] wrote: I got exactly the same message. No explanation, such messages come occassionally, very annoying. ---Zdenek -Original Message- From: Max Dyckhoff [mailto:[EMAIL PROTECTED] Sent: 05 September 2006 17:48 To: vim@vim.org Subject: [help?] ezmlm warning Has anyone else had this problem? Looking at the bounce message at the bottom shows that 131.107.1.8 (Microsoft's mail server) doesn't like 160.45.45.151 (is this the mailing list server?) because it is listed on spamcop (although a quick check of spamcop shows that isn't true). Anything I should be doing? Cheers, Max -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 05, 2006 8:36 AM To: Max Dyckhoff Subject: ezmlm warning Hi! This is the ezmlm program. I'm managing the vim@vim.org mailing list. Messages to you from the vim mailing list seem to have been bouncing. I've attached a copy of the first bounce message I received. If this message bounces too, I will send you a probe. If the probe bounces, I will remove your address from the vim mailing list, without further notice. I've kept a list of which messages from the vim mailing list have bounced from your address. Copies of these messages may be in the archive. To retrieve a set of messages 123-145 (a maximum of 100 per request), send an empty message to: [EMAIL PROTECTED] To receive a subject and author list for the last 100 or so messages, send an empty message to: [EMAIL PROTECTED] Here are the message numbers: 68464 ... 68686 --- Enclosed is a copy of the bounce message I received. Return-Path: Received: (qmail 658 invoked for bounce); 24 Aug 2006 21:56:46 - Date: 24 Aug 2006 21:56:46 - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: failure notice Hi. This is the qmail-send program at foobar.math.fu-berlin.de. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out. [EMAIL PROTECTED]: 131.107.1.8 does not like recipient. Remote host said: 550 5.7.1 Email rejected because 160.45.45.151 is listed by bl.spamcop.net. Please see http://www.spamcop.net/bl.shtml for more information. If you still need assistance contact [EMAIL PROTECTED] Giving up on 131.107.1.8.
Re: write line number to STDOUT
On Wed, 6 Sep 2006, Yakov Lerner wrote: Are you on Windows ? No way! On unix/linux, it's dubious you would lose viminfo contents (that' where cursor positions come from) when upgrading vim. I upgrade vim often, and I never lose cursor positions (linux). Well, I did more than once, but I can't garantee the upgrading had something to do with it. Maybe too much time passed before revisiting the same file... Find out where is your viminfo file stored, and use n flag of 'viminfo' option (:help 'viminfo' and scroll down to flag n) to keep this file in the location which is not overwritten (like c:\viminfo ) Didn't know about that file. It's in ~/.viminfo. I think a session file would be more appropriate. But the manual is not clear to me: If I start vim as vim -S vimbook.vim, will the file vimbook.vim be automaticaly updated when exiting vim? Thanks. Jorge
Re: write line number to STDOUT
Jorge Almeida wrote: On Wed, 6 Sep 2006, Yakov Lerner wrote: Are you on Windows ? No way! On unix/linux, it's dubious you would lose viminfo contents (that' where cursor positions come from) when upgrading vim. I upgrade vim often, and I never lose cursor positions (linux). Well, I did more than once, but I can't garantee the upgrading had something to do with it. Maybe too much time passed before revisiting the same file... The viminfo file holds mark positions for a finite number of files. How many can be set via the 'viminfo' option (q.v.). If the file is pushed too far away in history, you lose marks cursor position, and the next time you edit it the cursor is at the top of the file. Find out where is your viminfo file stored, and use n flag of 'viminfo' option (:help 'viminfo' and scroll down to flag n) to keep this file in the location which is not overwritten (like c:\viminfo ) Didn't know about that file. It's in ~/.viminfo. I think a session file would be more appropriate. But the manual is not clear to me: If I start vim as vim -S vimbook.vim, will the file vimbook.vim be automaticaly updated when exiting vim? Thanks. Jorge A viminfo in your home directory won't be overwritten by an upgrade. You can set your viminfo anywhere, see :help 'viminfo' :help :rviminfo :help :wviminfo After vim -S vimbook.vim I don't think it will be updated at exit, UNLESS you add the following to your vimrc: :au VimLeave * \ if exists(v:this_session) \ v:this_session != \ | exe mksession v:this_session \ | endif (you can write it all on one line without \ line continuators but this way our mailers won't try to beautify it). Best regards, Tony.
Re: Vim BOF session
I'd still like to see Vince Negri's ideas (ownsyntax, conceal) included. Regards, Chip Campbell
Re: [help?] ezmlm warning
* Zdenek Sekera [EMAIL PROTECTED] [060906 04:13]: I got exactly the same message. No explanation, such messages come occassionally, very annoying. ---Zdenek This happens to me occasionally, too, but the text of the message seems pretty clear to me. I run my own mail server, though, so perhaps I am more familiar with what it is talking about, so I'll explain. The vim mailing list program, ezmlm, receives a message to the vim mailing list. It then sends it to each subscriber. When it is sending the message to you, it is talking to your ISP's mail server. Your ISP's mail server decides that the message is spam (sometimes why it does this is the big question). Your ISP's mail server rejects the mail during the SMTP conversation (the protocol used to transfer messages from one mail server, ezmlm in this case, to another, your ISP) or it bounces the mail (sends a message to the ezmlm server saying the message was not delivered) after the SMTP conversation is complete. It is actually common practice to send bounce messages for suspect mail even when the message is actually delivered (or put in the recipient's spam folder). The ezmlm server, when it sees several bounces or rejections from the same email address, decides it better investigate. It sends the message you see (Subject: ezmlm warning) telling you that some messages to you have bounced. If that message doesn't bounce, then the ezmlm server ignores the bounces and continues to deliver vim list mail to you normally. If that message does bounce, then it sends one more message to you. If that second warning bounces also, you are removed from the vim mailing list. The purpose of the probes is to be able to automatically clean up dead email addresses from the vim mailing list. If you receive the message, then you can safely ignore it. However, if mail from the list stops soon after receiving such a mail, then perhaps your ISP delivered the message but also bounced it; you should then check with your ISP. ...Marvin
C:\Temp permission issues with taglist
I'm using the taglist plugin and am running into the following issue: Error detected while processing function SNR16_Tlist_Window_Toggle..SNR16_TList_Window_Open..SNR ...[snip] line 57: E484: Can't open file C:/Temp/VIo10A9.tmp I've tried fiddling with the permissions of C:\temp but no luck. Any idea of what's happening? Thanks. Stephen
Re: Problem with 'lisp' and commented sexps
Yang wrote: There seems to be an 'undocumented feature' when editing Lisp files with the 'lisp' option set. I can no longer % between matching s-expressions []{}() if they are in comments and on newlines, e.g. in: ;; myfold {{{ (blah blah) ;; }}} ;; (blah ;; blah) I can't jump between the {} or the second (). Is this a bug? Its definitely controlled by the lisp option: (I put your example into yank.lsp) vim -u NONE -N yang.lsp (% key works on all {} and ()) :syn on (% key works on all {} and ()) :set lisp (problems you mentioned appear) Because of the -u NONE, the matchit plugin doesn't enter into this. The syntax file has no explicit interaction with matchit or %, so it appears to be an undocumented vim feature. Regards, Chip Campbell
Re: Syntax question regarding \%[
Yakov Lerner wrote: Even better would be use syn keyword: syn keyword Error int inte integ intege integer inter interv interva interval On the other hand, both of your 'syn match'es use same group, so why 2nd match taking over would be a problem anyway ? Probably syn keyword Error inte[ger] inte[rval] would work just as well as Yakov's; however, his question seems to me to be pertinent! Regards, Chip Campbell
Re: write line number to STDOUT
On 9/6/06, Jorge Almeida [EMAIL PROTECTED] wrote: On Wed, 6 Sep 2006, Yakov Lerner wrote: Are you on Windows ? No way! On unix/linux, it's dubious you would lose viminfo contents (that' where cursor positions come from) when upgrading vim. I upgrade vim often, and I never lose cursor positions (linux). Well, I did more than once, but I can't garantee the upgrading had something to do with it. Maybe too much time passed before revisiting the same file... Number of files for which ~/.viminfo remembers positions is ' flag of 'viminfo' option. My value for this is 20 (:set viminfo?). Looks like this 20 is too low for you. Just increase it sharply in your ~/.vimrc; if you want 500 instead of 20, set it to 500. For me, meager 20 is enough. This is probably what's causing you problems, *not* the vim updates. There is no way that vim update would overwrite the ~/.viminfo file. Yakov
Re: Modify flag
Yakov Lerner wrote: On 9/2/06, Shashi Kumar [EMAIL PROTECTED] wrote: How can I disable automatic setting of the modified flag or auto save option? I have set some option with which I think VIM is automatically saving the file thus changing the timestamp of the file. This poses a problem when I open header files especially when the target I need to build has a lot of source files. The problem occurs even when I open the file using gview. I use VIM on Windows XP and my _vimrc and _gvimrc are attached. Do you set 'auwowrite' (aw) option, and/or 'autowriteall'(awa) option ? Then just unset them. If you don't set those two options, then see if they are set: :verbose set aw :verbose set awa which will tell you both what they're set to and where they were last set (if set). Regards, Chip Campbell
Re: [BUG?] Syntax question regarding \%[
inte integ intege integer inter interv interva interval is there any easy way to make these two commands work? syntax match Error /int\%[eger]/ syntax match Error /int\%[erval]/ The second match begins taking priority as soon as the word is 'inte', and prevents 'integer' from being matched correctly. Your problem is that both patterns match int and inte, resulting in ambiguity. I think solution is to separate 'int' and 'inte' as separate matches, whcih results in unambiguous matching: syntax match Error /integ\%[er]/ syntax match Error /inter\%[val]/ syntax match Error /\int\%[e]\/ (untested) I suspect, in testing ideas on this, I may have turned up a bug in either the implementation of \%[] or its documentation needs a remedy. In theory, the following should work: :match Error /int\%[\(eger\|erval\)]/ I base that assumption on a combination of these two pieces of the help: From :help /\%[] one finds that this syntax matches a list of optionally matched atoms. (note atoms, not ordinary atoms) So what's an atom? We jump over to :help atom where we read that an atom is atom::=ordinary-atom |/ordinary-atom| or \( pattern \) |/\(| or \%( pattern \) |/\%(| or \z( pattern \) |/\z(| and that a pattern is (according to :help pattern) pattern ::= branch or branch \| branch or branch \| branch \| branch etc. Thus, my understanding of it is that one should be perfectly allowed to use a \(...\|...\) atom within a \%[] expression. If this is not the case, the help for \%[] may likely intend to refer to ordinary atoms rather than atoms. *However*, the above search/match expression returns an E369: invalid item in \%[] error. I get this both in vim6.3 and vim7. -tim
Re: write line number to STDOUT
On Wed, 6 Sep 2006, Yakov Lerner wrote: This is probably what's causing you problems, *not* the vim updates. There is no way that vim update would overwrite the ~/.viminfo file. You're right. I'll use session files, rather than change the viminfo limit. Thank you. Jorge
Re: quick and dirty compile
Hi, On 9/6/06, A.J.Mechelynck [EMAIL PROTECTED] wrote: Sibin P. Thomas wrote: Thank a lot to everyone! I added the following to my _vimrc file to get what I wanted nmap C-F9 :MakecompileCR nmap F5 :MakexecCR :!%.exeCR command Makecompile :se makeprg=gcc\ -o\ %.o\ % | :make! command Makexec :se makeprg=gcc\ -o\ %\ % | :make! We're not within a makefile: I don't believe % will be interpreted. Passing %.o (with % interpreted by Vim) to the shell would mean the As explained under the help for :make_makeprg: --xxx- {makeprg} is the string given with the 'makeprg' option. Any command can be used, not just make. Characters '%' and '#' are expanded as usual on a command-line. You can use % to insert the current file name without extension, or # to insert the alternate file name without extension. --xxx- You can use % and # in the 'makeprg' setting for the current and alternate file name without the extension. - Yegappan
Re: C:\Temp permission issues with taglist
Hi, On 9/6/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm using the taglist plugin and am running into the following issue: Error detected while processing function SNR16_Tlist_Window_Toggle..SNR16_TList_Window_Open..SNR ...[snip] line 57: E484: Can't open file C:/Temp/VIo10A9.tmp I've tried fiddling with the permissions of C:\temp but no luck. Any idea of what's happening? Thanks. You can try the steps described in the following page: http://www.geocities.com/yegappan/taglist/faq.html - Yegappan
Re: html file to cvs
I don't fully understand what you mean by a cvs file whether that refers to a congruent visioning file or if you meant a comma separated values file. Based on the sample output I'm assuming a CSV file using semi-colons. I choose PERL at the Swiss-Army knife of scripts and was able to whip up a parser in about fifteen minutes. attached is what I came up with. I left the loading of multiple files to the student. I used mainly regular expressions so it could be ported to VIM script in theory but this type of parsing would be better suited for a scripting language not an editor. Hope this gives some inspiration. On Sep 6, 2006, at 06:14, Nikolaos A. Patsopoulos wrote: I have a huge pack of html files (1000) and I want to extract some info on cvs files. #!/usr/bin/perl # Very simple script to parse a specific styled HTML document and output a file # parsed with a delimiter. # # The folowing are the settings. Pick what you need. Using command line # arguments left for the student. $file = portal_002.htm; $output = out.csv; $csv_delim = ';'; $quiet = 0; # set this to 1 to stop debug output $months_pat = (JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC); ## sub msg { my $str = shift; my $line_no = shift; if (!$quiet) { print $str; if ($line_no ne ) { print (line: $line_no); } print \n; } } $line_no = 0; # used to track the line number. open FD, $file || die Could not open file; open OUT, $output || die Unable to open output file; while ($line = FD) { $line_no++; if ($line =~ /Source:/i) { $line =~ /$months_pat\s+[0-9]+\s+([0-9]+)/i; $year = $2; msg (Found 'Source:'; Year = $year, $line_no); } elsif ($line =~ /Addresses:/i) { $line =~ /a(\s.+?)?(.+?)\/a/i; $univ = $2; $univ =~ s/^\s+//; $univ =~ s/(\s+|[,;])$//; # pull out the HTML amp; $univ =~ s/amp;//gi; msg ( Child Found 'Addresses:'; Univ = $univ, $line_no); # Since this should be the end of the record write to file. print OUT $year$csv_delim$univ$csv_delim\n; } } close OUT; close FD; msg (Done. (Parsed $line_no lines) CSV output to $output, );
Re: au event at subwindow resize ?
Hi Yakov, On 9/6/06, Yakov Lerner [EMAIL PROTECTED] wrote: Which autoevent do I get when subwindow is resized like at Ctrl-W+ ? I don't think an autocmd is invoked when a Vim subwindow is resized. - Yegappan
Re: html file to cvs
Devin Weaver wrote: I don't fully understand what you mean by a cvs file whether that refers to a congruent visioning file or if you meant a comma separated values file. Based on the sample output I'm assuming a CSV file using semi-colons. I choose PERL at the Swiss-Army knife of scripts and was able to whip up a parser in about fifteen minutes. attached is what I came up with. I left the loading of multiple files to the student. I used mainly regular expressions so it could be ported to VIM script in theory but this type of parsing would be better suited for a scripting language not an editor. Hope this gives some inspiration. On Sep 6, 2006, at 06:14, Nikolaos A. Patsopoulos wrote: I have a huge pack of html files (1000) and I want to extract some info on cvs files. #!/usr/bin/perl # Very simple script to parse a specific styled HTML document and output a file # parsed with a delimiter. # # The folowing are the settings. Pick what you need. Using command line # arguments left for the student. $file = portal_002.htm; $output = out.csv; $csv_delim = ';'; $quiet = 0; # set this to 1 to stop debug output $months_pat = (JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC); ## sub msg { my $str = shift; my $line_no = shift; if (!$quiet) { print $str; if ($line_no ne ) { print (line: $line_no); } print \n; } } $line_no = 0; # used to track the line number. open FD, $file || die Could not open file; open OUT, $output || die Unable to open output file; while ($line = FD) { $line_no++; if ($line =~ /Source:/i) { $line =~ /$months_pat\s+[0-9]+\s+([0-9]+)/i; $year = $2; msg (Found 'Source:'; Year = $year, $line_no); } elsif ($line =~ /Addresses:/i) { $line =~ /a(\s.+?)?(.+?)\/a/i; $univ = $2; $univ =~ s/^\s+//; $univ =~ s/(\s+|[,;])$//; # pull out the HTML amp; $univ =~ s/amp;//gi; msg ( Child Found 'Addresses:'; Univ = $univ, $line_no); # Since this should be the end of the record write to file. print OUT $year$csv_delim$univ$csv_delim\n; } } close OUT; close FD; msg (Done. (Parsed $line_no lines) CSV output to $output, ); No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.11.7/438 - Release Date: 5/9/2006 Thanks for the time and effort. I work on WinXP machine and cannot brag for my Perl knowledge. From the very few code I can understand it seems that you are close to what I want to do but much are missing. I'm sorry but I'm unable to follow a Perl script. Thanks, Nikos
Re: mixed filetypes (was: Smarter Indent)
Dnia środa, 6 września 2006 14:22, Benji Fisher napisał: If you use omnicompletion in your perl files, wouldn't you like it to work when you are embedding perl in a shell script? This can be done already. In fact I've done it in php/js/html/css omnicompletion plugins. But it requires some imagination from script author and isn't easily extendible so some improvements would be nice. Almost perfect for this purposes was patch for GetChar autocommand but it was sent just before vim7 release :( m.
Re: vim 7 errors
Paul van Erk wrote: More info; I found this in my .(g)vimrc : set matchpairs+=?::,=:; so that's: PLUS EQUALS QUESTION_MARK COLON COLON COMMA EQUALS COLON SEMICOLON It's been in there for ages (checked some backups and I've had my rc file for 2 years or so, I think) and never gave me any problems. Does anyone know what it's supposed to do and what the syntax should be? For now I'll comment it out, so the errors are gone. OK, now I can reproduce it. This patch will fix the problem: *** ../vim-7.0.090/runtime/plugin/matchparen.vimTue Aug 8 18:08:54 2006 --- runtime/plugin/matchparen.vim Wed Sep 6 20:43:30 2006 *** *** 44,50 let before = 0 let c = getline(c_lnum)[c_col - 1] ! let plist = split(matchpairs, ':\|,') let i = index(plist, c) if i 0 not found, in Insert mode try character before the cursor --- 44,50 let before = 0 let c = getline(c_lnum)[c_col - 1] ! let plist = split(matchpairs, '.\zs\([:,]\|$\)') let i = index(plist, c) if i 0 not found, in Insert mode try character before the cursor -- GUARD #2: It could be carried by an African swallow! GUARD #1: Oh, yeah, an African swallow maybe, but not a European swallow, that's my point. GUARD #2: Oh, yeah, I agree with that... The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: [BUG?] Syntax question regarding \%[
Tim Chase wrote: I suspect, in testing ideas on this, I may have turned up a bug in either the implementation of \%[] or its documentation needs a remedy. In theory, the following should work: :match Error /int\%[\(eger\|erval\)]/ I base that assumption on a combination of these two pieces of the help: From :help /\%[] one finds that this syntax matches a list of optionally matched atoms. (note atoms, not ordinary atoms) So what's an atom? We jump over to :help atom where we read that an atom is atom::= ordinary-atom |/ordinary-atom| or \( pattern \) |/\(| or \%( pattern \) |/\%(| or \z( pattern \) |/\z(| and that a pattern is (according to :help pattern) pattern ::= branch or branch \| branch or branch \| branch \| branch etc. Thus, my understanding of it is that one should be perfectly allowed to use a \(...\|...\) atom within a \%[] expression. If this is not the case, the help for \%[] may likely intend to refer to ordinary atoms rather than atoms. *However*, the above search/match expression returns an E369: invalid item in \%[] error. I get this both in vim6.3 and vim7. The documentation omits to mention that \(\) things are not allowed inside \%[]. It also doesn't nest. -- MORTICIAN:Bring out your dead! [clang] Bring out your dead! [clang] Bring out your dead! CUSTOMER: Here's one -- nine pence. DEAD PERSON: I'm not dead! The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: bug in confirm() and default option
Hari Krishna Dara wrote: Many GUIs don't support a dialog without a button selected. Disabling the use of Enter to select a button isn't a good idea either. Thus for some GUIs it simply won't work to have a dialog without a default. I know for sure Windows native UI supports dialogs without a default button, and Motif also should support this as well. I will in fact be surprised if GUIs always force the programmer to specify a default button, as there should be a choice not to have one (especially when there is a complex interface). On MS-Windows it works to avoid Enter selecting a default button, but Space still does. I doubt it is possible to disable this, it seems there always must be a button with the dashed line in it. In my case, I was trying to set no default button when I know there is some important information to read, but the user might routinely press Space or Enter to get rid off it. If the dialog doesn't get hidden, the user will more likely read it. Right now I resorted to doing an echohl with WarningMsg followed by an input(), but this introduces a drastic difference from the routine case where the user still sees a dialog. Using a zero default is supposed to do this, but there are implementation problems. Hopefully someone who knows the specific GUI library can find a solution. I don't work on these unusual GUI things, it takes too much of my time. -- MORTICIAN:What? CUSTOMER: Nothing -- here's your nine pence. DEAD PERSON: I'm not dead! MORTICIAN:Here -- he says he's not dead! CUSTOMER: Yes, he is. DEAD PERSON: I'm not! The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: [BUG?] Syntax question regarding \%[
If this is not the case, the help for \%[] may likely intend to refer to ordinary atoms rather than atoms. *However*, the above search/match expression returns an E369: invalid item in \%[] error. I get this both in vim6.3 and vim7. The documentation omits to mention that \(\) things are not allowed inside \%[]. It also doesn't nest. So should the documentation for \%[] be updated to read ordinary atoms rather than atoms then? Or are there additional items that can go in a \%[] that are some subset of atom but a superset of ordinary atoms? -tim
Re: [BUG?] Syntax question regarding \%[
Tim Chase wrote: If this is not the case, the help for \%[] may likely intend to refer to ordinary atoms rather than atoms. *However*, the above search/match expression returns an E369: invalid item in \%[] error. I get this both in vim6.3 and vim7. The documentation omits to mention that \(\) things are not allowed inside \%[]. It also doesn't nest. So should the documentation for \%[] be updated to read ordinary atoms rather than atoms then? Or are there additional items that can go in a \%[] that are some subset of atom but a superset of ordinary atoms? All atoms can be used except \(\), \%(\), \z(\) and \%[]. Basically things that nest. -- We do not stumble over mountains, but over molehills. Confucius /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: write line number to STDOUT
Jorge Almeida wrote: On Wed, 6 Sep 2006, A.J.Mechelynck wrote: The viminfo file holds mark positions for a finite number of files. How many Yes, that's what I suspected. After vim -S vimbook.vim I don't think it will be updated at exit, UNLESS you add the following to your vimrc: :au VimLeave * \ if exists(v:this_session) \ v:this_session != \ | exe mksession v:this_session \ | endif Not quite satisfactory... I wanted to save a session file only for the text files read via the script I mentioned (and they don't have a particular filetype). What would be really handy is a feature like the -c flag, but to execute a command at the _end_ of the session. I don't suppose there is such a feature, at least I couldn't find it in vim's unix man page. On the other hand... Could the above script (:au...) be modified to be executed only if some variable was set? I mean, some variable that could be set at start time via -c ? That would allow to filter out files not read via the script... (Sorry if this is trivial, but I'm not a _real_ programmer!) Thanks, Jorge To do something when closing down, place it in an autocommand for the VimLeave autocommand (as above). To do it during startup, place it in your vimrc. To do it at the cery end of startup, put it in an autocommand dor the VimEnter autocommand. And read the help (not the man page) if you can: for some reason my Vim won't read the help for me at this time. If you want to always start with the same session files, use :mksession once (see :help mksession) and maybe make an alias: alias vim='vim -S ~/session.vim' in your shell. Best regards, Tony.
Re: write line number to STDOUT
On Thu, 7 Sep 2006, A.J.Mechelynck wrote: To do something when closing down, place it in an autocommand for the VimLeave autocommand (as above). To do it during startup, place it in your vimrc. To do it at the cery end of startup, put it in an autocommand dor the VimEnter autocommand. And read the help (not the man page) if you can: for some reason my Vim won't read the help for me at this time. I solved my problem, based on the code you provided: I put this in my .vimrc: :au VimLeave * if exists(run_from_tread) | exe mksession! ./session.vim | endif The variable run_from_tread is set at start, because vim is invoked with -S Session.vim. The perl script changes directory to a directory dependent on the text file to read. Hence, Session.vim is exclusive to that file. On exit, the session is written to session.vim, and the parent script concatenates :let run_from_tread=1 with session.vim into Session.vim. It works, and the normal behaviour of vim (regarding other files) is not affected. If you want to always start with the same session files, use :mksession once (see :help mksession) and maybe make an alias: alias vim='vim -S ~/session.vim' in your shell. Thanks. Regards, Jorge
Re: Syntax question regarding \%[
Hello everyone, Thank you for your help ... syn keyword Error inte[ger] inte[rval] Unfortunately I need to use matches because the 'words' contain the '.' character, and I also need to be able to use a look-behind assertion. The thing is, I wanted to be able to write each match so that it is fairly independent of the previous one, because it is very easy to generate this automatically from an array of strings: syntax match phpIniKey /[']\@=s\%[ession\.cache_expire]/ syntax match phpIniKey /[']\@=s\%[ession\.cache_limiter]/ syntax match phpIniKey /[']\@=s\%[ession\.cookie_domain]/ syntax match phpIniKey /[']\@=s\%[ession\.cookie_httponly]/ syntax match phpIniKey /[']\@=s\%[ession\.cookie_lifetime]/ syntax match phpIniKey /[']\@=s\%[ession\.cookie_path]/ syntax match phpIniKey /[']\@=s\%[ession\.cookie_secure]/ Unfortunately, the last match always takes priority, so something like this: 'session.cache_ex' it gets matched by the last item and the highlighting goes as far as 'session.c'. The only solution I can come up with is to write the patterns like this: syntax match phpIniKey /[']\@=s\%[ession\.cache_expire]/ syntax match phpIniKey /[']\@=session\.cache_l\%[imiter]/ syntax match phpIniKey /[']\@=session\.co\%[okie_domain]/ syntax match phpIniKey /[']\@=session\.cookie_h\%[ttponly]/ syntax match phpIniKey /[']\@=session\.cookie_l\%[ifetime]/ syntax match phpIniKey /[']\@=session\.cookie_p\%[ath]/ syntax match phpIniKey /[']\@=session\.cookie_s\%[ecure]/ This way, the newer matches only take priority when they are long enough to be different from the previous match. But that is much more complicated to generate, and I really wanted to avoid comlexity. regards, Peter On Yahoo!7 Check out the new Great Outdoors site with video highlights and more http://au.travel.yahoo.com/great-outdoors/index.html
completeopt issue
Hey All, I'm not sure if this is a bug or if I'm missing something. In my _vimrc file I have: completeopt=preview because I would like to have the preview window to see the function arguments and the return types, but I don't want to have the menu popup (I prefer to cycle through the available choices in the command window). With completeopt set the way I have I don't get the menu, but unfortunately I don't get the preview window either. I'm running version 7.0.90 (compiling .91 shortly) on Windows XP compiled from source with MinGW. Any help would be greatly appreciated, thanx! Chris -- Chris Sutcliffe http://ir0nh34d.googlepages.com http://ir0nh34d.blogspot.com http://emergedesktop.org
Re: Syntax question regarding \%[
Peter Hodge wrote: Hello everyone, Thank you for your help ... syn keyword Error inte[ger] inte[rval] Unfortunately I need to use matches because the 'words' contain the '.' character, and I also need to be able to use a look-behind assertion. The thing is, I wanted to be able to write each match so that it is fairly independent of the previous one, because it is very easy to generate this automatically from an array of strings: syntax match phpIniKey /[']\@=s\%[ession\.cache_expire]/ syntax match phpIniKey /[']\@=s\%[ession\.cache_limiter]/ syntax match phpIniKey /[']\@=s\%[ession\.cookie_domain]/ syntax match phpIniKey /[']\@=s\%[ession\.cookie_httponly]/ syntax match phpIniKey /[']\@=s\%[ession\.cookie_lifetime]/ syntax match phpIniKey /[']\@=s\%[ession\.cookie_path]/ syntax match phpIniKey /[']\@=s\%[ession\.cookie_secure]/ Unfortunately, the last match always takes priority, so something like this: 'session.cache_ex' it gets matched by the last item and the highlighting goes as far as 'session.c'. The only solution I can come up with is to write the patterns like this: syntax match phpIniKey /[']\@=s\%[ession\.cache_expire]/ syntax match phpIniKey /[']\@=session\.cache_l\%[imiter]/ syntax match phpIniKey /[']\@=session\.co\%[okie_domain]/ syntax match phpIniKey /[']\@=session\.cookie_h\%[ttponly]/ syntax match phpIniKey /[']\@=session\.cookie_l\%[ifetime]/ syntax match phpIniKey /[']\@=session\.cookie_p\%[ath]/ syntax match phpIniKey /[']\@=session\.cookie_s\%[ecure]/ This way, the newer matches only take priority when they are long enough to be different from the previous match. But that is much more complicated to generate, and I really wanted to avoid comlexity. regards, Peter So, it matches a part-word. Try adding an end-of-word pattern atom \ before the ending slash (but after the ending bracket) on each line. You wouldn't want session.cookie_nomatch to be matched as far as session.cookie_ would you? Best regards, Tony.
Re: quick and dirty compile
Yegappan Lakshmanan wrote: Hi, On 9/6/06, A.J.Mechelynck [EMAIL PROTECTED] wrote: Sibin P. Thomas wrote: Thank a lot to everyone! I added the following to my _vimrc file to get what I wanted nmap C-F9 :MakecompileCR nmap F5 :MakexecCR :!%.exeCR command Makecompile :se makeprg=gcc\ -o\ %.o\ % | :make! command Makexec :se makeprg=gcc\ -o\ %\ % | :make! We're not within a makefile: I don't believe % will be interpreted. Passing %.o (with % interpreted by Vim) to the shell would mean the As explained under the help for :make_makeprg: --xxx- {makeprg} is the string given with the 'makeprg' option. Any command can be used, not just make. Characters '%' and '#' are expanded as usual on a command-line. You can use % to insert the current file name without extension, or # to insert the alternate file name without extension. --xxx- You can use % and # in the 'makeprg' setting for the current and alternate file name without the extension. - Yegappan Ah, I see. Forgot to follow the link from 'makeprg'. My bad. Best regards, Tony.
Re: write line number to STDOUT
Gene Kwiecinski wrote: The viminfo file holds mark positions for a finite number of files. How many can be set via the 'viminfo' option (q.v.). If the file is pushed Quick question: whut's the q.v. mean? /Quo vadis/? I've seen you use this before, but keep forgetting to ask... quod vide = Latin for which [you should] look up. From the Concise Oxford Dictionary (7th edition 1982, reprinted [...] 1987): q.v. abbr. = QUOD\2 vide quod\2 pron. [...] ~ vide, which see (in cross and other references). (L., = which, neut. of /qui/ who). If your unilingual or bilingual English dictionary doesn't mention it, get a better one ;-). Best regards, Tony.
Re: Syntax question regarding \%[
Hello, --- A.J.Mechelynck [EMAIL PROTECTED] wrote: So, it matches a part-word. Try adding an end-of-word pattern atom \ before the ending slash (but after the ending bracket) on each line. You wouldn't want session.cookie_nomatch to be matched as far as session.cookie_ would you? Sorry, it isn't that simple. I want to match as much as possible regardless of what comes next. What I am trying to do is: ?php ini_get('session.gc_maxlifetime'); There are only 150 or so possibilities for the argument to ini_get(), I am trying to highlight them. If I make a spelling mistake or put in the wrong item, then I would want to highlight the error: ?php // should only highlight 'session.gc_' as correct // 'axlifetime' highlights as Error ini_get('session.gc_axlifetime'); // the whole 'not.a_real_option' string should be higlighted as an error // (except for the quotes) ini_get('not.a_real_option'); So I use the following commands to set it all up: find the ini_get function syntax keyword phpFunctions ini_get contained nextgroup=phpIniParents syntax region phpIniParents contained matchgroup=Delimiter start=/(/ end=/)/ keepend \ contains=phpIniError highlight a string inside ini_get() as an Error syntax match phpIniError contained /(\@=\%(\\.\|[^]\)*\=/ [EMAIL PROTECTED] syntax match phpIniError contained /(\@='\%(\\.\|[^']\)*'\=/ [EMAIL PROTECTED] hi link phpIniError Error highlight string quotes inside ini_get() as a normal color syntax cluster phpIniInside add=phpIniQuotes syntax match phpIniQuotes contained /[']/ containedin=phpIniError hi link phpIniQuotes Define highlight settings and partial settings inside the string: - phpIniKey is a correct keyword - phpIniKeyPartial matches part of a keyword syntax cluster phpIniInside add=phpIniKey,phpIniKeyPartial syntax match phpIniKeyPartial contained /[']\@=S\%[MT]/ syntax match phpIniKeycontained /[']\@=SMTP/ syntax match phpIniKeyPartial contained /[']\@=a\%[llow_call_time_pass_referenc]/ syntax match phpIniKeycontained /[']\@=allow_call_time_pass_reference/ syntax match phpIniKeyPartial contained /[']\@=allow_u\%[rl_fope]/ syntax match phpIniKeycontained /[']\@=allow_url_fopen/ syntax match phpIniKeyPartial contained /[']\@=allow_url_i\%[nclud]/ syntax match phpIniKeycontained /[']\@=allow_url_include/ syntax match phpIniKeyPartial contained /[']\@=alw\%[ays_populate_raw_post_dat]/ syntax match phpIniKeycontained /[']\@=always_populate_raw_post_data/ syntax match phpIniKeyPartial contained /[']\@=ar\%[g_separator\.inpu]/ syntax match phpIniKeycontained /[']\@=arg_separator\.input/ syntax match phpIniKeyPartial contained /[']\@=arg_separator\.o\%[utpu]/ syntax match phpIniKeycontained /[']\@=arg_separator\.output/ syntax match phpIniKeyPartial contained /[']\@=as\%[p_tag]/ syntax match phpIniKeycontained /[']\@=asp_tags/ syntax match phpIniKeyPartial contained /[']\@=ass\%[ert\.activ]/ syntax match phpIniKeycontained /[']\@=assert\.active/ syntax match phpIniKeyPartial contained /[']\@=assert\.b\%[ai]/ syntax match phpIniKeycontained /[']\@=assert\.bail/ syntax match phpIniKeyPartial contained /[']\@=assert\.c\%[allbac]/ syntax match phpIniKeycontained /[']\@=assert\.callback/ syntax match phpIniKeyPartial contained /[']\@=assert\.q\%[uiet_eva]/ syntax match phpIniKeycontained /[']\@=assert\.quiet_eval/ syntax match phpIniKeyPartial contained /[']\@=assert\.w\%[arnin]/ syntax match phpIniKeycontained /[']\@=assert\.warning/ syntax match phpIniKeyPartial contained /[']\@=au\%[to_append_fil]/ syntax match phpIniKeycontained /[']\@=auto_append_file/ syntax match phpIniKeyPartial contained /[']\@=auto_d\%[etect_line_ending]/ syntax match phpIniKeycontained /[']\@=auto_detect_line_endings/ syntax match phpIniKeyPartial contained /[']\@=auto_g\%[lobals_ji]/ syntax match phpIniKeycontained /[']\@=auto_globals_jit/ syntax match phpIniKeyPartial contained /[']\@=auto_p\%[repend_fil]/ syntax match phpIniKeycontained /[']\@=auto_prepend_file/ syntax match phpIniKeyPartial contained /[']\@=b\%[rowsca]/ syntax match phpIniKeycontained /[']\@=browscap/ syntax match phpIniKeyPartial contained /[']\@=d\%[ate\.default_latitud]/ syntax match phpIniKeycontained /[']\@=date\.default_latitude/ syntax match phpIniKeyPartial contained /[']\@=date\.default_lo\%[ngitud]/ syntax match phpIniKeycontained /[']\@=date\.default_longitude/ syntax match phpIniKeyPartial contained /[']\@=date\.s\%[unrise_zenit]/ syntax match phpIniKeycontained /[']\@=date\.sunrise_zenith/ syntax match phpIniKeyPartial contained /[']\@=date\.suns\%[et_zenit]/ syntax match phpIniKeycontained /[']\@=date\.sunset_zenith/ syntax match phpIniKeyPartial contained
Re: matchparen tweak
On Wed, Sep 06, 2006 at 02:15:36AM +0200, A.J.Mechelynck wrote: Benji Fisher wrote: Now that the problem has been pointed out, I think the patch should be made in the official distribution. How about (simple but oh, so clever) let plist = split(matchpairs, '.\zs.') which removes every second character? Will that have trouble with multibyte characters? Are these even allowed in 'matchpairs'? The help for 'matchparen' mentions only single characters which must be different. You might try it with Arabic ornate parentheses, U+FD3E (left i.e. closing) and U+FD3F (right i.e.opening), which are obviously meant to pair with each other. I assume you mean the help for 'matchpairs', not 'matchparen'. I tried :let mps = \uFD3E:\uFD3F :set mps? and the value was not changed. I think the docs should be changed to mention that multi-byte characters are not allowed; as I read it, single characters does not rule out multi-byte characters. I also do not like the absence of an error message. I guess this is an issue with :let since I do get an E474 from :set mps=C-VuFD3E:C-VuFD3F (*not* typed literally). IIUC, a dot in a pattern matches one character, which may be one or more bytes, and which may occupy one screen cell, two for a wide CJK character, one to eight for a tab, etc. Yes, and :echo split(\uFD3E:\uFD3F, '.\zs.') returns ['﴾', '﴿'] as expected. So I think my proposal for matchparen.vim is safe even if 'matchpairs' is changed to allow multi-byte characters. HTH --Benji Fisher
Help non-functional in 7.0.90
In (g)vim 7.0.90, when I try to invoke the help, let's say :help :help the program hangs; and when I finally hit Ctrl-C I get: E426: tag not found: :[EMAIL PROTECTED] Similarly for F1 E426: tag not found: [EMAIL PROTECTED] Running :helptags in the doc/ subdirectories of all 'rtp' directories doesn't help. Best regards, Tony.
Re: using hidden unlisted buffer as transparently as possible
Bram, In a thread started here [0] back in July I reported a problem I was having with messages not being displayed in the right order. It was determined during that thread that there was a difference of behavior based on whether hidden was set or not. Buried in one of the later messages, I asked you if this was intentional or a bug, but I haven't heard back from you. You weren't active on the list at the time; I assume you were on vacation/moving. I guess that my buried query didn't catch your attention when you were catching up on mail. Here is the summary: - vim -u NONE -U NONE somefile.txt :e testbuf.vim if testbuf.vim is new, paste the TestBuf function below and :w :let g:testbuf = 2 the buffer number of testbuf.vim :so % :b # we are now set up to demonstrate the problem :call TestBuf() this should display Done with TestBuf (found = 3) :set hidden :call TestBuf() this displays somefile.txt line 1 of... :set nohidden :call TestBuf() this still displays somefile.txt... You must switch buffers at least once after :set nohidden before you get the original (desired) behavior back. - TestBuf function! TestBuf() let curbuf = bufnr(%) exec b g:testbuf let found = search('t.st') exec b curbuf echomsg 'Done with TestBuf (found = '.found.')' endfunction - A separate problem is that changing both occurrences of exec b... to silent exec b... does not change anything; that is, the output of exec b... is not suppressed (when hidden is set). I feel that both of these are bugs, but I wanted to know if there was a reason that you thought these were the correct behaviors (or perhaps it is simply impractical to change). Thanks...Marvin [0] http://groups.yahoo.com/group/vimdev/message/44273
Re: Re: Help non-functional in 7.0.90
On 06/09/06, Charles E Campbell Jr [EMAIL PROTECTED] wrote: A.J.Mechelynck wrote: In (g)vim 7.0.90, when I try to invoke the help, let's say :help :help the program hangs; and when I finally hit Ctrl-C I get: E426: tag not found: :[EMAIL PROTECTED] Similarly for F1 E426: tag not found: [EMAIL PROTECTED] Running :helptags in the doc/ subdirectories of all 'rtp' directories doesn't help. I tried both vim and gvim 7.0.90, and didn't have the problem you're having. ie. :help :help worked as expected. (using Fedora Core 5/linux). Works for me as well, on Mac OS X (Intel) Cheers Adam
Re: Help non-functional in 7.0.90
On Wed 6-Sep-06 8:01am -0600, A.J.Mechelynck wrote: In (g)vim 7.0.90, when I try to invoke the help, let's say :help :help the program hangs; and when I finally hit Ctrl-C I get: E426: tag not found: :[EMAIL PROTECTED] Similarly for F1 E426: tag not found: [EMAIL PROTECTED] Both work fine for (g)vim on WinXP from both my normal starting or from a pristine start (see below): vim -u NONE -i NONE -N --cmd se rtp=$VIMRUNTIME -- Best regards, Bill
Re: using hidden unlisted buffer as transparently as possible
Marvin Renich wrote: In a thread started here [0] back in July I reported a problem I was having with messages not being displayed in the right order. It was determined during that thread that there was a difference of behavior based on whether hidden was set or not. Buried in one of the later messages, I asked you if this was intentional or a bug, but I haven't heard back from you. You weren't active on the list at the time; I assume you were on vacation/moving. I guess that my buried query didn't catch your attention when you were catching up on mail. Here is the summary: - vim -u NONE -U NONE somefile.txt :e testbuf.vim if testbuf.vim is new, paste the TestBuf function below and :w :let g:testbuf = 2 the buffer number of testbuf.vim :so % :b # we are now set up to demonstrate the problem :call TestBuf() this should display Done with TestBuf (found = 3) :set hidden :call TestBuf() this displays somefile.txt line 1 of... :set nohidden :call TestBuf() this still displays somefile.txt... You must switch buffers at least once after :set nohidden before you get the original (desired) behavior back. - TestBuf function! TestBuf() let curbuf = bufnr(%) exec b g:testbuf let found = search('t.st') exec b curbuf echomsg 'Done with TestBuf (found = '.found.')' endfunction - A separate problem is that changing both occurrences of exec b... to silent exec b... does not change anything; that is, the output of exec b... is not suppressed (when hidden is set). I feel that both of these are bugs, but I wanted to know if there was a reason that you thought these were the correct behaviors (or perhaps it is simply impractical to change). After you do :set nohidden there still is one hidden buffer. Thus the first TestBuf() after that will work a bit different from the next ones. I do see a problem: The info about the current buffer is displayed even though you edited another buffer. Thus the message should be given for the un-hidden file but it's given for the other file, for which a message was already given. I'll fix that. -- Have you heard about the new Barbie doll? It's called Divorce Barbie. It comes with all of Ken's stuff. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: Help non-functional in 7.0.90
Charles E Campbell Jr wrote: A.J.Mechelynck wrote: In (g)vim 7.0.90, when I try to invoke the help, let's say :help :help the program hangs; and when I finally hit Ctrl-C I get: E426: tag not found: :[EMAIL PROTECTED] Similarly for F1 E426: tag not found: [EMAIL PROTECTED] Running :helptags in the doc/ subdirectories of all 'rtp' directories doesn't help. I tried both vim and gvim 7.0.90, and didn't have the problem you're having. ie. :help :help worked as expected. (using Fedora Core 5/linux). Regards, Chip Campbell Then I wonder what went wrong. I rebooted and still got it; recompiled (make reconfig) with --disable-nls (in configure) and -multi_lang (by commenting away #define FEAT_MULTI_LANG in feature.h) and still got it -- in both gvim and console vim. Best regards, Tony.
Re: Help non-functional in 7.0.90
A.J.Mechelynck wrote: In (g)vim 7.0.90, when I try to invoke the help, let's say :help :help the program hangs; and when I finally hit Ctrl-C I get: E426: tag not found: :[EMAIL PROTECTED] Similarly for F1 E426: tag not found: [EMAIL PROTECTED] Running :helptags in the doc/ subdirectories of all 'rtp' directories doesn't help. Best regards, Tony. Cleaned my ~/.vim and $VIM/vimfiles from a few obsolete and dubious files, compiled 7.0.091 (with make reconfig), it works again (as src/vim). More fear than harm. Next thing is make install. Best regards, Tony.
Re: Help non-functional in 7.0.90
On Thu, 2006-09-07 at 01:57 +0200, A.J.Mechelynck wrote: A.J.Mechelynck wrote: In (g)vim 7.0.90, when I try to invoke the help, let's say :help :help the program hangs; and when I finally hit Ctrl-C I get: E426: tag not found: :[EMAIL PROTECTED] Similarly for F1 E426: tag not found: [EMAIL PROTECTED] Running :helptags in the doc/ subdirectories of all 'rtp' directories doesn't help. Best regards, Tony. Cleaned my ~/.vim and $VIM/vimfiles from a few obsolete and dubious files, compiled 7.0.091 (with make reconfig), it works again (as src/vim). More fear than harm. Next thing is make install. Best regards, Tony. tony -- all this weirdness with your help -- as dependant as we are on whatever is insalled for 'ctags', i'd say you might spend some time looking at whatever shows up for 'which ctags' with a thought towards maybe fixing something there scott
Re: Help non-functional in 7.0.90
scott wrote: On Thu, 2006-09-07 at 01:57 +0200, A.J.Mechelynck wrote: A.J.Mechelynck wrote: In (g)vim 7.0.90, when I try to invoke the help, let's say :help :help the program hangs; and when I finally hit Ctrl-C I get: E426: tag not found: :[EMAIL PROTECTED] Similarly for F1 E426: tag not found: [EMAIL PROTECTED] Running :helptags in the doc/ subdirectories of all 'rtp' directories doesn't help. Best regards, Tony. Cleaned my ~/.vim and $VIM/vimfiles from a few obsolete and dubious files, compiled 7.0.091 (with make reconfig), it works again (as src/vim). More fear than harm. Next thing is make install. Best regards, Tony. tony -- all this weirdness with your help -- as dependant as we are on whatever is insalled for 'ctags', i'd say you might spend some time looking at whatever shows up for 'which ctags' with a thought towards maybe fixing something there scott IIUC it's the version of ctags that came with SuSE 9.3 rpm -qa |grep ctags ctags-2004.11.15-3 which -a ctags /usr/bin/ctags ls -l `which ctags` -rwxr-xr-x 1 root root 128852 Mar 19 2005 /usr/bin/ctags ctags --version Exuberant Ctags 5.5.4, Copyright (C) 1996-2003 Darren Hiebert Compiled: Mar 19 2005, 19:18:40 Addresses: [EMAIL PROTECTED], http://ctags.sourceforge.net Optional compiled features: +wildcards, +regex The wierdness appeared after installing the manpageview plugin from vim-online, and disappeared after removing it as well as versions of the netrw and vimball plugins which had become older than the default ones due to a runtime rsync. Don't know what _any_ of those had to do with not finding the help; and (I checked) my doc/tags files were OK -- anyway, regenerating them all using (internal) helptags changed nothing. Best regards, Tony.
indenting weirdness
help! i'm at 7.0.90, but i've noticed the indenting weirdness before, so i don't know when it really started i think the other time(s) too it was in my 'ai' module, which, although it has a .txt extenstion, comes up with 'filetype=' so weird ok -- no filetype is defined -- fine -- this still should not happen, in my opinion with tw=70, which i set with an f-key defined in my .vimrc, typing the following gives: an optimistic man might be tempted to celebrate -- we have proven, after see? what the @[EMAIL PROTECTED]@? kind of indenting rule says to create a hanging indent after the first word... dunno why filetype is undefined, but i have filetype indent off, i've gotten so frustrated with unexpected indenting behavior if it's relevant, i open my 'ai' modules with a script that sources a vim script that does (after the comments): let s:name = '~/documents/txt/ai_' . strftime(%Y%m) . '.txt' execute e + s:name which *may* help explain why filetype is undefined, but not in any way explains why 'an' is something that requires a hanging indent to be created on the next line i've got: filetype on filetype indent off filetype plugin on filetype plugin indent off in my .vimrc, which is an attempt on my part to get control over how indenting happens, yet i STILL get surprised with unexpected behavior any clues will be appreciated sc
Re: indenting weirdness
Hello scott, The 'filetype=' message is what happens when you use ':set filetype=' and don't specify any filetype. If you have 'cindent' turned on, Vim will add an indent after a line ending in a comma (,) and your sample sentence does. Use ':set cindent?' to check if it is turned on. regards, Peter --- scott [EMAIL PROTECTED] wrote: help! i'm at 7.0.90, but i've noticed the indenting weirdness before, so i don't know when it really started i think the other time(s) too it was in my 'ai' module, which, although it has a .txt extenstion, comes up with 'filetype=' so weird ok -- no filetype is defined -- fine -- this still should not happen, in my opinion with tw=70, which i set with an f-key defined in my .vimrc, typing the following gives: an optimistic man might be tempted to celebrate -- we have proven, after see? what the @[EMAIL PROTECTED]@? kind of indenting rule says to create a hanging indent after the first word... dunno why filetype is undefined, but i have filetype indent off, i've gotten so frustrated with unexpected indenting behavior if it's relevant, i open my 'ai' modules with a script that sources a vim script that does (after the comments): let s:name = '~/documents/txt/ai_' . strftime(%Y%m) . '.txt' execute e + s:name which *may* help explain why filetype is undefined, but not in any way explains why 'an' is something that requires a hanging indent to be created on the next line i've got: filetype on filetype indent off filetype plugin on filetype plugin indent off in my .vimrc, which is an attempt on my part to get control over how indenting happens, yet i STILL get surprised with unexpected behavior any clues will be appreciated sc On Yahoo!7 Messenger - Make free PC-to-PC calls to your friends overseas. http://au.messenger.yahoo.com
Re: indenting weirdness
scott wrote: help! i'm at 7.0.90, but i've noticed the indenting weirdness before, so i don't know when it really started i think the other time(s) too it was in my 'ai' module, which, although it has a .txt extenstion, comes up with 'filetype=' so weird ok -- no filetype is defined -- fine -- this still should not happen, in my opinion with tw=70, which i set with an f-key defined in my .vimrc, typing the following gives: an optimistic man might be tempted to celebrate -- we have proven, after see? what the @[EMAIL PROTECTED]@? kind of indenting rule says to create a hanging indent after the first word... dunno why filetype is undefined, but i have filetype indent off, i've gotten so frustrated with unexpected indenting behavior if it's relevant, i open my 'ai' modules with a script that sources a vim script that does (after the comments): let s:name = '~/documents/txt/ai_' . strftime(%Y%m) . '.txt' execute e + s:name which *may* help explain why filetype is undefined, but not in any way explains why 'an' is something that requires a hanging indent to be created on the next line i've got: filetype on filetype indent off filetype plugin on filetype plugin indent off in my .vimrc, which is an attempt on my part to get control over how indenting happens, yet i STILL get surprised with unexpected behavior any clues will be appreciated sc :verbose set autoindent? smartindent? cindent? cinoptions? :verbose set copyindent? preserveindent? indentkeys? cinkeys? (don't forget the question marks of course) Best regards, Tony.
Re: Help non-functional in 7.0.90
On Thu, 2006-09-07 at 05:58 +0200, A.J.Mechelynck wrote: scott wrote: On Thu, 2006-09-07 at 01:57 +0200, A.J.Mechelynck wrote: A.J.Mechelynck wrote: In (g)vim 7.0.90, when I try to invoke the help, let's say :help :help the program hangs; and when I finally hit Ctrl-C I get: E426: tag not found: :[EMAIL PROTECTED] Similarly for F1 E426: tag not found: [EMAIL PROTECTED] Running :helptags in the doc/ subdirectories of all 'rtp' directories doesn't help. Best regards, Tony. Cleaned my ~/.vim and $VIM/vimfiles from a few obsolete and dubious files, compiled 7.0.091 (with make reconfig), it works again (as src/vim). More fear than harm. Next thing is make install. Best regards, Tony. tony -- all this weirdness with your help -- as dependant as we are on whatever is insalled for 'ctags', i'd say you might spend some time looking at whatever shows up for 'which ctags' with a thought towards maybe fixing something there scott IIUC it's the version of ctags that came with SuSE 9.3 rpm -qa |grep ctags ctags-2004.11.15-3 which -a ctags /usr/bin/ctags ls -l `which ctags` -rwxr-xr-x 1 root root 128852 Mar 19 2005 /usr/bin/ctags ctags --version Exuberant Ctags 5.5.4, Copyright (C) 1996-2003 Darren Hiebert Compiled: Mar 19 2005, 19:18:40 Addresses: [EMAIL PROTECTED], http://ctags.sourceforge.net Optional compiled features: +wildcards, +regex The wierdness appeared after installing the manpageview plugin from vim-online, and disappeared after removing it as well as versions of the netrw and vimball plugins which had become older than the default ones due to a runtime rsync. Don't know what _any_ of those had to do with not finding the help; and (I checked) my doc/tags files were OK -- anyway, regenerating them all using (internal) helptags changed nothing. Best regards, Tony. hmmm what jumped out at me in your error messages was the '@en' -- makes me think whatever happened to you relates to something to do with the english language -- did manpageview have a lot of klunky language weirdness? sc
Re: indenting weirdness
peter-- that was the clue i needed -- after turning 'cindent' off i was able to type an optimistic man might be tempted to celebrate -- we have proven, after all, that life goes on after microsoft -- macros can be created in OOo basic, however bloody without the indenting weirdness as much java and C# as i work on, i hope i can live without cindent, but between you and me, i'm betting off is better thanx! sc On Thu, 2006-09-07 at 14:08 +1000, Peter Hodge wrote: Hello scott, The 'filetype=' message is what happens when you use ':set filetype=' and don't specify any filetype. If you have 'cindent' turned on, Vim will add an indent after a line ending in a comma (,) and your sample sentence does. Use ':set cindent?' to check if it is turned on. regards, Peter --- scott [EMAIL PROTECTED] wrote: help! i'm at 7.0.90, but i've noticed the indenting weirdness before, so i don't know when it really started i think the other time(s) too it was in my 'ai' module, which, although it has a .txt extenstion, comes up with 'filetype=' so weird ok -- no filetype is defined -- fine -- this still should not happen, in my opinion with tw=70, which i set with an f-key defined in my .vimrc, typing the following gives: an optimistic man might be tempted to celebrate -- we have proven, after see? what the @[EMAIL PROTECTED]@? kind of indenting rule says to create a hanging indent after the first word... dunno why filetype is undefined, but i have filetype indent off, i've gotten so frustrated with unexpected indenting behavior if it's relevant, i open my 'ai' modules with a script that sources a vim script that does (after the comments): let s:name = '~/documents/txt/ai_' . strftime(%Y%m) . '.txt' execute e + s:name which *may* help explain why filetype is undefined, but not in any way explains why 'an' is something that requires a hanging indent to be created on the next line i've got: filetype on filetype indent off filetype plugin on filetype plugin indent off in my .vimrc, which is an attempt on my part to get control over how indenting happens, yet i STILL get surprised with unexpected behavior any clues will be appreciated sc On Yahoo!7 Messenger - Make free PC-to-PC calls to your friends overseas. http://au.messenger.yahoo.com
text is gone
ok, so help me out here i've looked at filetype vim, and i see nothing that associates _.txt modules with ft=txt whether i enter my 'ai' modules with the script or by navigating to where they are and, with my bloody fingers typing 'gvim ai_200609.txt', still, inside the module, filetype is undefined are we only supposed to use vim for exotic languages? is 'text' deprecated? i thought it used to suffice to have an extension of .txt now the ground is shifting under my feet... sc
Re: Help non-functional in 7.0.90
On Thu, 2006-09-07 at 06:55 +0200, A.J.Mechelynck wrote: scott wrote: On Thu, 2006-09-07 at 05:58 +0200, A.J.Mechelynck wrote: scott wrote: On Thu, 2006-09-07 at 01:57 +0200, A.J.Mechelynck wrote: A.J.Mechelynck wrote: In (g)vim 7.0.90, when I try to invoke the help, let's say :help :help the program hangs; and when I finally hit Ctrl-C I get: E426: tag not found: :[EMAIL PROTECTED] Similarly for F1 E426: tag not found: [EMAIL PROTECTED] Running :helptags in the doc/ subdirectories of all 'rtp' directories doesn't help. Best regards, Tony. Cleaned my ~/.vim and $VIM/vimfiles from a few obsolete and dubious files, compiled 7.0.091 (with make reconfig), it works again (as src/vim). More fear than harm. Next thing is make install. Best regards, Tony. tony -- all this weirdness with your help -- as dependant as we are on whatever is insalled for 'ctags', i'd say you might spend some time looking at whatever shows up for 'which ctags' with a thought towards maybe fixing something there scott IIUC it's the version of ctags that came with SuSE 9.3 rpm -qa |grep ctags ctags-2004.11.15-3 which -a ctags /usr/bin/ctags ls -l `which ctags` -rwxr-xr-x 1 root root 128852 Mar 19 2005 /usr/bin/ctags ctags --version Exuberant Ctags 5.5.4, Copyright (C) 1996-2003 Darren Hiebert Compiled: Mar 19 2005, 19:18:40 Addresses: [EMAIL PROTECTED], http://ctags.sourceforge.net Optional compiled features: +wildcards, +regex The wierdness appeared after installing the manpageview plugin from vim-online, and disappeared after removing it as well as versions of the netrw and vimball plugins which had become older than the default ones due to a runtime rsync. Don't know what _any_ of those had to do with not finding the help; and (I checked) my doc/tags files were OK -- anyway, regenerating them all using (internal) helptags changed nothing. Best regards, Tony. hmmm what jumped out at me in your error messages was the '@en' -- makes me think whatever happened to you relates to something to do with the english language -- did manpageview have a lot of klunky language weirdness? sc I didn't check (and now it's gone thanks to rm -vf); but after recompiling (make reconfig but not make install) with (a) a define commented-out: /* # define FEAT_MULTI_LANG */ (b) an additional configure setting: export CONF_OPT_NLS='--disable-nls', and (c) renaming $VIMRUNTIME/lang to lanx (probably overkill but you never know...), I got the same error without the @en IIUC that @xx postfix is characteristic of multi-language help. My vimrc sets :language messages to C (on Unix) or en (on Windows) before sourcing the vimrc_example, to avoid French or Dutch menus and error messages regardless of the locale. Now I have undone all those changes, removed, as I said, the dubious plugins, re-made reconfig, and my 7.0.091 again shows any help with no noticeable lag. The only global plugins which I still have outside $VIMRUNTIME/plugin are matchit (runtime macros/matchit.vim) and a small plugin I wrote myself to display the splash screen (:intro) at the VimEnter event, even when Vim is started with one or more editfiles named on the command-line. Best regards, Tony. IIUC, your problem has been solved? no more goofy :help errors?