Patch 7.2a.017
Patch 7.2a.017 Problem::doautoall executes autocommands for all buffers instead of just for loaded buffers. Solution: Change curbuf to buf. Files: src/fileio.c *** ../vim-7.2a.016/src/fileio.cFri Jun 27 21:16:33 2008 --- src/fileio.cTue Jul 8 11:23:56 2008 *** *** 8235,8241 */ for (buf = firstbuf; buf != NULL; buf = buf-b_next) { ! if (curbuf-b_ml.ml_mfp != NULL) { /* find a window for this buffer and save some values */ aucmd_prepbuf(aco, buf); --- 8235,8241 */ for (buf = firstbuf; buf != NULL; buf = buf-b_next) { ! if (buf-b_ml.ml_mfp != NULL) { /* find a window for this buffer and save some values */ aucmd_prepbuf(aco, buf); *** ../vim-7.2a.016/src/version.c Mon Jul 7 21:22:51 2008 --- src/version.c Tue Jul 8 11:35:38 2008 *** *** 678,679 --- 678,681 { /* Add new patch number below this line */ + /**/ + 17, /**/ -- hundred-and-one symptoms of being an internet addict: 177. You log off of your system because it's time to go to work. /// 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/// --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Patch 7.2a.018
Patch 7.2a.018 Problem:Compiler warnings when compiling with Gnome. (Tony Mechelynck) Solution: Add type casts. Files: src/gui_gtk_x11.c *** ../vim-7.2a.017/src/gui_gtk_x11.c Wed Jul 2 21:04:36 2008 --- src/gui_gtk_x11.c Fri Jul 4 12:46:24 2008 *** *** 22,27 --- 22,28 */ #include vim.h + #ifdef FEAT_GUI_GNOME /* Gnome redefines _() and N_(). Grrr... */ # ifdef _ *** *** 1592,1598 if (!gtk_init_check(gui_argc, gui_argv)) { gui.dying = TRUE; ! EMSG(_(e_opendisp)); return FAIL; } --- 1593,1599 if (!gtk_init_check(gui_argc, gui_argv)) { gui.dying = TRUE; ! EMSG(_((char *)e_opendisp)); return FAIL; } *** *** 2345,2353 /* Don't write messages to the GUI anymore */ full_screen = FALSE; ! vim_strncpy(IObuff, _(Vim: Received \die\ request from session manager\n), ! IOSIZE - 1); preserve_exit(); } --- 2346,2354 /* Don't write messages to the GUI anymore */ full_screen = FALSE; ! vim_strncpy(IObuff, (char_u *) _(Vim: Received \die\ request from session manager\n), ! IOSIZE - 1); preserve_exit(); } *** *** 5244,5250 if (font == NULL) { if (report_error) ! EMSG2(_(e_font), name); return NULL; } --- 5245,5251 if (font == NULL) { if (report_error) ! EMSG2(_((char *)e_font), name); return NULL; } *** ../vim-7.2a.017/src/version.c Tue Jul 8 11:36:02 2008 --- src/version.c Tue Jul 8 12:44:06 2008 *** *** 678,679 --- 678,681 { /* Add new patch number below this line */ + /**/ + 18, /**/ -- hundred-and-one symptoms of being an internet addict: 183. You move your coffeemaker next to your computer. /// 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/// --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Patch 7.2a.018
On 08/07/08 12:45, Bram Moolenaar wrote: Patch 7.2a.018 Problem:Compiler warnings when compiling with Gnome. (Tony Mechelynck) Solution: Add type casts. Files:src/gui_gtk_x11.c This indeed removes most of the compiler warnings for that module. :-) The only message I get is now: gui_gtk_x11.c: In function ‘gui_mch_init’: gui_gtk_x11.c:3420: warning: not enough variable arguments to fit a sentinel which you said earlier you don't know how to fix without causing further errors. This is a warning (not an error) anyway, AFAICT it doesn't prevent gvim from working well. Just in case someone else would know how to make that warning disappear, here's the context: # ifdef HAVE_GTK2 gnome_program_init(VIMPACKAGE, VIM_VERSION_SHORT, LIBGNOMEUI_MODULE, gui_argc, gui_argv, NULL); # else Best regards, Tony. -- I have a simple philosophy: Fill what's empty. Empty what's full. Scratch where it itches. -- A. R. Longworth --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Patch 7.2a.018
On 08/07/08 13:47, Tony Mechelynck wrote: On 08/07/08 12:45, Bram Moolenaar wrote: Patch 7.2a.018 Problem:Compiler warnings when compiling with Gnome. (Tony Mechelynck) Solution: Add type casts. Files: src/gui_gtk_x11.c This indeed removes most of the compiler warnings for that module. :-) The only message I get is now: gui_gtk_x11.c: In function ‘gui_mch_init’: gui_gtk_x11.c:3420: warning: not enough variable arguments to fit a sentinel which you said earlier you don't know how to fix without causing further errors. This is a warning (not an error) anyway, AFAICT it doesn't prevent gvim from working well. Just in case someone else would know how to make that warning disappear, here's the context: # ifdef HAVE_GTK2 gnome_program_init(VIMPACKAGE, VIM_VERSION_SHORT, LIBGNOMEUI_MODULE, gui_argc, gui_argv, NULL); # else Best regards, Tony. Oh, and BTW, here are the versions of a few packages installed on my computer OS: openSUSE Linux 11.0 with all Online Updates as of today The following are according to rpm -qa gtk2-2.12.19-37.1 gtk2-devel-2.12.19-37.1 gnome-common-2.20.0-23.1 libgnome-2.22.0-30.1 libgnome-devel-2.22.0-30.1 libgnomeui-2.22.1-22.1 libgnomeui-devel-2.22.1-22.1 gcc-4.3-39.1 gcc-c++-4.3-39.1 gcc43-4.3.1_20080507-6.1 gcc43-c++-4.3.1_20080507-6.1 libgcc43-4.3.1_20080507-6.1 Best regards, Tony. -- hundred-and-one symptoms of being an internet addict: 54. You start tilting your head sideways to smile. --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
compile vim7 with different or without local prefix /usr/local (#2)
Hi Bram, after a long time, another attempt to get vim able to search a different location than /usr/local/include and /usr/local/lib for local headers and libraries, hopefully with good enough commentary now. The first attempt was http://www.mail-archive.com/[EMAIL PROTECTED]/msg02896.html Thank you! /haubi/ --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~--- --- src/configure.in.orig 2008-06-24 12:01:39.0 +0200 +++ src/configure.in 2008-07-08 14:25:41.0 +0200 @@ -192,25 +192,43 @@ dnl For gcc don't do this when it is already in the default search path. dnl Skip all of this when cross-compiling. if test $cross_compiling = no; then + AC_MSG_CHECKING(--with-local-dir argument) have_local_include='' have_local_lib='' - if test $GCC = yes; then + AC_ARG_WITH([local-dir], [ --with-local-dir=PATH search PATH instead of /usr/local for local libraries. + --without-local-dir do not search /usr/local for local libraries.], [ +local_dir=$withval +case $withval in +*/*) ;; +no) + # avoid adding local dir to LDFLAGS and CPPFLAGS + have_local_dir=yes + have_local_lib=yes + ;; +*) AC_MSG_ERROR(must pass path argument to --with-local-dir) ;; +esac + AC_MSG_RESULT($local_dir) + ], [ +local_dir=/usr/local +AC_MSG_RESULT(Defaulting to $local_dir) + ]) + if test $GCC = yes -a $local_dir != no; then echo 'void f(){}' conftest.c dnl -no-cpp-precomp is needed for OS X 10.2 (Ben Fowler) -have_local_include=`${CC-cc} -no-cpp-precomp -c -v conftest.c 21 | grep '/usr/local/include'` -have_local_lib=`${CC-cc} -c -v conftest.c 21 | grep '/usr/local/lib'` +have_local_include=`${CC-cc} -no-cpp-precomp -c -v conftest.c 21 | grep ${local_dir}/include` +have_local_lib=`${CC-cc} -c -v conftest.c 21 | grep ${local_dir}/lib` rm -f conftest.c conftest.o fi - if test -z $have_local_lib -a -d /usr/local/lib; then -tt=`echo $LDFLAGS | sed -e 's+-L/usr/local/lib ++g' -e 's+-L/usr/local/lib$++g'` + if test -z $have_local_lib -a -d ${local_dir}/lib; then +tt=`echo $LDFLAGS | sed -e s+-L${local_dir}/lib ++g -e s+-L${local_dir}/lib$++g` if test $tt = $LDFLAGS; then - LDFLAGS=$LDFLAGS -L/usr/local/lib + LDFLAGS=$LDFLAGS -L${local_dir}/lib fi fi - if test -z $have_local_include -a -d /usr/local/include; then -tt=`echo $CPPFLAGS | sed -e 's+-I/usr/local/include ++g' -e 's+-I/usr/local/include$++g'` + if test -z $have_local_include -a -d ${local_dir}/include; then +tt=`echo $CPPFLAGS | sed -e s+-I${local_dir}/include ++g -e s+-I${local_dir}/include$++g` if test $tt = $CPPFLAGS; then - CPPFLAGS=$CPPFLAGS -I/usr/local/include + CPPFLAGS=$CPPFLAGS -I${local_dir}/include fi fi fi --- src/INSTALL.orig 2008-06-24 19:43:19.0 +0200 +++ src/INSTALL 2008-07-08 14:41:31.0 +0200 @@ -163,6 +163,16 @@ export CC='cc -posix' (sh) And run configure with --disable-motif-check. +Unix: LOCAL HEADERS AND LIBRARIES NOT IN /usr/local + +Sometimes it is necessary to search different path than /usr/local for locally +installed headers (/usr/local/include) and libraries (/usr/local/lib). +To search /stranger/include and /stranger/lib for locally installed +headers and libraries, use: + ./configure --with-local-dir=/stranger +And to not search for locally installed headers and libraries at all, use: + ./configure --without-local-dir + 3. RISC OS =
visualmode() while in visual mode
Consider the following mapping : vmap expr Q visualmode()==#V ? ESC:echo 'line'CR : ESC:echo 'not line'CR I would expect the result to be that hitting Q in visual mode would echo whether I were in linewise visual mode. The actual result is that Q tells me whether I had used linewise visual mode the previous time I used visual mode before this one. This is altogether consistent with the documentation for visualmode(). However, it doesn't seem very useful. Surely it would be better for visualmode() while in visual mode to report the current visual mode rather than the last one? --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Proposed change to ftplugin/changelog.vim
By default leadero as mapped in ftplugin/changelog.vim opens the file ChangeLog in the current directory. The following patch makes this slightly more flexible. #1 The name of the change log can be defined in b:changelog and can refer to a file in a different directory. #2 The variable b:changelog_entry_prefix can contain a function name that will be called to create an appropriate prefix for the current entry. If this variable isn't defined the filename: will be used instead. This prefix can be inserted into entry templates with %p. For ruby, such a function could look like this: if !exists('*RubyChangeLogEntry') function! RubyChangeLogEntry() {{{3 let e = expand('%:t') let rx = '^\s*\(def\|module\|class\)\\s\+\zs\([^[:space:]({]\+ \)' let l = search(rx, 'bcnW') if l let e .= ' ('. matchstr(getline(l), rx) .'):' endif return e endf endif This could be used to insert entries like * file.rb (method_name): Regards, Thomas --- src/vim/runtime/ftplugin/changelog.vim 2008-07-08 15:36:43.554801600 +0200 +++ ftplugin/changelog.vim 2008-07-08 16:12:49.27896 +0200 @@ -116,12 +116,12 @@ Format used for new date entries. if !exists('g:changelog_new_date_format') -let g:changelog_new_date_format = %d %u\n\n\t* %c\n\n +let g:changelog_new_date_format = %d %u\n\n\t*%p %c\n\n endif Format used for new entries to current date entry. if !exists('g:changelog_new_entry_format') -let g:changelog_new_entry_format = \t* %c +let g:changelog_new_entry_format = \t*%p %c endif Regular expression used to find a given date entry. @@ -137,9 +137,9 @@ Substitutes specific items in new date-entry formats and search strings. Can be done with substitute of course, but unclean, and need [EMAIL PROTECTED] then. - function! s:substitute_items(str, date, user) + function! s:substitute_items(str, date, user, prefix) let str = a:str -let middles = {'%': '%', 'd': a:date, 'u': a:user, 'c': '{cursor}'} +let middles = {'%': '%', 'd': a:date, 'u': a:user, 'c': '{cursor}', 'p': a:prefix} let i = stridx(str, '%') while i != -1 let inc = 0 @@ -165,7 +165,8 @@ endfunction Internal function to create a new entry in the ChangeLog. - function! s:new_changelog_entry() + function! s:new_changelog_entry(...) +let prefix = a:0 = 1 ? a:1 : '' Deal with 'paste' option. let save_paste = paste let paste = 1 @@ -173,7 +174,7 @@ Look for an entry for today by our user. let date = strftime(g:changelog_dateformat) let search = s:substitute_items(g:changelog_date_entry_search, date, - \ g:changelog_username) + \ g:changelog_username, prefix) if search(search) 0 Ok, now we look for the end of the date entry, and add an entry. call cursor(nextnonblank(line('.') + 1), 1) @@ -182,7 +183,7 @@ else let p = line('.') endif - let ls = split(s:substitute_items(g:changelog_new_entry_format, '', ''), + let ls = split(s:substitute_items(g:changelog_new_entry_format, '', '', prefix), \ '\n') call append(p, ls) call cursor(p + 1, 1) @@ -192,7 +193,7 @@ No entry today, so create a date-user header and insert an entry. let todays_entry = s:substitute_items(g:changelog_new_date_format, - \ date, g:changelog_username) + \ date, g:changelog_username, prefix) Make sure we have a cursor positioning. if stridx(todays_entry, '{cursor}') == -1 let todays_entry = todays_entry . '{cursor}' @@ -240,10 +241,26 @@ nmap silent Leadero :call SIDopen_changelog()CR function! s:open_changelog() -if !filereadable('ChangeLog') +if exists('b:changelog') + let changelog = b:changelog +else + let changelog = 'ChangeLog' +endif +echom changelog +if !filereadable(changelog) return endif -let buf = bufnr('ChangeLog') + +if exists('b:changelog_entry_prefix') +let prefix = call(b:changelog_entry_prefix, []) +else +let prefix = expand('%:t') .':' +endif +if !empty(prefix) +let prefix = ' '. prefix +endif + +let buf = bufnr(changelog) if buf != -1 if bufwinnr(buf) != -1 execute bufwinnr(buf) . 'wincmd w' @@ -251,9 +268,9 @@ execute 'sbuffer' buf endif else - split ChangeLog + exec 'split '. fnameescape(changelog) endif - -call s:new_changelog_entry() + +call s:new_changelog_entry(prefix) endfunction endif --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Proposed change to ftplugin/changelog.vim
On 08/07/08 16:18, ThoML wrote: By defaultleadero as mapped in ftplugin/changelog.vim opens the file ChangeLog in the current directory. The following patch makes this slightly more flexible. [...] Have you tried contacting Nikolai Weibull, the maintainer-of-record? Best regards, Tony. -- hundred-and-one symptoms of being an internet addict: 55. You ask your doctor to implant a gig in your brain. --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Proposed change to ftplugin/changelog.vim
Have you tried contacting Nikolai Weibull, the maintainer-of-record? Yes, maintainer ... uhm ... not yet. --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Proposed change to ftplugin/changelog.vim
On Tue, Jul 8, 2008 at 16:57, ThoML [EMAIL PROTECTED] wrote: Have you tried contacting Nikolai Weibull, the maintainer-of-record? Yes, maintainer ... uhm ... not yet. I read the mailing list. It's actually better to write to vim_dev, as more eyes will see it there. I can't promise that I'll get this patch in before 7.2, but I'll try. --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
syntax highlighting of embedded scripts
Consider the following: perl EOF some code that contains Vim keywords EOF If has(perl) is true, no problem! A syntax region is defined that does not include any Vim groups, and the perl syntax is included within the region. If has(perl) is false, however, the code within perl EOF to EOF will be (incorrectly?) highlighted as if it were Vim code. If has(perl) is false, Vim still tries to run the code as Perl code, but will raise an error. Therefore, I think that a containing region should be defined even if has(perl) is false. However, if has(perl) is false, either the entire region or at least the perl EOF and the EOF should be highlighted as errors. The same applies to the other embeddable languages as well. --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: netrw v126 testing -- need help!
Hi, On Tue, Jul 8, 2008 at 05:05, Charles E. Campbell, Jr. [EMAIL PROTECTED] wrote: I'm just beginning a semi-automated test suite -- I expect that that will help enormously sometime in the misty future. I'll be going through the commands and trying to build the tests, checking netrw as I go. However, for now: Please test netrw v126g! Its available via my website: http://mysite.verizon.net/astronaut/vim/index.html#NETRW Bram would like netrw released so he can release vim 7.2b and I'm going to be gone for two weeks starting next week (and will be nowhere near electricity let alone a computer). The changes have been to put fnameescape()s and shellescape()s in where appropriate -- so you'll need vim 7.2a with patches 1-13 (its up to #16 as of this writing). I'm planning on releasing netrw to Bram at the end of this week. I used this new version today, and faced no problem so far. --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Remote command equivalent for -q command line option
Ben Schmidt wrote: Is it possible to get what I want? With a little jiggerypokery it should be! Perhaps something like gvim --remote-send C-\C-N:cfile build.logCR:call foreground()CR You'd obviously want to wrap that in a shell script or alias... And there are other possibilities if that doesn't work... If you're on Windows, running remote_foreground() in the client might be better than running foreground() in the server, for instance; then you'd have to run a remote_send in the client, too, via a :call not using the --remote-send argument. Err... I'll play with it, thanks! But I just realized that I don't like --remote-send since it doesn't create a new Vim instance in case when no server is running yet... Keeping thinking and trying... -- Alexei Alexandrov --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Remote command equivalent for -q command line option
Alexei Alexandrov wrote: Ben Schmidt wrote: Is it possible to get what I want? With a little jiggerypokery it should be! Perhaps something like gvim --remote-send C-\C-N:cfile build.logCR:call foreground()CR You'd obviously want to wrap that in a shell script or alias... And there are other possibilities if that doesn't work... If you're on Windows, running remote_foreground() in the client might be better than running foreground() in the server, for instance; then you'd have to run a remote_send in the client, too, via a :call not using the --remote-send argument. Err... I'll play with it, thanks! But I just realized that I don't like --remote-send since it doesn't create a new Vim instance in case when no server is running yet... Keeping thinking and trying... If not on Windows, perhaps an autocommand to automatically raise Vim whenever it opens a file? In .vimrc: augroup AutoForeground au! au BufReadPost * :call foreground() augroup END Ben. --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Remote command equivalent for -q command line option
Ben Schmidt wrote: Alexei Alexandrov wrote: Err... I'll play with it, thanks! But I just realized that I don't like --remote-send since it doesn't create a new Vim instance in case when no server is running yet... Keeping thinking and trying... If not on Windows, perhaps an autocommand to automatically raise Vim whenever it opens a file? In .vimrc: augroup AutoForeground au! au BufReadPost * :call foreground() augroup END I didn't mean raising, I meant creating a new Vim remote server if one doesn't exist yet. This is what silent means in the names of some of those command line arguments. Anyway, I think I end up with gvim --remote-tab-silent +cfile build.log build.log for now. It seems to do what I need with a nice side effect of opening the build log in a separate tab. Well, maybe it's actually nice since I do need to take a look at the log itself sometimes... We'll see. Thanks for your help, BTW! -- Alexei Alexandrov --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
64-bit support for Windows (Vista)
Hello, With 7.2a now out, I didn't see any mention of support for 64-bit Windows. Vista (whatever you feel about it) really is the gateway to 64-bit on the Windows platform. This is my plea that 7.2 supports 64- bit Windows out of the box. All of the work is already done. There is a site here: http://georgevreilly.com/vim/ that already works. I sure would like to have an official version though. Thanks. --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---