Re: PHP Omnicompletion
On Thu, Aug 5, 2010 at 3:20 AM, Shawn B. shawncp...@gmail.com wrote: As per numerous requests I've been told to post here to get my updated phpcomplete.vim script (http://www.vim.org/scripts/script.php? script_id=3171) included as the default in 7.3. How does one go about doing that? In general you'd contact the maintainer of the currently provided script and see if you can have your changes included. Alternatively, and if the above has failed for some reason, is there some general consensus that your version is superior to the currently provided script? Regards, Doug -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
GTK GUI: columns is sometimes set to 122 even though I set it in GUIEnter
I have an occasional issue where my sessions do not restore the window size correctly. This is in 7.3d, using GTK GUI (the issue may well exist under Windows, but I haven't tried it there yet). I have a rather complex sessions setup, but the point is that I save a special value WinColumns (among others) which, after I read in a session, I set the columns to. Generally it works fine. In the case where I am starting gvim, I do this setting in a function called inside a GUIEnter autocommand, to ensure that the GUI is up and running before I try to set the columns. This also generally works fine. However, on occasion -- about every third or fourth time on average -- the GUI decides to set the columns to the (very odd) default value of 122, rather than to the value of WinColumns. I can see that WinColumns is correctly set to the value I expect, and the echom I placed to give that info is in the code which actually sets the columns size. But as I said, every so often gvim seems to ignore my directive. Since it usually works, I assume that my code is mostly fine, and that there is something odd, perhaps, in the timing of events that I don't understand. Any insights would be helpful. Best regards, Ron -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: find file problem
On Thu, Aug 5, 2010 at 3:59 PM, Skip bezrod...@gmail.com wrote: 2. s...@skip:~/work/breakout2/TlkMessageExchange$ LANG=C vim -u NONE - U NONE . 3. input :set nocompatible 4. input :set path=./include 5. input :find lib.h E345: Can't find file lib.h in path 6. input :set path=include 7. input :find lib.h File successfully opened. Thanks for testing and reporting this behavior. I don't think this is a bug. The dot in ./include means the include directory under the directory of the the current file, and your current file in step 5 is the . directory, which has no real _filename_ associated with it, hence the error message. I think it's easy to modify the code to make it work like what you expect, but that depends on whether the functionality is really needed. nazri. -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Vim 7.3d ready for beta testing
On 04/08/10 19:15, Bram Moolenaar wrote: Hello Vim users, Announcing: Vim (Vi IMproved) version 7.3d BETA This is a BETA release of Vim 7.3. It consists of Vim 7.2 plus all patches, updated runtime files and some more. 7.3d is for a large part the same as 7.3c, but the MS-Windows executables have been build with MSVC 2008. They should now work on Windows 2000 too. The install and uninstall problems for 64 bit systems have been fixed (I hope). [...] Wow! Thats's a fast one! Happy Vimming! Tony. -- One man's theology is another man's belly laugh. -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: GTK GUI: columns is sometimes set to 122 even though I set it in GUIEnter
This script replicates the problem, simply gvim -u test.vim (assuming you call this 'test.vim') set nocp set viminfo=c,!,1000,'1000 set sessionoptions=globals,buffers,slash,localoptions,folds,tabpages,unix fun TestLeave() let g:WinCol=columns wv! test.viminfo mks! test.sessinfo endfunc fun TestStart() if exists(g:WinCol) let columns=g:WinCol endif endfunc au VimLeave * nested :call TestLeave() au GUIEnter * nested :call TestStart() load our viminfo/sessioninfo rv test.viminfo so test.sessinfo -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Question about :find completion support in Vim 7.3b
On Thu, Aug 5, 2010 at 4:11 AM, Bram Moolenaar b...@moolenaar.net wrote: I noticed another problem: with 'path' set to ./** and in an empty buffer :find completion crashes. =A0I fixed it. Thanks. I'll add this check to the test script. I've updated the test to check for this and a few more conditions. The test script works OK on Unix, but on MS-Windows it only finds two of the three files. Also interactively, so this appears to be a problem in the implementation. Attached patch 0002 fixes this issue. I already changed it to use three separate mkdir commands, as mkdir -p doesn't work on MS-Windows (and some old Unixen too). The mkdir Xfind/in gives error on windows, it should be mkdir Xfind\in. I've modified it to work on both unix and windows in patch 0003. I used an edit command instead of :!echo to make it portable. What I can't figure out is a portable way to delete the created directories. rmdir /s /q Xfind should work, but it gives an error for the /s option... Patch 0003 checks the platform using has(win??) and runs the appropriate command. Patch 0001 moves the check for path_with_url() for skipping urls during find completion from globpath() into expand_path_option(). That is the correct place to make the call for excluding any non-supported path for find completion. test73.in should now run successfully on both unix and windows. nazri. -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php From fc8868bfedaf9551f6274d3946790d06b2ec0364 Mon Sep 17 00:00:00 2001 From: Nazri Ramliy ayieh...@gmail.com Date: Thu, 5 Aug 2010 09:59:04 +0800 Subject: [PATCH 1/3] find completion: Path url should be skipped earlier. Doing it in globpath() is too late and not appropriate. --- src/ex_getln.c |6 -- src/misc1.c|2 ++ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/ex_getln.c b/src/ex_getln.c index 790d531..948e59a 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -5045,12 +5045,6 @@ globpath(path, file, expand_options) { /* Copy one item of the path to buf[] and concatenate the file name. */ copy_option_part(path, buf, MAXPATHL, ,); - if (path_with_url(buf)) - continue; - /* - * FIXME: should we proactively skip 'path' with limiter (/usr/ **N) - * and upward search (;) notations, just like we did with url above? - */ if (STRLEN(buf) + STRLEN(file) + 2 MAXPATHL) { add_pathsep(buf); diff --git a/src/misc1.c b/src/misc1.c index c8fb8eb..ef7c10c 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -9337,6 +9337,8 @@ expand_path_option(curdir, gap) } else if (buf[0] == NUL) /* relative to current directory */ STRCPY(buf, curdir); + else if (path_with_url(buf)) + continue; else if (!mch_isFullName(buf)) { /* Expand relative path to their full path equivalent */ -- 1.7.2.1.6.g61bf12 From 116422ea986dc2bb568c0b943c6fa5460999e61e Mon Sep 17 00:00:00 2001 From: Nazri Ramliy ayieh...@gmail.com Date: Thu, 5 Aug 2010 12:32:02 +0800 Subject: [PATCH 2/3] find completion on windows: use / as path separator when joining path --- src/ex_getln.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/ex_getln.c b/src/ex_getln.c index 948e59a..0c48fe8 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -5047,7 +5047,16 @@ globpath(path, file, expand_options) copy_option_part(path, buf, MAXPATHL, ,); if (STRLEN(buf) + STRLEN(file) + 2 MAXPATHL) { +#ifdef WIN3264 + /* + * Using the platform's path separator (\) makes vim incorrectly + * treat it as an escape character, use '/' instead. + * TODO: Add it only if there is none yet, like add_pathsep does. + */ + STRCAT(buf, /); +#else add_pathsep(buf); +#endif STRCAT(buf, file); if (ExpandFromContext(xpc, buf, num_p, p, WILD_SILENT|expand_options) != FAIL num_p 0) -- 1.7.2.1.6.g61bf12 From e3cba918c80dda9f7ee2c05c08980d4462de368f Mon Sep 17 00:00:00 2001 From: Nazri Ramliy ayieh...@gmail.com Date: Thu, 5 Aug 2010 13:50:41 +0800 Subject: [PATCH 3/3] Add more tests to find completion (test73.in) --- src/testdir/test73.in | 81 ++-- src/testdir/test73.ok |8 + 2 files changed, 85 insertions(+), 4 deletions(-) diff --git a/src/testdir/test73.in b/src/testdir/test73.in index 8928aeb..c9684a3 100644 --- a/src/testdir/test73.in +++ b/src/testdir/test73.in @@ -1,23 +1,96 @@ Tests for find completion. STARTTEST +: Do all test in a separate window to avoid E211 when we recursively +: delete the Xfind directory during cleanup + +:function! DeleteDirectory(dir) +: if has(win32) || has(win95) || has(win64) || has(win16) +: exec silent !rmdir /Q /S . a:dir +: else +: exec silent !rm -rf . a:dir +: endif +:endfun +: On windows a stale Xfind directory may exist, remove it so that +: we start from a
Re: GTK GUI: columns is sometimes set to 122 even though I set it in GUIEnter
Now confirmed that this does NOT happen on Windows, but does on GTK -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
PHP syntax script problem
Hi, When using :vglobal/\S/,/\S/-j|noh (this reduces several empty lines following one another to just one line) on a php file: ?php class Test { public function init() { echo '1'; echo '2'; echo '3'; echo '4'; echo '5'; } } with :set foldmethod=syntax and everything folded (zM) the code is scrambled: ?php class Test { public function init() { echo '1'; echo '2'; echo '3'; echo '4'; echo '5'; } } I imagine this is a PHP syntax script problem -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
E315: ml_get: invalid lnum
Hi, 1. :help 2. 10GVjesc 3. :ene 4. Use MiddleMouse to paste the text but don't do it above line 1 5. u 6. Use MiddleMouse to paste the text and do it above line 1 7. ddu^R Error message: E315: ml_get: invalid lnum: 3 E315: ml_get: invalid lnum: 3 :version VIM - Vi IMproved 7.3d BETA (2010 Aug 4, compiled Aug 4 2010 18:38:10) MS-Windows 32-bit GUI version with OLE support Compiled by b...@kibaale Big version with GUI. Features included (+) or not (-): +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +gettext/dyn -hangul_input +iconv/dyn +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse +mouseshape +multi_byte_ime/dyn +multi_lang -mzscheme +netbeans_intg +ole -osfiletype +path_extra +perl/dyn +persistent_undo -postscript +printer -profile +python/dyn +python3/dyn +quickfix +reltime +rightleft +ruby/dyn +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white +tcl/dyn -tgetent -termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -xfontset -xim -xterm_save +xpm_w32 system vimrc file: $VIM\vimrc user vimrc file: $HOME\_vimrc 2nd user vimrc file: $VIM\_vimrc user exrc file: $HOME\_exrc 2nd user exrc file: $VIM\_exrc system gvimrc file: $VIM\gvimrc user gvimrc file: $HOME\_gvimrc 2nd user gvimrc file: $VIM\_gvimrc system menu file: $VIMRUNTIME\menu.vim Compilation: cl -c /W3 /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_XPM_W32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 /Fo.\ObjGOLYHTR/ /Ox /GL - DNDEBUG /Zl /MT -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\tcl83.dll\ -DDYNAMIC_TCL_VER=\8.3 \ -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\python27.dll\ -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\python31.dll\ -DFEAT_PERL -DDYNAMIC_PERL -DDYNAMIC_PERL_DL L=\perl512.dll\ -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=191 -DDYNAMIC_RUBY_DLL=\msvcrt-ruby191.dll\ -DFEAT_BIG /Fd.\ObjGOLYHTR/ /Zi Linking: link /RELEASE /nologo /subsystem:windows /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib /machine:i386 /nodefaultlib gdi 32.lib version.lib winspool.lib comctl32.lib advapi32.lib shell32.lib /machine:i386 /nodefaultlib libcmt.lib oleaut32.lib user32.lib /nodefaultlib:python27.lib /nodefaultlib:pytho n31.lib e:\tcl\lib\tclstub83.lib WSock32.lib e:\xpm\lib\libXpm.lib /PDB:gvim.pdb -debug -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re : PHP syntax script problem
Hi, When using :vglobal/\S/,/\S/-j|noh (this reduces several empty lines following one another to just one line) on a php file: ?php class Test { public function init() { echo '1'; echo '2'; echo '3'; echo '4'; echo '5'; } } with :set foldmethod=syntax and everything folded (zM) the code is scrambled: ?php class Test { public function init() { echo '1'; echo '2'; echo '3'; echo '4'; echo '5'; } } I imagine this is a PHP syntax script problem I forgot to precise: :version VIM - Vi IMproved 7.3d BETA (2010 Aug 4, compiled Aug 4 2010 18:38:10) MS-Windows 32-bit GUI version with OLE support Compiled by b...@kibaale Big version with GUI. Features included (+) or not (-): +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +gettext/dyn -hangul_input +iconv/dyn +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse +mouseshape +multi_byte_ime/dyn +multi_lang -mzscheme +netbeans_intg +ole -osfiletype +path_extra +perl/dyn +persistent_undo -postscript +printer -profile +python/dyn +python3/dyn +quickfix +reltime +rightleft +ruby/dyn +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white +tcl/dyn -tgetent -termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -xfontset -xim -xterm_save +xpm_w32 system vimrc file: $VIM\vimrc user vimrc file: $HOME\_vimrc 2nd user vimrc file: $VIM\_vimrc user exrc file: $HOME\_exrc 2nd user exrc file: $VIM\_exrc system gvimrc file: $VIM\gvimrc user gvimrc file: $HOME\_gvimrc 2nd user gvimrc file: $VIM\_gvimrc system menu file: $VIMRUNTIME\menu.vim Compilation: cl -c /W3 /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_XPM_W32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 /Fo.\ObjGOLYHTR/ /Ox /GL -D NDEBUG /Zl /MT -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\tcl83.dll\ -DDYNAMIC_TCL_VER=\8.3\ -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\python27.dll\ -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\python31.dll\ -DFEAT_PERL -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\ perl512.dll\ -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=191 -DDYNAMIC_RUBY_DLL=\msvcrt-ruby191.dll\ -DFEAT_BIG /Fd.\ObjGOLYHTR/ /Zi Linking: link /RELEASE /nologo /subsystem:windows /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib /machine:i386 /nodefaultlib gdi3 2.lib version.lib winspool.lib comctl32.lib advapi32.lib shell32.lib /machine:i386 /nodefaultlib libcmt.lib oleaut32.lib user32.lib /nodefaultlib:python27.lib /nodefaultlib:python3 1.lib e:\tcl\lib\tclstub83.lib WSock32.lib e:\xpm\lib\libXpm.lib /PDB:gvim.pdb -debug -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Vim 7.3d ready for beta testing
Ben Fritz wrote: On Aug 4, 12:15=A0pm, Bram Moolenaar b...@moolenaar.net wrote: I will no longer include new features in 7.3, it's only testing now. I assume bug fixes don't count as new features and can still be included. Of course. Let's try to get the most important bugs fixed. About how long until 7.3 is out of beta entirely, do you think? About a week. I guess there are two more beta versions before that. -- hundred-and-one symptoms of being an internet addict: 9. All your daydreaming is preoccupied with getting a faster connection to the net: 28.8...ISDN...cable modem...T1...T3. /// Bram Moolenaar -- b...@moolenaar.net -- 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/// -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: PHP Omnicompletion
On 8/5/2010 2:36 AM, Doug Kearns wrote: On Thu, Aug 5, 2010 at 3:20 AM, Shawn B.shawncp...@gmail.com wrote: As per numerous requests I've been told to post here to get my updated phpcomplete.vim script (http://www.vim.org/scripts/script.php? script_id=3171) included as the default in 7.3. How does one go about doing that? Shawn, I was looking at the description you have at: http://www.vim.org/scripts/script.php?script_id=3171 $instance = new Class; ... $instance-Blah(); // -- complete without comment It also allows support for singleton instantiations: $instance = Class::getInstance(); $instance-completeMe(); // sweet completion In both cases of completion, since you have not shown the methods of your class, it isn't clear what was typed and what was completed or if it was appropriate. Could you possibly put in some stubs for your class and then perhaps show something like this: $instance-C-XC-O $instance-completeMe(); // sweet completion Or $instance- (completion is automatic when typing the $instance-completeMe(); // sweet completion Dave -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: PHP Omnicompletion
It's omnicompletion so if you don't have a tab-complete or some other type of plugin to complete on another key it is the default ^X^O inscompletion method. Either way I've disambiguated the description accordingly. On Thu, Aug 5, 2010 at 10:48 AM, David Fishburn dfishburn@gmail.comwrote: On 8/5/2010 2:36 AM, Doug Kearns wrote: On Thu, Aug 5, 2010 at 3:20 AM, Shawn B. shawncp...@gmail.com shawncp...@gmail.com wrote: As per numerous requests I've been told to post here to get my updated phpcomplete.vim script (http://www.vim.org/scripts/script.php? script_id=3171) included as the default in 7.3. How does one go about doing that? Shawn, I was looking at the description you have at: http://www.vim.org/scripts/script.php?script_id=3171 $instance = new Class; ... $instance-Blah(); // -- complete without comment It also allows support for singleton instantiations: $instance = Class::getInstance(); $instance-completeMe(); // sweet completion In both cases of completion, since you have not shown the methods of your class, it isn't clear what was typed and what was completed or if it was appropriate. Could you possibly put in some stubs for your class and then perhaps show something like this: $instance-C-XC-O $instance-completeMe(); // sweet completion Or $instance- (completion is automatic when typing the $instance-completeMe(); // sweet completion Dave -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: PHP Omnicompletion
On 8/5/2010 11:11 AM, Shawn Biddle wrote: It's omnicompletion so if you don't have a tab-complete or some other type of plugin to complete on another key it is the default ^X^O inscompletion method. Either way I've disambiguated the description accordingly. Yes, much better. Thanks, Dave -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: PHP syntax script problem
On Thu, 5 Aug 2010, Dimitar DIMITROV wrote: Hi, When using :vglobal/\S/,/\S/-j|noh (this reduces several empty lines following one another to just one line) on a php file: ?php class Test { public function init() { echo '1'; echo '2'; echo '3'; echo '4'; echo '5'; } } with :set foldmethod=syntax and everything folded (zM) the code is scrambled: ?php class Test { public function init() { echo '1'; echo '2'; echo '3'; echo '4'; echo '5'; } } I imagine this is a PHP syntax script problem Doesn't have anything to do with PHP. Using this file: test.txt leading a b c d following == With fdm=manual, create a manual fold over the 'a' line through the 'd' line (using 'zf'). Same 'problem'. But, I'm not sure what that problem is, since I'm not sure how your :vglobal command works. Roughly, from what I can tell: :vglobal/\S/ -- for all lines without non-whitespace (i.e. forall blank lines): ,-- repeat last f F t T search (or does ',' do something different here?) /\S/ -- find next non-whitespace line -j -- join with prior line ( |noh -- then disable hlsearch) -- Best, Ben -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: [PATCH] Add options for opening dropped files in new tabs
On 4 August 2010 20:16, björn bjorn.winck...@gmail.com wrote: On 4 August 2010 21:01, Michael Trim wrote: The two options as implemented in the patch are not mutually exclusive, though they could perhaps be better named: - nodropnewtab + nodropsplit (default) = current behaviour, where dropped files will be opened in a (horizontally) split window if Ctrl is held or the current buffer has unsaved changes. - nodropnewtab + dropsplit = dropped files are always opened in a split window, unless Ctrl is held. - dropnewtab + nodropsplit = same as the current behaviour but with tabs, i.e. dropped files will be opened in a tab if Ctrl is held or the current buffer has unsaved changes. - dropnewtab + dropsplit = dropped files are always opened in a new tab, unless Ctrl is held. I see. Well, then this patch is somewhat irrelevant for MacVim anyway as MacVim does not support holding modifier keys when dropping files, so I will withdraw from this thread... Björn The Ctrl key functionality is part of the existing code, and is not relied on or provided by this patch. The Ctrl modifier just allows the user to force the opposite behaviour to the actual state of the 'dropsplit' option. Without modifier support the behaviour will always be as configured, so I think MacVim could still use this. --Mike -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: PHP syntax script problem
On Thu, Aug 05, 2010 at 11:52:58AM -0400, Benjamin R. Haskell wrote: Roughly, from what I can tell: :vglobal/\S/ -- for all lines without non-whitespace (i.e. forall blank lines): ,-- repeat last f F t T search (or does ',' do something different here?) /\S/ -- find next non-whitespace line The comma behavior you describe is for normal mode. Here it is being used to delimit a range (:help cmdline-ranges). ,/\S/ is the same as .,/\S/. -- James GPG Key: 1024D/61326D40 2003-09-02 James Vega james...@jamessan.com signature.asc Description: Digital signature
Re: PHP syntax script problem
On Thu, 5 Aug 2010, James Vega wrote: On Thu, Aug 05, 2010 at 11:52:58AM -0400, Benjamin R. Haskell wrote: Roughly, from what I can tell: :vglobal/\S/ -- for all lines without non-whitespace (i.e. forall blank lines): ,-- repeat last f F t T search (or does ',' do something different here?) /\S/ -- find next non-whitespace line The comma behavior you describe is for normal mode. Here it is being used to delimit a range (:help cmdline-ranges). ,/\S/ is the same as .,/\S/. Ah, thanks. I thought it looked 'range-like', but I didn't know the first portion of a range was optional. So, is the original problem related to ranges within closed folds? Or to '-j' within closed folds? It's odd that it doesn't happen without them. -- Best, Ben -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: [PATCH] Add options for opening dropped files in new tabs
On 5 August 2010 19:24, Michael Trim wrote: The Ctrl key functionality is part of the existing code, and is not relied on or provided by this patch. The Ctrl modifier just allows the user to force the opposite behaviour to the actual state of the 'dropsplit' option. Without modifier support the behaviour will always be as configured, so I think MacVim could still use this. Sorry, I wasn't quite clear: MacVim doesn't support the Ctrl modifier as it is (due to some weirdness with the Cocoa dragdrop API). Since your patch still relies on the Ctrl key I cannot benefit from it (which is fine since there is already a setting to make dropped files open in tabs/splits/... in MacVim). From my point of view, it would be nice to have this functionality in all gvim ports, but since I guess other ports will keep relying on modifier keys to distinguish different type of drops it doesn't matter so much to me how it is done. (Of course, it would be feasible to rewrite the dragdrop so that no modifier keys are required by having one option which defines how dropped files should open [split/tab/...] and then MacVim could make use of it. On platforms where modifiers are supported they can modify the drop behavior similarly to how they do now...) Björn -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: [PATCH] Add options for opening dropped files in new tabs
On 5 August 2010 20:43, björn wrote: On 5 August 2010 19:24, Michael Trim wrote: The Ctrl key functionality is part of the existing code, and is not relied on or provided by this patch. The Ctrl modifier just allows the user to force the opposite behaviour to the actual state of the 'dropsplit' option. Without modifier support the behaviour will always be as configured, so I think MacVim could still use this. Sorry, I wasn't quite clear: MacVim doesn't support the Ctrl modifier as it is (due to some weirdness with the Cocoa dragdrop API). Since your patch still relies on the Ctrl key I cannot benefit from it (which is fine since there is already a setting to make dropped files open in tabs/splits/... in MacVim). From my point of view, it would be nice to have this functionality in all gvim ports, but since I guess other ports will keep relying on modifier keys to distinguish different type of drops it doesn't matter so much to me how it is done. (Of course, it would be feasible to rewrite the dragdrop so that no modifier keys are required by having one option which defines how dropped files should open [split/tab/...] and then MacVim could make use of it. On platforms where modifiers are supported they can modify the drop behavior similarly to how they do now...) Oh my, I did not read your post correctly. I see what you mean now. Sorry for being so obtuse. I still find the new options a bit unintuitive...ideally I'd like there to be one option that defines how drops are treated (tab/split/vsplit/add to arglist) but this doesn't account for how modifiers should be handled. Björn -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: BUG: ``E685: Internal error: func_unref()'' when using delfunction on local function varible containing a dictionary function
ZyX (?) wrote: Attached script causes a error when sourced using vim -u NONE -c 'set nocompatible' -c 'so ~/tmp/vim/test-bug.vim Error message: Error detected while processing /home/zyx/tmp/vim/test-bug.vim: line8: E685: Internal error: func_unref() E685: Internal error: func_unref() Tested on vim-7.2.442 and vim-7.3 revision 2493:ed997d0ceb2674b8fb3d707130647197c5cf8f83. I can reproduce it. I'll add it to the todo list. -- hundred-and-one symptoms of being an internet addict: 10. And even your night dreams are in HTML. /// Bram Moolenaar -- b...@moolenaar.net -- 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/// -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Problem with latest vimdiff
Gary Johnson wrote: Using the latest vim73, changeset c945fdb34ce3, Wed Aug 04 20:55:44 2010 +0200, the two windows of a vimdiff display can get out of sync. To demonstrate the problem, cd to the vim/src directory and execute this command. vim -d -N -u NONE -i NONE (hg cat -r ae22c450546c if_cscope.c) (hg cat -r 4269a0673478 if_cscope.c) The results are affected by the size of the changed regions and the number of lines in the terminal. For this example, I used an 80x24 xterm. The cursor will be in the upper left corner of the left window. Type j 6 times and the cursor will move down the window as it should. Type j again so that the cursor enters the top of the added lines and observe that the right window scrolls down and is no longer aligned with the left window. Type k and observe that the right window scrolls up but is still not aligned. Type k again and the right window continues to scroll up, one line at a time, until the cursor reaches the top of the left window, at which point the two windows are again properly aligned. I can reproduce it. One more for the todo list. -- hundred-and-one symptoms of being an internet addict: 13. You refer to going to the bathroom as downloading. /// Bram Moolenaar -- b...@moolenaar.net -- 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/// -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: E315: ml_get: invalid lnum
Dimitar Dimitrov wrote: 1. :help 2. 10GVjesc 3. :ene 4. Use MiddleMouse to paste the text but don't do it above line 1 5. u 6. Use MiddleMouse to paste the text and do it above line 1 7. ddu^R Error message: E315: ml_get: invalid lnum: 3 E315: ml_get: invalid lnum: 3 :version VIM - Vi IMproved 7.3d BETA (2010 Aug 4, compiled Aug 4 2010 18:38:10) MS-Windows 32-bit GUI version with OLE support I don't see the error. When doing dd, which line are you deleting? Did you start with vim -u NONE? -- hundred-and-one symptoms of being an internet addict: 11. You find yourself typing com after every period when using a word processor.com /// Bram Moolenaar -- b...@moolenaar.net -- 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/// -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: GTK GUI: columns is sometimes set to 122 even though I set it in GUIEnter
Ron Aaron wrote: I have an occasional issue where my sessions do not restore the window size correctly. This is in 7.3d, using GTK GUI (the issue may well exist under Windows, but I haven't tried it there yet). I have a rather complex sessions setup, but the point is that I save a special value WinColumns (among others) which, after I read in a session, I set the columns to. Generally it works fine. In the case where I am starting gvim, I do this setting in a function called inside a GUIEnter autocommand, to ensure that the GUI is up and running before I try to set the columns. This also generally works fine. However, on occasion -- about every third or fourth time on average -- the GUI decides to set the columns to the (very odd) default value of 122, rather than to the value of WinColumns. I can see that WinColumns is correctly set to the value I expect, and the echom I placed to give that info is in the code which actually sets the columns size. But as I said, every so often gvim seems to ignore my directive. Since it usually works, I assume that my code is mostly fine, and that there is something odd, perhaps, in the timing of events that I don't understand. Any insights would be helpful. GTK resizing is hacky. I could never figure out how to do it properly. I'm sure that when we try to fix this problem another one will pop up. I'm still hoping that some day someone comes forward who either understands how GTK resizing works or takes the time to dive into it. -- Me? A skeptic? I trust you have proof. /// Bram Moolenaar -- b...@moolenaar.net -- 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/// -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Question about :find completion support in Vim 7.3b
Nazri Ramliy wrote: On Thu, Aug 5, 2010 at 4:11 AM, Bram Moolenaar b...@moolenaar.net wrote: I noticed another problem: with 'path' set to ./** and in an empty buffer :find completion crashes. =A0I fixed it. Thanks. I'll add this check to the test script. I've updated the test to check for this and a few more conditions. The test script works OK on Unix, but on MS-Windows it only finds two of the three files. Also interactively, so this appears to be a problem in the implementation. Attached patch 0002 fixes this issue. I already changed it to use three separate mkdir commands, as mkdir -p doesn't work on MS-Windows (and some old Unixen too). The mkdir Xfind/in gives error on windows, it should be mkdir Xfind\in. I've modified it to work on both unix and windows in patch 0003. I used an edit command instead of :!echo to make it portable. What I can't figure out is a portable way to delete the created directories. rmdir /s /q Xfind should work, but it gives an error for the /s option... Patch 0003 checks the platform using has(win??) and runs the appropriate command. Patch 0001 moves the check for path_with_url() for skipping urls during find completion from globpath() into expand_path_option(). That is the correct place to make the call for excluding any non-supported path for find completion. test73.in should now run successfully on both unix and windows. Thank you very much for fixing the problems and enhancing the test. I'll include this and check that it works for me. The Xfind directory wasn't removed, you had the last :cd commented-out. Hmm, the test passes, but it rings the bell a lot. I can fix one (the empty line). The others appear to be for when completion of :find fails. I'm not sure how to avoid that. I'll add :set visualbell. -- hundred-and-one symptoms of being an internet addict: 14. You start introducing yourself as Jim at I-I-Net dot net dot au /// Bram Moolenaar -- b...@moolenaar.net -- 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/// -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: GTK GUI: columns is sometimes set to 122 even though I set it in GUIEnter
On Aug 5, 10:56 pm, Bram Moolenaar b...@moolenaar.net wrote: GTK resizing is hacky. I could never figure out how to do it properly. I'm sure that when we try to fix this problem another one will pop up. Arggh! Without really trying to understand the code, just by seeing what happens using my test file, it seems that a resize happens *after* the resize I attempt. That is, that the GUIEnter event maybe happens a little too early on GTK... is that likely? Could be that some events are queued up and get played back after or something like that... -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Updated Brazilian Portuguese translation
I hadn't updated the translation since I first uploaded it, so here is a patch against the old source. (Am I too late for 7.3?) Eduardo -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- pt_BR.po.orig 2010-08-04 20:01:41.0 -0300 +++ pt_BR.po 2010-08-05 19:21:51.0 -0300 @@ -2,12 +2,13 @@ # msgid msgstr -Project-Id-Version: Vim 7.0\n +Project-Id-Version: Vim 7.3\n Report-Msgid-Bugs-To: \n -POT-Creation-Date: 2008-07-11 19:38-0300\n -PO-Revision-Date: 2008-07-13 13:14-0300\n +POT-Creation-Date: 2010-08-04 20:05-0300\n +PO-Revision-Date: 2010-08-04 20:36-0300\n Last-Translator: Eduardo S. Dobay edudo...@gmail.com\n Language-Team: Brazilian Portuguese pt...@li.org\n +Language: pt_BR\n MIME-Version: 1.0\n Content-Type: text/plain; charset=ISO-8859-1\n Content-Transfer-Encoding: 8bit\n @@ -157,6 +158,9 @@ msgid [Quickfix List] msgstr [Lista quickfix] +msgid [Scratch] +msgstr [Rascunho] + msgid \n --- Signs --- @@ -176,12 +180,18 @@ msgid E96: Can not diff more than %ld buffers msgstr E96: Não é possível usar diff com mais de %ld buffers +msgid E810: Cannot read or write temp files +msgstr E810: Não foi possível ler ou gravar arquivos temporários + msgid E97: Cannot create diffs msgstr E97: diff não funcionou msgid Patch file msgstr Selecionar arquivo de patch +msgid E816: Cannot read patch output +msgstr E816: Não foi possível ler o resultado do patch + msgid E98: Cannot read diff output msgstr E98: Não foi possível ler o resultado do diff @@ -286,7 +296,6 @@ msgid Scanning: %s msgstr Examinando: %s -#, c-format msgid Scanning tags. msgstr Examinando tags. @@ -444,6 +453,9 @@ msgid E694: Invalid operation for Funcrefs msgstr E694: Operação inválida para Funcrefs +msgid E804: Cannot use '%' with Float +msgstr E804: Não é possível usar '%' com Float + msgid E110: Missing ')' msgstr E110: ')' faltando @@ -494,6 +506,14 @@ msgstr E724: variável aninhada demais para ser exibida #, c-format +msgid E740: Too many arguments for function %s +msgstr E740: Argumentos demais para a função %s + +#, c-format +msgid E116: Invalid arguments for function %s +msgstr E116: Argumentos inválidos para a função %s + +#, c-format msgid E117: Unknown function: %s msgstr E117: Função desconhecida: %s @@ -509,6 +529,9 @@ msgid E725: Calling dict function without Dictionary: %s msgstr E725: Função dict chamada sem um Dicionário: %s +msgid E808: Number or Float required +msgstr E521: Número ou Float requerido + msgid E699: Too many arguments msgstr E699: Argumentos demais @@ -585,14 +608,17 @@ msgid E677: Error writing temp file msgstr E677: Erro ao gravar o arquivo temporário -msgid E703: Using a Funcref as a number -msgstr E703: Funcref usada como número +msgid E805: Using a Float as a Number +msgstr E745: Float usado como Número + +msgid E703: Using a Funcref as a Number +msgstr E703: Funcref usada como Número -msgid E745: Using a List as a number -msgstr E745: Lista usada como número +msgid E745: Using a List as a Number +msgstr E745: Lista usada como Número -msgid E728: Using a Dictionary as a number -msgstr E728: Dicionário usado como número +msgid E728: Using a Dictionary as a Number +msgstr E728: Dicionário usado como Número msgid E729: using Funcref as a String msgstr E729: Funcref usada como String @@ -603,6 +629,9 @@ msgid E731: using Dictionary as a String msgstr E731: Dicionário usado como String +msgid E806: using Float as a String +msgstr E730: Float usado como String + #, c-format msgid E704: Funcref variable name must start with a capital: %s msgstr E704: Nome de variável Funcref deve começar com letra maiúscula: %s @@ -634,6 +663,10 @@ msgstr E698: variável aninhada demais para fazer uma cópia #, c-format +msgid E123: Undefined function: %s +msgstr E123: Função indefinida: %s + +#, c-format msgid E124: Missing '(': %s msgstr E124: '(' faltando: %s @@ -645,6 +678,14 @@ msgstr E126: :endfunction faltando #, c-format +msgid E707: Function name conflicts with variable: %s +msgstr E707: Nome da função em conflito com variável: %s + +#, c-format +msgid E127: Cannot redefine function %s: It is in use +msgstr E127: Não é possível redefinir a função %s: ela está em uso + +#, c-format msgid E746: Function name does not match script file name: %s msgstr E746: Nome da função não coincide com o nome de arquivo do script: %s @@ -685,7 +726,6 @@ msgid E133: :return not inside a function msgstr E133: :return fora de uma função -#, c-format msgid \n # global variables:\n @@ -700,6 +740,139 @@ \n \tDefinido pela última vez em +msgid No old files +msgstr Não há arquivos antigos + +msgid Entering Debug mode. Type \cont\ to continue. +msgstr Entrando modo de depuração. Digite \cont\ para continuar. + +#, c-format +msgid line %ld: %s +msgstr linha %ld: %s + +#, c-format
[PATCH] update version in gvim manifest
--- src/gvim.exe.mnf |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/gvim.exe.mnf b/src/gvim.exe.mnf index 0033979..26ade97 100644 --- a/src/gvim.exe.mnf +++ b/src/gvim.exe.mnf @@ -2,7 +2,7 @@ assembly xmlns=urn:schemas-microsoft-com:asm.v1 manifestVersion=1.0 xmlns:asmv3=urn:schemas-microsoft-com:asm.v3 assemblyIdentity processorArchitecture=* -version=7.2.0.0 +version=7.3.0.0 type=win32 name=Vim / -- 1.7.2.1 -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
using $curbuf-Count(), $curbuf-Delete() from embedded perl interpreter
I just figured out that $curbuf-Count() doesn't track the contents of $curbuf accross $curbuf-Delete() (and presumably other methods). For example: our $curbuf; my @buflines = $curbuf-Get(1 .. $curbuf-Count()); print LOG \...@buflines size before Delete: @buflines.\n; print LOG '$curbuf-Count() before Delete: '.$curbuf-Count().\n; $curbuf-Delete(1 .. $curbuf-Count()); print LOG '$curbuf-Count() after Delete: '.$curbuf-Count().\n; results in: @buflines size before Delete: 86 $curbuf-Count() before Delete: 86 $curbuf-Count() after Delete: 86 This was different that my expectations at least. I don't know if these methods get synced back up after a VIM::DoCommand that changes lines or not. It would be nice if the documentation would talk about this stuff. Probably the best way given the current behavior is to just read the whole buffer into perl, do whatever you have in mind, then write it back at the end. Methods for this might be a good idea. Also, it might be nice to show an example using 'our $curbuf' since this is a somewhat uncommon perl thing. Of course, using $curbuf everywhere is no so good anyway given the above issue. Britton -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: using $curbuf-Count(), $curbuf-Delete() from embedded perl interpreter
On Thu, Aug 5, 2010 at 5:53 PM, Britton Kerin britton.ke...@gmail.com wrote: I just figured out that $curbuf-Count() doesn't track the contents of $curbuf accross $curbuf-Delete() (and presumably other methods). For example: our $curbuf; my @buflines = $curbuf-Get(1 .. $curbuf-Count()); print LOG \...@buflines size before Delete: @buflines.\n; print LOG '$curbuf-Count() before Delete: '.$curbuf-Count().\n; $curbuf-Delete(1 .. $curbuf-Count()); print LOG '$curbuf-Count() after Delete: '.$curbuf-Count().\n; results in: @buflines size before Delete: 86 $curbuf-Count() before Delete: 86 $curbuf-Count() after Delete: 86 Have you verified that the file actually gets changed with the $curbuf-Delete() call? I would be surprised if it did, since your syntax is invalid. $curbuf-Delete() only takes one or two integer arguments: A single integer deletes the corresponding line; Two integers deletes a range of lines. See :help perl-Delete. In other words, this: $curbuf-Delete(1 .. $curbuf-Count()); Should be this: $curbuf-Delete(1, $curbuf-Count()); When I change your sample of code accordingly, I always get what I expect ($curbuf-Count() after delete: 1). - Christian -- Christian J. Robinson hept...@gmail.com -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php