Re: Documentaion bug: List of helpfiles
Tony Mechelynck wrote: Documentation bug: In *help.txt*For Vim version 7.0. Last change: 2006 May 07 Under standard plugins, at lines 191-196, pi_spec.txt and pi_vimball.txt are not mentioned. I haven't checked the helpfile names other than pi_*.txt pi_spec.txt is about a filetype plugin, it's not a standard plugin. pi_vimball.txt was indeed missing here. -- hundred-and-one symptoms of being an internet addict: 251. You've never seen your closest friends who usually live WAY too far away. /// 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: Minor bug: Crash of the win32 gui version under network start
Anatoli Sakhnik wrote: The gui-enabled win32 version of Vim-7.0 crashes when I try to launch it on a network drive. Actually, I have Vim-7.0 installed on my Windows XP host, and try to execute it without copying on Windows 2000 guest. On the guest I mapped a network path where the Vim was placed to disk letter Z:. I've been trying to dig into the problem (at the expense of my employer ;-) ), but it appeared to be more complicated than I expected. So it exposed even in the _compatible_ mode, didn't refer to any plugin. The stack got corrupted and the only tracable line of the code was: regexp.c:4198. Just before the trap the debugger complained that someone wrote data after allocated heap block (the address corresponds to the variable 'cond'). Should I pay more attention on this bug to provide more info? -- Anatoli Sakhnik. P.S.: The version without gui works just fine. Strange. I didn't see any replies and I also haven't heard from someone running into the same problem. I suspect there is something special about the way you start Vim. For Vim it doesn't matter from what drive it is started, but perhaps some library works differently. -- Ten bugs in the hand is better than one as yet undetected. /// 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: search count from visual mode
Hi Gerald For instance, with map F2 / hitting 3 + F2 will have the search do with a count of 3 (taken from v:count and v:count1). How would we have it so it takes from g:mycount instead? What about: :map expr F2 . g:mycount . / With best regards Mathias
Re: Makefile indentation with spaces for line continuation
If you want to flag errors, why not use highlighting? Actually, the makefile syntax I'm seeing already highlights correct backslashes. So, in general, you know there is an error if the code/text isn't colored right. I don't see a way to tell Vim to indent with tabs sometimes and not others. On 6/15/06, John Orr [EMAIL PROTECTED] wrote: Hi, I'm currently implementing a make system with GNU Make and have been trying for a while to work out how to get the indentation working as I would like it to. I believe it is reasonably standard when editing makefiles to set noexpandtab such that tabs are inserted when you start the commands under a rule, and that's great. My problem is when you have long command lines and wish to use line continuation, with the following formatting: foo.o : foo.c tab the command to build foo.o starts here but \ spaces because the command is long it uses \ spaces line continuation for readability \ spaces and it finally ends here Note - the command starts with a tab as it must, but the continuation lines are instead indented with spaces. Why? Because if you forget a backslash requesting line continuation - or if you accidentally get a space after one (which also breaks line continuation), then by using spaces for indentation, both make, and vim, will draw your attention to it. My problem - how does one get vim to do this kind of indentation? Admittedly I'm only using vim 6.3, but the return value of the indentexpr is a number, representing a number of spaces. Your 'expandtab' setting, in combination with shiftwidths etc, seems to dictate whether that number of spaces is inserted as spaces or tabs (or tabs plus spaces). Any suggestions on how to achieve my goal? (Or, alternatively, any reasons why my goal is illogical and shouldn't be the standard way that vim works with Makefiles?) The simplest I could imagine would be if the indentexpr function could return either a number of spaces as today, or a string consisting of the actual indentation characters required - but I'd rather not go hacking vim. Thanks very much, John
Re: Newbie notation question: hotkeys
On 6/16/06, A.J.Mechelynck [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: ex: in describing hotkeys, they use: ... \cl Line End Comment \cf Frame Comment \cu Function Description \ch File Header (*.pl) I believe the backslash represents a backslash. Indeed. The rare case when backslash represents a backslash :-) For \ch, for exampe, you need to press 3 keys in quick sequence: 1. backslash 2. c 3 h. If you make excessive delays between these keys, mappnig will not execute. :help ttimeout, :help timeout Yakov
Re: Makefile indentation with spaces for line continuation
Thanks Eric. I don't know that I explained myself that well - if the code is this: foo.o : foo.c tab the command to build foo.o starts here but \ spaces the command is long then vim's syntax highlighting will flag an error if the backslash is lost, because this is invalid: foo.o : foo.c tab the command to build foo.o starts here but spaces the command is long But if the indenting is as vim encourages, like this: foo.o : foo.c tab the command to build foo.o starts here but \ tab the command is long then vim syntax highlighting won't spot the problem of a lost backslash in this: foo.o : foo.c tab the command to build foo.o starts here but tab the command is long Hence my preference for the former. Another alternative might be to enable expandtab (to get the spaces) and enter the tab characters explicitly - is there any easy way of inserting a tab character when expandtab is enabled? On Friday 16 June 2006 16:45, Eric Arnold wrote: If you want to flag errors, why not use highlighting? Actually, the makefile syntax I'm seeing already highlights correct backslashes. So, in general, you know there is an error if the code/text isn't colored right. I don't see a way to tell Vim to indent with tabs sometimes and not others. On 6/15/06, John Orr [EMAIL PROTECTED] wrote: Hi, I'm currently implementing a make system with GNU Make and have been trying for a while to work out how to get the indentation working as I would like it to. I believe it is reasonably standard when editing makefiles to set noexpandtab such that tabs are inserted when you start the commands under a rule, and that's great. My problem is when you have long command lines and wish to use line continuation, with the following formatting: foo.o : foo.c tab the command to build foo.o starts here but \ spaces because the command is long it uses \ spaces line continuation for readability \ spaces and it finally ends here Note - the command starts with a tab as it must, but the continuation lines are instead indented with spaces. Why? Because if you forget a backslash requesting line continuation - or if you accidentally get a space after one (which also breaks line continuation), then by using spaces for indentation, both make, and vim, will draw your attention to it. My problem - how does one get vim to do this kind of indentation? Admittedly I'm only using vim 6.3, but the return value of the indentexpr is a number, representing a number of spaces. Your 'expandtab' setting, in combination with shiftwidths etc, seems to dictate whether that number of spaces is inserted as spaces or tabs (or tabs plus spaces). Any suggestions on how to achieve my goal? (Or, alternatively, any reasons why my goal is illogical and shouldn't be the standard way that vim works with Makefiles?) The simplest I could imagine would be if the indentexpr function could return either a number of spaces as today, or a string consisting of the actual indentation characters required - but I'd rather not go hacking vim. Thanks very much, John
Re: CVS service resumed?
Chris Sutcliffe wrote: In terms of getting the latest and greatest source, is the Subversion repository generally the 'main' source with the cvs repository being updated from there? Or is it now that CVS is more or less in working order again at SF will it become the 'main' source? The CVS repository holds the patched Vim 7.0. I'm updating it myself. Edward Fox updates the SVN repository. I don't know if he does this from CVS or from patches, the result should be the same. Thus both CVS and SVN should have the same version, it's up to you to decide which one you want to use. -- hundred-and-one symptoms of being an internet addict: 256. You are able to write down over 250 symptoms of being an internet addict, even though they only asked for 101. /// 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: Can not run any command with ! in W2K
Mathias Michaelis wrote: If I do :!dir a console opens and says: C:\WINNT\system32\CMD.EXE /c dir shell returned -1 2) If 1) doesn't help, you may want to produce the phenomena outside of vim. Open a cmd-window and type something like path\to\vim\vimrun.exe %windir%\system32\cmd.exe /c dir Juan told me he could reproduce the error outside of vim like that. I then consulted http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_system.2c_._wsystem.asp and saw that vimrun.exe doesn't issue the full information of the error if the system() function call returns -1. This is why I suggest the following patch: I'm not sure perror() can be used in general after system(). Otherwise it makes sense. -- Place mark here -[ ]- if you want a dirty monitor. /// 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 with gU and German sharp s?
Jürgen Krämer wrote: can anybody confirm this misbehaviour in VIM 7.0: Starting gvim -u NONE -U NONE and typing iStraßenesc0gUe results in STRASSEn (note the lower case 'n'). The same is true for iStraßenesc0veU It seems that after converting the sharp s to 'SS' VIM does not account for the now longer word and selection and leaves one character in lower case for every sharp s it converted. Another example: iAußenstraßenschilderesc0gUe leaves two lower case letters at the end of AUSSENSTRASSENSCHILDer This happens on a German Windows XP with VIM 7.0 (patches 1-17 applied). I see the problem. I'll put it in the todo list. -- Did you hear about the new 3 million dollar West Virginia State Lottery? The winner gets 3 dollars a year for a million years. /// 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: Can not run any command with ! in W2K
Bram I'm not sure perror() can be used in general after system(). Otherwise it makes sense. Thanks. Indeed I only checked the documentation of Visual Studio 2005 Visual Studio .NET Visual Studio 6.0 When making the patch. But by googling a little bit, I find firther indications that perror() could be used if system() returns .1: http://www.opengroup.org/onlinepubs/009695399/functions/system.html http://www.cplusplus.com/ref/cstdlib/system.html I could not explicitly find it in a manpage like http://www.fifi.org/cgi-bin/man2html/usr/share/man/man3/system.3.gz but here it is mentioned that a return value of -1 signifies an error -- so one can assume that in this case errno is set. But of course I didn't check my patch on every system. An alternative to my patch would be to set errno = 0 before calling system() and if system() returns -1 to check if errno has changed. With best regards Mathias
RE: Inability to map C-N when completion popup is visible
-Original Message- From: Hari Krishna Dara [mailto:[EMAIL PROTECTED] Sent: Thursday, June 15, 2006 8:23 PM To: vim@vim.org Subject: Inability to map C-N when completion popup is visible I am trying to map C-N and C-P to behave differently when pumvisible() returns true, but Vim seems to completely ignore this. E.g., if I create this unconditional map (a much simpler one than what I wanted): inoremap C-N C-C pressing ^N normally stops insertmode, but when popup is visible, Vim never executes the map. This may be true for C-P also, but the same is not true for, say Up. inoremap Up C-C Using the above map, pressing Up arrow always stops insert mode, whether popup is visible or not. Is this a bug? I tested by starting with -u NONE option to avoid any other interferences. I had a lot of problems trying to get this to work as well. In the end I was unable to map it without making a function call. autoload/sqlcomplete.vim does the following: if has('win32') imap buffer c-right C-R=sqlcomplete#DrillIntoTable()CR imap buffer c-left C-R=sqlcomplete#DrillOutOfColumns()CR endif function! sqlcomplete#DrillIntoTable() If the omni popup window is visible if pumvisible() call sqlcomplete#Map('column') C-Y, makes the currently highlighted entry active and trigger the omni popup to be redisplayed call feedkeys(\C-Y\C-X\C-O) else if has('win32') If the popup is not visible, simple perform the normal C-Right behaviour exec normal! \C-Right endif endif return endfunction In this case, if the popup window is not visible I want to perform the standard C-Right so the user does not loose any functionality due to the mapping. For the lurkers, this is for Vim7 since pumvisible() and feedkeys() are Vim7 functions. HTH, Dave
Re: VIM: map seq.s must be typed slowly
I have discovered some interesting additional information about this problem: - The problem occurs with my mappings, e.g.: :map ]v * :map ]t ^t etc. - The problem does NOT occur with the following mappings: :map aa * :map )V * I can type this as fast as I want and it jumps to the next occurance of the word under the cursor I tried turning off showmatch, but it didn't help. Is there something special about [ and ]? I'm currently runnig version 6.3.84 --- Thomas Mellman [EMAIL PROTECTED] wrote: After upgrading to a new version of VIM a while back, I have now to type key-sequences slowly, or I get a visual bell (and no sequence recognized). Does anybody know what changed to cause this, and how I can turn it off? For example, I use the '[' and ']' keys to introduce various shortcuts (e.g. ]v and [v find the next or previous occurance of the word under the cursor). But now I have to always wait 500ms - 1000ms or my sequence is aborted. I looked at timeout and ttimeout, but they seem to be for the opposite case - making sure that VIM waits for the typist before attempting to interpret. I can't discern an effect on typing too fast . I can't see why there should be a problem if the keys are already sitting in the buffer. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Makefile indentation with spaces for line continuation
I was unable to figure out how to do that. As the last line of my Makefile.am I always put: # vim: set tabstop=4 shiftwidth=4 noexpandtab: since, by default, these guys around me (I'm the new guy) like expandtab which, as you know, is problematic for makefiles. Best, Russ John Orr wrote: Thanks Eric. I don't know that I explained myself that well - if the code is this: foo.o : foo.c tab the command to build foo.o starts here but \ spaces the command is long then vim's syntax highlighting will flag an error if the backslash is lost, because this is invalid: foo.o : foo.c tab the command to build foo.o starts here but spaces the command is long But if the indenting is as vim encourages, like this: foo.o : foo.c tab the command to build foo.o starts here but \ tab the command is long then vim syntax highlighting won't spot the problem of a lost backslash in this: foo.o : foo.c tab the command to build foo.o starts here but tab the command is long Hence my preference for the former. Another alternative might be to enable expandtab (to get the spaces) and enter the tab characters explicitly - is there any easy way of inserting a tab character when expandtab is enabled? On Friday 16 June 2006 16:45, Eric Arnold wrote: If you want to flag errors, why not use highlighting? Actually, the makefile syntax I'm seeing already highlights correct backslashes. So, in general, you know there is an error if the code/text isn't colored right. I don't see a way to tell Vim to indent with tabs sometimes and not others. On 6/15/06, John Orr [EMAIL PROTECTED] wrote: Hi, I'm currently implementing a make system with GNU Make and have been trying for a while to work out how to get the indentation working as I would like it to. I believe it is reasonably standard when editing makefiles to set noexpandtab such that tabs are inserted when you start the commands under a rule, and that's great. My problem is when you have long command lines and wish to use line continuation, with the following formatting: foo.o : foo.c tab the command to build foo.o starts here but \ spaces because the command is long it uses \ spaces line continuation for readability \ spaces and it finally ends here Note - the command starts with a tab as it must, but the continuation lines are instead indented with spaces. Why? Because if you forget a backslash requesting line continuation - or if you accidentally get a space after one (which also breaks line continuation), then by using spaces for indentation, both make, and vim, will draw your attention to it. My problem - how does one get vim to do this kind of indentation? Admittedly I'm only using vim 6.3, but the return value of the indentexpr is a number, representing a number of spaces. Your 'expandtab' setting, in combination with shiftwidths etc, seems to dictate whether that number of spaces is inserted as spaces or tabs (or tabs plus spaces). Any suggestions on how to achieve my goal? (Or, alternatively, any reasons why my goal is illogical and shouldn't be the standard way that vim works with Makefiles?) The simplest I could imagine would be if the indentexpr function could return either a number of spaces as today, or a string consisting of the actual indentation characters required - but I'd rather not go hacking vim. Thanks very much, John
Re: Bug with gU and German sharp s?
hmm, well ... this is as buggy as the java String.toUpperCase() method ;-) oracle for example does it right and leaves the sharp s as it is - because there is no upper case variant of it. SQL select upper('straße') from dual; UPPER(' --- STRAßE my 2 cents, martin Bram Moolenaar wrote: Jürgen Krämer wrote: can anybody confirm this misbehaviour in VIM 7.0: Starting gvim -u NONE -U NONE and typing iStraßenesc0gUe results in STRASSEn (note the lower case 'n'). The same is true for iStraßenesc0veU It seems that after converting the sharp s to 'SS' VIM does not account for the now longer word and selection and leaves one character in lower case for every sharp s it converted. Another example: iAußenstraßenschilderesc0gUe leaves two lower case letters at the end of AUSSENSTRASSENSCHILDer This happens on a German Windows XP with VIM 7.0 (patches 1-17 applied). I see the problem. I'll put it in the todo list. begin:vcard fn:Martin Kraegeloh n:Kraegeloh;Martin adr:;;Am Alten Pfarrhof 24;Oberbergkirchen;;84564;Germany email;internet:[EMAIL PROTECTED] tel;work:+49 8637 985806 tel;cell:+49 160 98943453 x-mozilla-html:FALSE version:2.1 end:vcard smime.p7s Description: S/MIME Cryptographic Signature
Re: ***SPAM*** Problem with regexp in macro
Gerald Lai wrote: On Thu, 15 Jun 2006, Sylvain wrote: [snip] I'm using setline() function to replace the line..so I will delete it before I add mine, it's not very elegant so if anyone has a better way, I will take it also :-) [snip] I modified Vimtip#329 some time ago to be able to swap visual highlighted words. I also modified it into a function form because it got long. The code below has an advantage over tip#329 in that it does not pollute the search history. In addition, it also works for swapping words on different lines. It does, however, clobber marks 'y 'z for positioning purposes. You can code around this if you want. Sounds like your function does something like what visswap.vim does, which is mentioned in the notes following tip#329. It, too, does not pollute the search history, nor does it clobber marks. Its actually swaps visual blocks, not just words (but, of course, it can swap words, too). And, its a function! :) The procedure: use visual block to select a block; type ctrl-y(sort of a yank) Then, use visual block to select the other block; type ctrl-x (do the swap) visswap.vim is available at http://mysite.verizon.net/astronaut/vim/index.html#VimFuncs, see Visual Mode Based Swapping. Regards, Chip Campbell
Re: Bug with gU and German sharp s?
Martin Kraegeloh wrote: hmm, well ... this is as buggy as the java String.toUpperCase() method ;-) oracle for example does it right and leaves the sharp s as it is - because there is no upper case variant of it. I'll leave it up to language specialists to decide whether making straße uppercase should result in STRAßE or STRASSE. I thought it was STRASSE. Logically it's much easier to use STRAßE, because the length doesn't change and the reverse operation works. STRASSE made lower case is strasse... -- hundred-and-one symptoms of being an internet addict: 10E. You start counting in hex. /// 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 with gU and German sharp s?
* Bram Moolenaar on Friday, June 16, 2006 at 17:24:20 +0200: I'll leave it up to language specialists to decide whether making straße uppercase should result in STRAßE or STRASSE. I thought it was STRASSE. Historic: STRASZE Now: STRASSE See: http://de.wikipedia.org/wiki/Versal-Eszett Logically it's much easier to use STRAßE, because the length doesn't change and the reverse operation works. STRASSE made lower case is strasse... The Swiss are more logic (they write Strasse) but also more prone to confusion: Ich trinke Alkohol in Massen. -- which might mean I drink alcohol in moderation or I drink alcohol galore. c -- _B A U S T E L L E N_ lesen! --- http://www.blacktrash.org/baustellen.html
Re: Indentations - possible Vim7 bug [PATCH]
Benji Fisher wrote: On Thu, May 18, 2006 at 10:20:38AM +, Dan Clarke wrote: Hi. I've just installed Vim 7. l use MS Windows. I've found a problems with the indentations. You can replicate it by doing the following ... - Copy a whole word into the clipboard. - In a C/C++ file, position the cursor on a line of text that is indented. - Press the 'o' key to go onto the next line in insert mode. - (The next line should automatically be indented to match the previous line). - Now press control-v to paste the word from the clipboard. In previous versions of Vim this pasted word would of appeared indented. In Vim7, for some reason the auto indentation seems to of been deleted. Thanks, - Dan The following patch to $VIMRUNTIME/autoload/patch.vim (simple enough to apply manually if you do not have a patch program) should fix this problem. 15c15 let paste#paste_cmd['i'] = 'Esc' . paste#paste_cmd['n'] . 'gi' --- let paste#paste_cmd['i'] = 'xBSEsc' . paste#paste_cmd['n'] . 'gi' Looks like a good solution to me. Did someone see any undesired side effects? -- In war we're tough and able. Quite indefatigable Between our quests We sequin vests And impersonate Clark Gable It's a busy life in Camelot. I have to push the pram a lot. Monty Python and the Holy Grail PYTHON (MONTY) PICTURES LTD /// 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: Inability to map C-N when completion popup is visible
On Fri, 16 Jun 2006 at 8:25am, David Fishburn wrote: -Original Message- From: Hari Krishna Dara [mailto:[EMAIL PROTECTED] Sent: Thursday, June 15, 2006 8:23 PM To: vim@vim.org Subject: Inability to map C-N when completion popup is visible I am trying to map C-N and C-P to behave differently when pumvisible() returns true, but Vim seems to completely ignore this. E.g., if I create this unconditional map (a much simpler one than what I wanted): inoremap C-N C-C pressing ^N normally stops insertmode, but when popup is visible, Vim never executes the map. This may be true for C-P also, but the same is not true for, say Up. inoremap Up C-C Using the above map, pressing Up arrow always stops insert mode, whether popup is visible or not. Is this a bug? I tested by starting with -u NONE option to avoid any other interferences. I had a lot of problems trying to get this to work as well. In the end I was unable to map it without making a function call. autoload/sqlcomplete.vim does the following: if has('win32') imap buffer c-right C-R=sqlcomplete#DrillIntoTable()CR imap buffer c-left C-R=sqlcomplete#DrillOutOfColumns()CR endif function! sqlcomplete#DrillIntoTable() If the omni popup window is visible if pumvisible() call sqlcomplete#Map('column') C-Y, makes the currently highlighted entry active and trigger the omni popup to be redisplayed call feedkeys(\C-Y\C-X\C-O) else if has('win32') If the popup is not visible, simple perform the normal C-Right behaviour exec normal! \C-Right endif endif return endfunction In this case, if the popup window is not visible I want to perform the standard C-Right so the user does not loose any functionality due to the mapping. For the lurkers, this is for Vim7 since pumvisible() and feedkeys() are Vim7 functions. HTH, Dave I give up. The procedure you came up with works for other keys but not for C-N (and possibly C-P as well). The function doesn't even get called when completion popup is visible. Even for other keys where the function gets called, I made several attempts to do what I want and none worked properly. What I want is to remap Down to C-N (which is no problem) but to also move the cursor to the end of the line before doing C-N. I had two mixed results. In the first result, I am able to move the cursor to the end, but C-N will then be treated as a trigger for fresh insert mode completion (and I am not using a 'completefunc' to set matches, so my completions get overwritten by what Vim generates by default). In the second result, C-N works, but the cursor is not moved to the end of the line. I tried to use all kinds of tricks mixing the use of feedkeys(), inputsave/restore() and others. Something is very fishy about C-N, when it is anywhere in the map (LHS or RHS), everything else gets ignored. -- Thanks, Hari __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Making Omni Complete suggest but not complete
Is there any way to make omni complete popup a list of suggestions but not immediately add one of them to the buffer? I find omni complete very useful but it's incredibly annoying that it auto-chooses one of the entries. I'd prefer it popup the list of suggestions but not modify the buffer. -- Jared
Re: Can not run any command with ! in W2K
Juan Lanus wrote: On 6/16/06, Bram Moolenaar [EMAIL PROTECTED] wrote: Mathias Michaelis wrote: If I do :!dir a console opens and says: C:\WINNT\system32\CMD.EXE /c dir shell returned -1 2) If 1) doesn't help, you may want to produce the phenomena outside of vim. Open a cmd-window and type something like path\to\vim\vimrun.exe %windir%\system32\cmd.exe /c dir Juan told me he could reproduce the error outside of vim like that. I then consulted http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_system.2c_._wsystem.asp and saw that vimrun.exe doesn't issue the full information of the error if the system() function call returns -1. This is why I suggest the following patch: I'm not sure perror() can be used in general after system(). Otherwise it makes sense. Besides capturing the error, I suggest that vimrun.exe do a safer parsing of its input. Vimrun assumes that a space in the command line is a space in the command path, and this issue demonstrates that it's not always true. Can you give me an example where vimrun fails? I'm quite sure the current mechanism should not be changed. Note that vimrun is only meant to be invoked from Vim, not by anything else. Windows might pass a COMSPEC string with slash arguments (slash in Windows is like hyphen in UNIX). Does system() work at all then? Also, vim (not vimrun but the vim.exe) doesn't seem to have honored the :set shell= stuff. It used the COMSPEC string despite the shell specified. For to trigger this issue set COMSPEC=...\cmd.exe /e:2048 and try to do !!dir Appears to work fine for me. Keep in mind that when you change 'shell' you also need to change other options, such as 'shellredir'. But I assume 'shell' didn't change here, only $COMSPEC. Vim essentially uses system() to execute 'shell'. This is tricky, but the only what that works reliably. -- Bravely bold Sir Robin, rode forth from Camelot, He was not afraid to die, Oh Brave Sir Robin, He was not at all afraid to be killed in nasty ways Brave, brave, brave, brave Sir Robin. Monty Python and the Holy Grail PYTHON (MONTY) PICTURES LTD /// 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: Inability to map C-N when completion popup is visible
On Fri, 16 Jun 2006 at 11:25am, Max Dyckhoff wrote: I give up. The procedure you came up with works for other keys but not for C-N (and possibly C-P as well). The function doesn't even get called when completion popup is visible. Even for other keys where the function gets called, I made several attempts to do what I want and none worked properly. What I want is to remap Down to C-N (which is no problem) but to also move the cursor to the end of the line before doing C-N. I had two mixed results. In the first result, I am able to move the cursor to the end, but C-N will then be treated as a trigger for fresh insert mode completion (and I am not using a 'completefunc' to set matches, so my completions get overwritten by what Vim generates by default). In the second result, C-N works, but the cursor is not moved to the end of the line. I tried to use all kinds of tricks mixing the use of feedkeys(), inputsave/restore() and others. Something is very fishy about C-N, when it is anywhere in the map (LHS or RHS), everything else gets ignored. There is a high probability that I am being dense, but it actually seems to work for me now. Here is what I'm doing. :imap C-N C-R=Wibble()CR function! Wibble() if pumvisible() return visible else return unvisible endif endf I type the beginning of a tag (actor_) and press C-P to open up the popup menu. Vim enters the first match (actor_get), and I then press C-N, and it changes the string to actor_getvisible. In normal insert mode pressing C-N just enters unvisible. Either I am misunderstanding the problem, or maybe I'm just special? Let me know if you need any more details of my setup. Max Strange... this works for me as well when I am not in my plugin window, but when the cursor is in the plugin window, it gets completely ignored (the breakpoint doesn't even get called, no buffer mapping for C-N to hide this, I checked). This beats me, but I think this is because of the way I am setting completion items. Instead of using the traditional 'completefunc' or 'omnifunc' approach (which involves invoking a keysequence), I am using the CursorMovedI event to set completions as soon as user types something (this is because, the whole purpose of the plugin is to show matches, so there is no point asking the user to press C-XC-U or any other key). Looks like I need to look deeper into the problem. Thanks to all. -- Hari __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Making Omni Complete suggest but not complete
On Fri, 16 Jun 2006 at 11:46am, Jared Parsons wrote: Is there any way to make omni complete popup a list of suggestions but not immediately add one of them to the buffer? I find omni complete very useful but it's incredibly annoying that it auto-chooses one of the entries. I'd prefer it popup the list of suggestions but not modify the buffer. You can workaround this by always returning the original text also as the first match. If you are writing a plugin, then it is easy for you to do this, but if you are using an existing plugin, you might have to wrap the original function and add the original text before returning it. The omni completion plugins should probably make this a standard setting. -- HTH, Hari __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Makefile indentation with spaces for line continuation
On Fri, 16 Jun 2006, John Orr wrote: [snip] Another alternative might be to enable expandtab (to get the spaces) and enter the tab characters explicitly - is there any easy way of inserting a tab character when expandtab is enabled? Yes. In Insert mode, you could either (a) hit Ctrl-v followed by Tab (b) hit Ctrl-v followed by Ctrl-i (c) hold down Ctrl and type vi (c) is essentially (b), but has a nice ring to it ;) Entering tab characters explicitly is what I normally do when editing makefiles, since I have 'expandtab' set. See :help i_ctrl-v :help i_ctrl-q HTH. -- Gerald
Re: Bug with gU and German sharp s?
Christian Ebert wrote: * Bram Moolenaar on Friday, June 16, 2006 at 17:24:20 +0200: I'll leave it up to language specialists to decide whether making straße uppercase should result in STRAßE or STRASSE. I thought it was STRASSE. Historic: STRASZE Now: STRASSE See: http://de.wikipedia.org/wiki/Versal-Eszett Logically it's much easier to use STRAßE, because the length doesn't change and the reverse operation works. STRASSE made lower case is strasse... The Swiss are more logic (they write Strasse) but also more prone to confusion: Ich trinke Alkohol in Massen. -- which might mean I drink alcohol in moderation or I drink alcohol galore. c :-) Maß (measure) vs. Masse (mass). Some say the reason why the Swiss don't use the eszet anymore (except, maybe, in archaic or pseudo-archaic lettering) is that they have no room for it on the QWERTZ keyboards of their Franco-Italo-German typewriters. I don't know if it is true. Best regards, Tony.
Re: Bug with gU and German sharp s?
Dnia piątek, 16 czerwca 2006 16:47, martin kraegeloh napisał: hmm, well ... this is as buggy as the java String.toUpperCase() method ;-) oracle for example does it right and leaves the sharp s as it is - because there is no upper case variant of it. I was thought that capital version of ß is SS... m.
Re: Bug with gU and German sharp s?
Dnia piątek, 16 czerwca 2006 13:34, Bram Moolenaar napisał: I see the problem. I'll put it in the todo list. Sub-problem with ß. In latin2 'encoding' (where ß also exists) it isn't changed to SS. I think behaviour should be the same for all encodings. m.
Re: Vim7 : tags and tabpage
SHANKAR R-R66203 wrote: Hi All, I am using tags very heavily. I am used to open the files in the same window or split window using tags. How to open a file for a tag under the cursor in a new tabpage. Regards, shankar :tab wincmd ] see :help :tab :help :wincmd :help CTRL-W_] Explanation: - If :command opens a new window, then :tab command opens a new tab instead - :wincmd keys is an Ex-command which does the same as the Normal-mode command Ctrl-W keys - Ctrl-W ] goes to the tag under the cursor in a new window. Note: If you use this command often, you may want to define a mapping, either (a) for the whole command: :map F9 :tab wincmd ]CR or (b) for the prefix :map F9 :tab wincmdSpace HTH, Tony.
Re: Vim7 : tags and tabpage
Hi, On 6/16/06, A.J.Mechelynck [EMAIL PROTECTED] wrote: SHANKAR R-R66203 wrote: Hi All, I am using tags very heavily. I am used to open the files in the same window or split window using tags. How to open a file for a tag under the cursor in a new tabpage. :tab wincmd ] see :help :tab :help :wincmd :help CTRL-W_] Explanation: - If :command opens a new window, then :tab command opens a new tab instead - :wincmd keys is an Ex-command which does the same as the Normal-mode command Ctrl-W keys - Ctrl-W ] goes to the tag under the cursor in a new window. Note: If you use this command often, you may want to define a mapping, either (a) for the whole command: :map F9 :tab wincmd ]CR or (b) for the prefix :map F9 :tab wincmdSpace Just wanted to add a note to the above description that when you pop the tag stack using CTRL-T, you will not go back to the previous tab. Instead the file will be opened in the current tab itself. - Yegappan
RE: Making Omni Complete suggest but not complete
I'm both working on a new plugin (C#) and using a couple of existing ones. I tried the hack of returning the original text as well. It works if you are using omni complete on demand. However I would like to add automatic omni complete after certain characters such as '.'. In that case you can't insert the existing text (there isn't any) and if you try and return '' as one of the valid words omni complete will just ignore it. Jared -Original Message- From: Hari Krishna Dara [mailto:[EMAIL PROTECTED] Sent: Friday, June 16, 2006 12:34 PM To: Jared Parsons Cc: vim@vim.org Subject: Re: Making Omni Complete suggest but not complete On Fri, 16 Jun 2006 at 11:46am, Jared Parsons wrote: Is there any way to make omni complete popup a list of suggestions but not immediately add one of them to the buffer? I find omni complete very useful but it's incredibly annoying that it auto-chooses one of the entries. I'd prefer it popup the list of suggestions but not modify the buffer. You can workaround this by always returning the original text also as the first match. If you are writing a plugin, then it is easy for you to do this, but if you are using an existing plugin, you might have to wrap the original function and add the original text before returning it. The omni completion plugins should probably make this a standard setting. -- HTH, Hari __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
RE: Making Omni Complete suggest but not complete
On Fri, 16 Jun 2006 at 2:23pm, Jared Parsons wrote: I'm both working on a new plugin (C#) and using a couple of existing ones. I tried the hack of returning the original text as well. It works if you are using omni complete on demand. However I would like to add automatic omni complete after certain characters such as '.'. In that case you can't insert the existing text (there isn't any) and if you try and return '' as one of the valid words omni complete will just ignore it. Jared Yep, I saw that problem as well. As I mentioned in one of my other threads, I am trying to do automatic completion after every character using CursorMovedI event, and observe this issue sometimes, even when I always have some text to return. If you are triggering completion on say '.', see if you can automatically rollback the completion by also doing a C-P. However you might not find a hook to invoke C-P As a workaround, how about marking the start of completion as including the . character, and include . also as the first result? This will not work on the first column in the line, but I bet you will not face that problem. -- HTH, Hari -Original Message- From: Hari Krishna Dara [mailto:[EMAIL PROTECTED] Sent: Friday, June 16, 2006 12:34 PM To: Jared Parsons Cc: vim@vim.org Subject: Re: Making Omni Complete suggest but not complete On Fri, 16 Jun 2006 at 11:46am, Jared Parsons wrote: Is there any way to make omni complete popup a list of suggestions but not immediately add one of them to the buffer? I find omni complete very useful but it's incredibly annoying that it auto-chooses one of the entries. I'd prefer it popup the list of suggestions but not modify the buffer. You can workaround this by always returning the original text also as the first match. If you are writing a plugin, then it is easy for you to do this, but if you are using an existing plugin, you might have to wrap the original function and add the original text before returning it. The omni completion plugins should probably make this a standard setting. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Bug with gU and German sharp s?
Mikolaj Machowski wrote: Dnia piątek, 16 czerwca 2006 13:34, Bram Moolenaar napisał: I see the problem. I'll put it in the todo list. Sub-problem with ß. In latin2 'encoding' (where ß also exists) it isn't changed to SS. I think behaviour should be the same for all encodings. m. In UTF-8 encoding, ~ over an ß in Vim doesn't change it, which IMHO is an error. In a Swiss locale (including Liechtenstein), the eszet ß is not used. I don't know if this is related to what you're saying about latin1 vs. latin2. In other German-language locales: - ss may be used instead of ß if the latter is unavailable, e.g., on a typewriter with no ß glyph - the uppercase form of ß is SS - the lowercase form of SS is ß after a long vowel, ss otherwise according to the latest -- and still controversial -- reform of German orthography, which is supposed to be official since 1 August 1998 and mandatory starting 1 August 2006. I've heard that many German speakers and German-language publishers still cling to the older spelling (established ca. 1901). IIUC, the uppercase form of ß was SZ before that older reform; hence the name eszet. In Fraktur or black-letter fonts, the ß glyph is a ligature consisting of a long s and a z, instead of long s + short s as in Roman fonts. (The long s looks like an f without the horizontal bar.) Best regards, Tony.
RE: Making Omni Complete suggest but not complete
-Original Message- From: Hari Krishna Dara [mailto:[EMAIL PROTECTED] Sent: Friday, June 16, 2006 2:54 PM To: Jared Parsons Cc: vim@vim.org Subject: RE: Making Omni Complete suggest but not complete On Fri, 16 Jun 2006 at 2:23pm, Jared Parsons wrote: I'm both working on a new plugin (C#) and using a couple of existing ones. I tried the hack of returning the original text as well. It works if you are using omni complete on demand. However I would like to add automatic omni complete after certain characters such as '.'. In that case you can't insert the existing text (there isn't any) and if you try and return '' as one of the valid words omni complete will just ignore it. Jared Yep, I saw that problem as well. As I mentioned in one of my other threads, I am trying to do automatic completion after every character using CursorMovedI event, and observe this issue sometimes, even when I always have some text to return. If you are triggering completion on say '.', see if you can automatically rollback the completion by also doing a C-P. However you might not find a hook to invoke C-P As a workaround, how about marking the start of completion as including the . character, and include . also as the first result? This will not work on the first column in the line, but I bet you will not face that problem. That's a good solution. The drop down will look a bit funny but it should solve the immediate issue. Is there a fix planned for this in the future. Some option I can specify to prevent auto-insertion of a match? -- Jared -- HTH, Hari -Original Message- From: Hari Krishna Dara [mailto:[EMAIL PROTECTED] Sent: Friday, June 16, 2006 12:34 PM To: Jared Parsons Cc: vim@vim.org Subject: Re: Making Omni Complete suggest but not complete On Fri, 16 Jun 2006 at 11:46am, Jared Parsons wrote: Is there any way to make omni complete popup a list of suggestions but not immediately add one of them to the buffer? I find omni complete very useful but it's incredibly annoying that it auto-chooses one of the entries. I'd prefer it popup the list of suggestions but not modify the buffer. You can workaround this by always returning the original text also as the first match. If you are writing a plugin, then it is easy for you to do this, but if you are using an existing plugin, you might have to wrap the original function and add the original text before returning it. The omni completion plugins should probably make this a standard setting. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
RE: Making Omni Complete suggest but not complete
On Fri, 16 Jun 2006 at 3:04pm, Jared Parsons wrote: -Original Message- From: Hari Krishna Dara [mailto:[EMAIL PROTECTED] Sent: Friday, June 16, 2006 2:54 PM To: Jared Parsons Cc: vim@vim.org Subject: RE: Making Omni Complete suggest but not complete On Fri, 16 Jun 2006 at 2:23pm, Jared Parsons wrote: I'm both working on a new plugin (C#) and using a couple of existing ones. I tried the hack of returning the original text as well. It works if you are using omni complete on demand. However I would like to add automatic omni complete after certain characters such as '.'. In that case you can't insert the existing text (there isn't any) and if you try and return '' as one of the valid words omni complete will just ignore it. Jared Yep, I saw that problem as well. As I mentioned in one of my other threads, I am trying to do automatic completion after every character using CursorMovedI event, and observe this issue sometimes, even when I always have some text to return. If you are triggering completion on say '.', see if you can automatically rollback the completion by also doing a C-P. However you might not find a hook to invoke C-P As a workaround, how about marking the start of completion as including the . character, and include . also as the first result? This will not work on the first column in the line, but I bet you will not face that problem. That's a good solution. The drop down will look a bit funny but it should solve the immediate issue. Is there a fix planned for this in the future. Some option I can specify to prevent auto-insertion of a match? -- Jared I don't know if Bram will consider this as a bug or a feature request. Besides, I think he is still not through his backlog, after his vacation. -- Thanks, Hari __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com