Re: Diff 2 files with lines added at top of second file: confusing
On 06/09/12 05:15, christoph...@gmail.com wrote: If I shot beside the mark, then please explain better; maybe I hadn't drunk enough black tea. Best regards, Tony. Thank you Tony, I appreciate your time giving me all those details. I will try a couple more things (I might have misused set go+=/set go-=). But with my original settings, and others I tried (including left and right scroll bars) , I can always see the diff, but *not* initially: I have to click and scroll, and that's too much intervention, too easy to forget. Background: I have been using gvim as my diff viewer for tortoise svn. It works great, except that recently I committed unwanted changes (at the top of a file) because I forgot to click on the correct window and scroll. The diff initially displays like there is no line added at the top of the file (and I did not expect any either). I would like vim to automatically scroll to the highest of the 2 files (either by code change, auto command, script, whatever...). I was really happy about using gvim -d file1 file2 +windo 0 but it only works when file1 has more lines (or maybe the reverse, I forgot). I want a reliable way to start my diff. I'm fairly sure this can be explained with the current mechanisms in vim, but it does not give me the behavior that I would like. I'll try looking at which vim functions are available and see if this could be done with a script (focus on the windows where the first added block is and scroll to the top of that window?). Thanks again, Christophe Try loading the two files without the diff mode: gvim -O2 +windo 1 file1.txt file2.txt This will display both files side by side and both scrolled to the top. (in -O2 the O is a capital letter O, not a zero, to split vertically.) Then you can do :windo diffthis if you want to set diff mode in all (i.e. both) files currently being viewed. You can of course reduce the number of keystrokes by assigning this to a key: :map F4 :windo diffthisCR Similarly, you can create a command to invoke gvim as above as if it were a simple command: -Windows- gvimnodiff.bat (in some directory in the %PATH%) C:\Program Files\vim\gvim.exe -O2 +windo 1 %1 %2 -Unix- ~/bin/gvimnodiff #!/bin/bash gvim -O2 '+windo 1' $1 $2 See also :help zR :help zM about two useful commands (to open and close all folds, respectively). Best regards, Tony. -- If clear thinking created sparks, we could safely store dynamite in James Watt's office. -- Wayne Shannon, KRON-TV -- You received this message from the vim_use 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
who install verilog_emacsauto.vim? help me
Hi: I can’t install verilog_emacsauto.vim. Who can help me? -- You received this message from the vim_use 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: Diff 2 files with lines added at top of second file: confusing
I don't think, every user needs to mess with autocommands to find a solution that works for him, but rather Vim should make it right. So Thank You! I completely agree! (Vim is already doing just about anything else right!) here is a patch: [...] Christian Thank you, I tried your patch, and I think it only works when I call gvim -d a.txt b.txt If I switch a and b, I have the same issue... gvim -d b.txt a.txt In the meantime (as I still prefer a patch), this seems to be working when calling from the command line: gvim -d b.txt a.txt +if diff_filler(1) | winc w |endif | 0 in my case, I only compare 2 files, so I check if the file in the current window as filler lines above line 1; if so, I move to the other window. Then, in the active window after that, I go to the top of the file. Christophe -- You received this message from the vim_use 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
bufexplorer has conflicts with python.vim
I just installed bufexplorer.vim and I am now getting error messages - which I presume are a result of some sort of conflict: Messages are below Error detected while processing /Applications/MacVim-snapshot-62/MacVim.app/Contents/Resources/vim/runtime/ftplugin/python.vim: line 21: E492: Not an editor command: def\)')cr line 22: E492: Not an editor command: def\)')cr line 23: E492: Not an editor command: def\)')cr line 24: E492: Not an editor command: def\)')cr Comments? Solution? Any and all is welcome. :( NOTE : Not a problem with any other programming language, like perl or rebol, which I also use. thanks -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com -- You received this message from the vim_use 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
vim GUI on virtual Win 95 - NOT
According to the vim download page info, gvim73_46.exe should be good also on windows 95. I have win 95 installed in a VirtualBox machine running on win 7 64-bit. And, I ran the gvim73_46.exe install, which was all successful until the end where I get the message: Error Starting Program The C:\Program Files\vim\vim73\gvim.exe file expects a newer version of windows. Upgrade your windows version. This popup is on top of another: c:\program files\vim\vim73\gvim73.exe [above repeated] A device attached to the system is not functioning. My win 95 install is one of the last updates that were put out, an OEM that shows itself as 4.00.950 B. Can anyone shed some light on what's happening here? Is there somewhere I can look for a detailed description of the actual error? Thanks, Dave -- You received this message from the vim_use 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 GUI on virtual Win 95 - NOT
On 06/09/12 23:16, dbird wrote: According to the vim download page info, gvim73_46.exe should be good also on windows 95. I have win 95 installed in a VirtualBox machine running on win 7 64-bit. And, I ran the gvim73_46.exe install, which was all successful until the end where I get the message: Error Starting Program The C:\Program Files\vim\vim73\gvim.exe file expects a newer version of windows. Upgrade your windows version. This popup is on top of another: c:\program files\vim\vim73\gvim73.exe [above repeated] A device attached to the system is not functioning. My win 95 install is one of the last updates that were put out, an OEM that shows itself as 4.00.950 B. Can anyone shed some light on what's happening here? Is there somewhere I can look for a detailed description of the actual error? Thanks, Dave I suppose that the binary requires features not yet present in Win95 (either in the Win95 kernel or in its shared libraries). You might try the latest Vim without Cream from http://sourceforge.net/projects/cream/files/Vim/ — it is compiled with a different compiler and linker, from a more up-to-date Vim release, and it may (or may not) be compatible with Win95. (Only experiment will tell, unless you can understand the fine points of the release notes better than I can, or unless someone knows the answer and speaks up.) If it doesn't work either, you may have to find a C/C++ compiler compatible with your version of Win95, and compile the source yourself. Or else, upgrade to a more recent OS (either a more recent version of Windows, or scrap Windows for good and install Linux instead). Best regards, Tony. -- Armadillo: To provide weapons to a Spanish pickle -- You received this message from the vim_use 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: bufexplorer has conflicts with python.vim
On 06/09/12 23:41, Tim Johnson wrote: I just installed bufexplorer.vim and I am now getting error messages - which I presume are a result of some sort of conflict: Messages are below Error detected while processing /Applications/MacVim-snapshot-62/MacVim.app/Contents/Resources/vim/runtime/ftplugin/python.vim: line 21: E492: Not an editor command: def\)')cr line 22: E492: Not an editor command: def\)')cr line 23: E492: Not an editor command: def\)')cr line 24: E492: Not an editor command: def\)')cr Comments? Solution? Any and all is welcome. :( NOTE : Not a problem with any other programming language, like perl or rebol, which I also use. thanks Which Vim version are you using? (I mean, it's MacVim snapshot 62, but which version does it display on the :intro screen? — I'm on Linux) In the ftplugin/python.vim included in Bram's latest official sources (ftplugin/python.vim Last Change: Wed, 21 Apr 2004 13:13:08 CEST, Mercurial tag v7-3-659 dated Wed Sep 05 19:17:42 2012 +0200), I see two lines' discrepancy: the closest I come to what could trigger these messages is at lines 23-26, as follows: nnoremap silent buffer ]] :call SIDPython_jump('/^\(class\\|def\)')cr nnoremap silent buffer [[ :call SIDPython_jump('?^\(class\\|def\)')cr nnoremap silent buffer ]m :call SIDPython_jump('/^\s*\(class\\|def\)')cr nnoremap silent buffer [m :call SIDPython_jump('?^\s*\(class\\|def\)')cr but in order to trigger those errors, the | immediately before def\)')cr would have to be seen as following an ex-command, not as part of a single-quoted string. Does bufexplorer (which is not installed on my system) invoke these four commands — ]] [[ ]m [m — in the {rhs} of a mapping? Or does it define a map!, a cmap, an abbrev or a cabbrev with an {lhs} including something recognizable from the {rhs} of the above mappings? Best regards, Tony. -- I'd love to go out with you, but I did my own thing and now I've got to undo it. -- You received this message from the vim_use 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: bufexplorer has conflicts with python.vim
* Tony Mechelynck antoine.mechely...@gmail.com [120906 16:49]: On 06/09/12 23:41, Tim Johnson wrote: thanks Which Vim version are you using? (I mean, it's MacVim snapshot 62, but which version does it display on the :intro screen? — I'm on Linux) It is version 7.3.315 In the ftplugin/python.vim included in Bram's latest official sources (ftplugin/python.vim Last Change: Wed, 21 Apr 2004 13:13:08 CEST, Mercurial tag v7-3-659 dated Wed Sep 05 19:17:42 2012 +0200), I see two lines' discrepancy: the closest I come to what could trigger these messages is at lines 23-26, as follows: nnoremap silent buffer ]] :call SIDPython_jump('/^\(class\\|def\)')cr nnoremap silent buffer [[ :call SIDPython_jump('?^\(class\\|def\)')cr nnoremap silent buffer ]m :call SIDPython_jump('/^\s*\(class\\|def\)')cr nnoremap silent buffer [m :call SIDPython_jump('?^\s*\(class\\|def\)')cr but in order to trigger those errors, the | immediately before def\)')cr would have to be seen as following an ex-command, not as part of a single-quoted string. Does bufexplorer (which is not installed on my system) invoke these four commands — ]] [[ ]m [m — in the {rhs} of a mapping? Or does it define a map!, a cmap, an abbrev or a cabbrev with an {lhs} including something recognizable from the {rhs} of the above mappings? I've been using selectbuf for many years and this occured after I installed bufexplorer. Because I was under a timeline and needed vim to just work, I recreated the session file that I was using. Consequently, the problem disappeared. I also deleted my viminfo file. I suspect that the apparent conflict was a side effect of something incompatible from either the session file or viminfo. :) So the problem is resolved but the mystery remains unsolved. I have found in the past that when similarly baffling anomalies occur that recreating session files and deleting viminfo has made if all go away. thanks for the reply. -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com -- You received this message from the vim_use 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: bufexplorer has conflicts with python.vim
On 07/09/12 03:05, Tim Johnson wrote: * Tony Mechelynck antoine.mechely...@gmail.com [120906 16:49]: On 06/09/12 23:41, Tim Johnson wrote: thanks Which Vim version are you using? (I mean, it's MacVim snapshot 62, but which version does it display on the :intro screen? — I'm on Linux) It is version 7.3.315 In the ftplugin/python.vim included in Bram's latest official sources (ftplugin/python.vim Last Change: Wed, 21 Apr 2004 13:13:08 CEST, Mercurial tag v7-3-659 dated Wed Sep 05 19:17:42 2012 +0200), I see two lines' discrepancy: the closest I come to what could trigger these messages is at lines 23-26, as follows: nnoremap silent buffer ]] :call SIDPython_jump('/^\(class\\|def\)')cr nnoremap silent buffer [[ :call SIDPython_jump('?^\(class\\|def\)')cr nnoremap silent buffer ]m :call SIDPython_jump('/^\s*\(class\\|def\)')cr nnoremap silent buffer [m :call SIDPython_jump('?^\s*\(class\\|def\)')cr but in order to trigger those errors, the | immediately before def\)')cr would have to be seen as following an ex-command, not as part of a single-quoted string. Does bufexplorer (which is not installed on my system) invoke these four commands — ]] [[ ]m [m — in the {rhs} of a mapping? Or does it define a map!, a cmap, an abbrev or a cabbrev with an {lhs} including something recognizable from the {rhs} of the above mappings? I've been using selectbuf for many years and this occured after I installed bufexplorer. Because I was under a timeline and needed vim to just work, I recreated the session file that I was using. Consequently, the problem disappeared. I also deleted my viminfo file. I suspect that the apparent conflict was a side effect of something incompatible from either the session file or viminfo. :) So the problem is resolved but the mystery remains unsolved. I have found in the past that when similarly baffling anomalies occur that recreating session files and deleting viminfo has made if all go away. thanks for the reply. I have learnt to be wary of session files created by :mksession, they are usually unnecessarily bulky, duplicating stuff which is already in the vimrc. I used :mkesssion in the past, but now I use a session file I've written myself, just to load the files of my typical session into their respective windows and tabs, and set local directories and keymaps in some of them. My vimrc and plugins (~/.vim/... and $VIM/vimfiles/..., plus of course the $VIMRUNTIME/... that come with Vim) do the rest. That file is named ~/Session.vim too, the only difference with the output of :mksession is that I wrote it myself, and it is much shorter. Best regards, Tony. -- Your conscience never stops you from doing anything. It just stops you from enjoying it. -- You received this message from the vim_use 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
答复: who install verilog_emacsauto.vim? help me
It must install emacs? I uninstall emacs early -邮件原件- 发件人: vim_use@googlegroups.com [mailto:vim_use@googlegroups.com] 代表 Ben Fritz 发送时间: 2012年9月6日 22:18 收件人: vim_use@googlegroups.com 主题: Re: who install verilog_emacsauto.vim? help me On Thursday, September 6, 2012 1:49:38 AM UTC-5, jun wang wrote: Hi: I can’t install verilog_emacsauto.vim. Who can help me? What problems did you run into? I assume you are talking about the script at http://www.vim.org/scripts/script.php?script_id=1875. If this is the case, looking at only the documentation on the page, I can tell that you will need: 1. In your .vimrc, you need filetype plugin on at a minimum. filetype plugin indent on will also work. 2. On Unix-like systems, a ~/.vim/ftplugin directory and a ~/elisp directory. On Windows, a $HOME/vimfiles/ftplugin directory and a $HOME/elisp directory. HOME can either be set as an environment variable outside of Vim, or you can use whatever Vim calculates it to be. Ask Vim where it is by doing :echo $HOME within Vim. 3. The script downloaded from the link above, placed in the correct ftplugin directory for your system. 4. The verilog-mode.el script mentioned in the link above, downloaded from the link on that page and placed in the appropriate elisp directory for your system. 5. Edit a file which Vim detects as the verilog filetype, or set the filetype manually to verilog. If you do not have all these things in place, please try them now. If you try them and still have problems, come back with a specific sequence of steps you tried and what happened, and what you expected to happen. -- You received this message from the vim_use 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_use 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: 答复: who install verilog_emacsauto.vim? help me
On Thursday, September 6, 2012 8:33:36 PM UTC-5, jun wang wrote: It must install emacs? I uninstall emacs early Nobody said anything about emacs. Follow the install instructions on the vim.org script page and see what happens. -- You received this message from the vim_use 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: Shelling out to cygwin bash from Windows vim
AndyHancock wrote: This problem dogged me for many years, and I finally hunkered down to chase it down. Here is the solution that I found works for me: set shell=c:\cygwin\bin\bash.exe\ -i Won't always find ~/.bashrc cuz depending on how vim is launched, ~ doesn't always resolve to c:/cygwin/home/$USERNAME let shell='c:\cygwin\bin\bash.exe\ --rcfile c:\cygwin\home\' . \ $USERNAME . '\.bashrc' Backslashes are hated by bash. Also needs -i to ensure bash is interactive so that .bashrc is sourced let shell='c:\cygwin\bin\bash.exe --rcfile c:/cygwin/home/' . \ $USERNAME . '/.bashrc -i' Depending on how vim is launched, c:/cygwin/home/$USERNAME will sometimes be equivalent to ~. If so, then it will be replaced by ~ in shell. Thanks to all those who helped on the unix, bash, cygwin, and vim forums. Wow... that looks complicated. Why don't you just set SHELL=C:/Bin/Bash.exe I have my cygwin in C:/ In my system environment vars (controlpanel-system- advanced system settings(system properties)-Advanced- Environment variables-System Variables, I have: DISPLAY=:0 CYGWIN=nodosfilewarning winsymlinks export PATH=C:\prog64\vim;%SystemRoot%\system32;%SystemRoot%;C:\bin;[other stuff]... SHELL=C:/Bin/Bash.exe Bash starts and runs it's RC vars, which pick up my home.. and that runs my .bashrc. One of the aliases I have in my bash startup files for gvim is setsid gvim That allows gvim to run in the background... Would that work for you? I let bash cygwin figure out my userid and home .. -- You received this message from the vim_use 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: bufexplorer has conflicts with python.vim
Hi, Tony Mechelynck wrote: In the ftplugin/python.vim included in Bram's latest official sources (ftplugin/python.vim Last Change: Wed, 21 Apr 2004 13:13:08 CEST, Mercurial tag v7-3-659 dated Wed Sep 05 19:17:42 2012 +0200), I see two lines' discrepancy: the closest I come to what could trigger these messages is at lines 23-26, as follows: nnoremap silent buffer ]] :call SIDPython_jump('/^\(class\\|def\)')cr nnoremap silent buffer [[ :call SIDPython_jump('?^\(class\\|def\)')cr nnoremap silent buffer ]m :call SIDPython_jump('/^\s*\(class\\|def\)')cr nnoremap silent buffer [m :call SIDPython_jump('?^\s*\(class\\|def\)')cr but in order to trigger those errors, the | immediately before def\)')cr would have to be seen as following an ex-command, not as part of a single-quoted string. the 'b' flag in 'cpoptions' could be responsible for this. Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin) -- You received this message from the vim_use 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 GUI on virtual Win 95 - NOT
On 9/6/2012 4:54 PM, Tony Mechelynck wrote: On 06/09/12 23:16, dbird wrote: According to the vim download page info, gvim73_46.exe should be good also on windows 95. I have win 95 installed in a VirtualBox machine running on win 7 64-bit. And, I ran the gvim73_46.exe install, which was all successful until the end where I get the message: Error Starting Program The C:\Program Files\vim\vim73\gvim.exe file expects a newer version of windows. Upgrade your windows version. This popup is on top of another: c:\program files\vim\vim73\gvim73.exe [above repeated] A device attached to the system is not functioning. My win 95 install is one of the last updates that were put out, an OEM that shows itself as 4.00.950 B. Can anyone shed some light on what's happening here? Is there somewhere I can look for a detailed description of the actual error? Thanks, Dave I suppose that the binary requires features not yet present in Win95 (either in the Win95 kernel or in its shared libraries). You might try the latest Vim without Cream from http://sourceforge.net/projects/cream/files/Vim/ — it is compiled with a different compiler and linker, from a more up-to-date Vim release, and it may (or may not) be compatible with Win95. (Only experiment will tell, unless you can understand the fine points of the release notes better than I can, or unless someone knows the answer and speaks up.) If it doesn't work either, you may have to find a C/C++ compiler compatible with your version of Win95, and compile the source yourself. Or else, upgrade to a more recent OS (either a more recent version of Windows, or scrap Windows for good and install Linux instead). Best regards, Tony. Ha! Thanks for the comment. I think I'll go the other way. Look for a version of gvim that was current in that timeframe. Thanks again, Dave -- You received this message from the vim_use 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 GUI on virtual Win 95 - NOT
On 9/6/2012 9:25 PM, George V. Reilly wrote: On Thu, Sep 6, 2012 at 4:54 PM, Tony Mechelynck antoine.mechely...@gmail.com wrote: snip Windows 95? Even in a VM, that seems like an exercise in masochism and futility. Try http://www.dependencywalker.com/ to figure out what the missing imports are. You could also try rebuilding Gvim with fewer options, e.g., nmake Make_mvc.mak FEATURES=SMALL I suppose maybe. I have some old files made by vintage s/w that I can't open any more. Exploring ways to reconstruct the crime. Besides, it's kind of fun playing with virtual machines. Never did that before... Thanks for the comment. Dave -- You received this message from the vim_use 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