Re: Regression in gvim 7.0.00x
On Thu, May 25, 2006 at 02:06:55AM +0200, Luc Hermitte wrote: Hello, I've been observing a regression on gvim since the release of vim 7.0. I'm observing it on gvim 7.0.000 on windows, gvim 7.0.015 (or 17, I do not remember) on Linux (gui=GTK2/Athena). It seems I do not have it with the console version on Linux -- I haven't had the opportunity to test the following lines of code with the console version. I don't remember the problem on gvim 7.0e (at least I do not have it on vim 7.0a on windows) The problem consists in the combination of a few things: - a nmapping selects (as in select-mode) a few characters - an imapping calls a function (through i_CTRL-R) that executes the previous mapping with :normal, and then returns \esc to terminate the INSERT-SELECT mode and finish in select-mode. I do not have time to look at this closely, but I assume it is because certain undocumented modes are now no longer supported. This was discussed on the vim users' list on the thread Insert Visual mode, started by Gerald Lai on April 22. (That is from my personal mail archive; I assume that is enough information for you to find the thread.) I see the following note in doc/version7.txt : --- fixes and changes since Vim 7.0f --- [...] Prevent that using CTRL-R = in Insert mode can start Visual mode. HTH --Benji Fisher
Re: netrw, winxp, and a problem...
Steve Hall wrote: Just assume all paths are Windows-hostile unless passed through such a wrapper. (I never see these errors on *nix, so I assume it's path related.) I'll try it! The unfortunate part is, I can't test it. Or rather, I can test to see if the wrapper introduces some new problem, but as I haven't been able to duplicate the problem others are having I can't do the test. Thank you! Chip Campbell
Re: netrw, winxp, and a problem...
From: Charles E Campbell Jr, May 25, 2006 9:52 AM Steve Hall wrote: Just assume all paths are Windows-hostile unless passed through such a wrapper. (I never see these errors on *nix, so I assume it's path related.) I'll try it! The unfortunate part is, I can't test it. Or rather, I can test to see if the wrapper introduces some new problem, but as I haven't been able to duplicate the problem others are having I can't do the test. Same thing I saw, I never could track down if the errant slashes were coming from tempname(), expand(), fnamemodify(), existing environment vars, ones Vim found (Vim contrives $HOME if it doesn't exist), etc. But the reports went away, so it seemed to fix it for us. -- Steve Hall [ digitect mindspring com ] :: Cream... something good to put in your Vim! :: http://cream.sourceforge.net
Re: Regression in gvim 7.0.00x
On Thu, May 25, 2006 at 03:17:54PM +0200, Luc Hermitte wrote: * On Thu, May 25, 2006 at 08:30:52AM -0400, Benji Fisher [EMAIL PROTECTED] wrote: I see the following note in doc/version7.txt : --- fixes and changes since Vim 7.0f --- [...] Prevent that using CTRL-R = in Insert mode can start Visual mode. Must I understand that the workaround I've found won't work in the future ? (the workaround consists in returning c-\c-nc-\c-ngvc-g to i_CTRL-R=) AFAIK this will continue to work. The change is what you already noticed (I think): if C-R= calls a function, and that function changes the mode, that will not be respected. It is OK if the function returns characters that change the mode. You might also have a look at :help :map-expression I have not played with it yet, but I think the idea is to give a simpler alternative to certain C-R= constructions. What about @= ? Can I use it to execute a sequence that will change the mode to insert- or select-mode, according to the result of my function ? Or is it also an undocumented feature that may not be supported in the future ? I am not sure what you have in mind. Changes like this are not at all common. In this case, vim was put in an undocumented mode, and Bram was afraid that its behavior would be unpredictable in that case. (It could be considered a bug, since all of vim's modes are supposed to be listed under :help vim-modes .) HTH --Benji Fisher
Re: Using GUI on Mac OS X
Am 25.05.2006 um 07:04 schrieb Peter Hodge: Hello all, I am trying to compile vim with gui support on Mac OS X 10.2, but it doesn't seem to work. I use ./configure --enable-gui=auto A simple ./configure should work. (It will detect darwin and enable the carbon gui. I'm using ./configure --enable-multibyte to get unicode support. This is on 10.3, but 10.2 shouldn't be different. Do I need to install some additional libraries such as GTK to make this work? If you want a GTK vim, you will need these libraries. You can get then with fink. Axel
Re: Typing 'oun' in INSERT mode moves me to the next line.
Tim Chase wrote: Typing the sequence 'oun' really fast (i.e. touch typing speed) when there already exists a line below the one the cursor is currently on, in INSERT mode, moves the cursor down one line between the 'u' and the 'n'. In my general experience, this doesn't happen :) There are a couple possible causes that occur to me: 1) you've got an insert-mode mapping. To determine, issue :imap and check the results for something funky like a mapping for oun. Alternatively, you can start a naked vim with vim -u NONE which will prevent it from loading any plugins. If either of these finds the problem, you can use :scriptnames to determine where things may or may not have been loaded, and search them for where the mapping (or other prolematic configuration) was created/issued. 2) you've got some funky keyboard mapping at the console/GUI level. This would evidence itself in other editors, so if you pull up Nano or Emacs and rapidly type oun in the same fashion as you do in Vim, you'd get other funky characters. How to remedy this lies outside vim...you'd have to check your keyboard configuration for your console or GUI/WM 3) you've got a wonked keyboard. Highly unlikely, but a remoote possibility. If the other ideas don't turn up a solution, you might want to pilfer a second keyboard and see if the problem persists. Just a few ideas. -tim Hi, For the moment it looks like option two, then again my keyboard is has had so much caffeine spilt on it, it might be in a slightly altered state of mind. Nonetheless, the problem is not peculiar to vim, and thus not Vim's problem. Thanks for the tip off... - James
Re: Typing 'oun' in INSERT mode moves me to the next line.
2) you've got some funky keyboard mapping at the console/GUI level. This would evidence itself in other editors, so if you pull up Nano or Emacs and rapidly type oun in the same fashion as you do in Vim, you'd get other funky characters. How to remedy this lies outside vim...you'd have to check your keyboard configuration for your console or GUI/WM For the moment it looks like option two, then again my keyboard is has had so much caffeine spilt on it, it might be in a slightly altered state of mind. Nonetheless, the problem is not peculiar to vim, and thus not Vim's problem. Thanks for the tip off... Glad to help point you in the right direction. You might try booting off a generic live-CD that would have fairly standard kbd mappings. Pulling up a shell, you can then use bash$ xev ~/keylog_live.txt when the window pops up, you can rapidly type your oun, then close the window. You should have a list of all events that fired. If you mount your HDD and copy this file to a place you can find it on your machine, reboot, and then perform the same sort of action within your native configuration (into keylog_native.txt), you should be able to diff them (diff keylog_live.txt keylog_native.txt) and see if your local configuration is doing anything funky. You might also have some tool for checking/changing your keyboard mapping. It could be that you're configured for some international mapping with dead-keys or at least things in places your keyboard doesn't have labeled. :) Alternatively, if you've just got another kbd floating around the house (if, IIRC, you said you're running Gentoo--that's usually indicative of the type of person likely to have 1 kbd around the house... ;) you can try swapping it out to see if it's hardware or software related. Just a few more ideas, -tim
Associating file extension with filetype.
Hi, Apologies if this has been answered before (I couldn't find anywhere). How can I associate a file extension to a file type in my .vimrc file (e.g. .hpp extension to c++/cpp file)? Ram
RE: FW: Vimspell on mac problems
-Original Message- From: Benji Fisher [mailto:[EMAIL PROTECTED] Sent: Thursday, May 25, 2006 6:40 AM To: vim@vim.org; [EMAIL PROTECTED] Subject: Re: FW: Vimspell on mac problems On Mon, May 22, 2006 at 06:42:36AM -0700, Furash Gary wrote: My vimspell with 7.0 seems to work okay on the mac os x at first - it shows words with problems, but if I right click and pick a replacement word it crashes. Gary Furash, MBA, PMP, Applications Manager Maricopa County Attorney's Office I cannot reproduce this problem. What version of OS X are you using (and if it is 10.4.x, is your machine Intel or PPC based)? Did you compile yourself or where did you get Vim.app? Please give your :version output and details on what leads to a crash. I tested with OS X 10.3.9 (PPC) vim 7.0 compiled with huge features. I do see other problems with spell checking from the PopUp menu; I will discuss these on the vim-dev list. The crashing problem should probably move to the vim-mac list. HTH --Benji Fisher
Re: FW: Vimspell on mac problems
On Thu, May 25, 2006 at 09:39:37AM -0400, Benji Fisher wrote: On Mon, May 22, 2006 at 06:42:36AM -0700, Furash Gary wrote: My vimspell with 7.0 seems to work okay on the mac os x at first - it shows words with problems, but if I right click and pick a replacement word it crashes. Gary Furash, MBA, PMP, Applications Manager Maricopa County Attorney's Office I cannot reproduce this problem. What version of OS X are you using (and if it is 10.4.x, is your machine Intel or PPC based)? Did you compile yourself or where did you get Vim.app? Please give your :version output and details on what leads to a crash. I tested with OS X 10.3.9 (PPC) vim 7.0 compiled with huge features. I do see other problems with spell checking from the PopUp menu; I will discuss these on the vim-dev list. The crashing problem should probably move to the vim-mac list. Now I can reproduce the problem. It depends on how I start vim. :-( Also, the problems I saw on Linux/GTK2 are either solved by setting 'mousemodel' to popup_setpos or else unreproducible. :-( I have two ways to start Vim.app : (1) From Finder.app, find Vim.app and CMD-O (or double click). (2) From a shell, use the gvim shell script, which does the same as $ /Applications/Vim.app/Contents/MacOS/Vim -g Start Vim.app either way. Do :set spell and enter the text hjkl into a new buffer. Either right-click or control-click on this to bring up the PopUp menu. Choose 'Change hjkl to' and then choose the first item, hulk, from the sub-menu. I find that nothing happens for a second or so, then the PopUp menu re-appears. I make the same choices, and then the behavior depends on how I started vim: if (1), then hjkl is replaced by hulk; if (2), there is a long pause and then a crash. Can anyone else reproduce this? --Benji Fisher
Re: VIM script replacement question
On Thu, 25 May 2006, Nikolaos A. Patsopoulos apparently wrote: In detail: 1.I want in front of the number in the first column to add # , then change line after the value 2. change line after 3rd column 3. change line after 5th column 4. repeat all three steps %s/^\(\d\+\)\s\+\([01]\)\s\+\([01]\)\s\+\([01]\)\s\+\([01]\)\s*/#\1\r\2 \3\r\4 \5 hth, Alan Isaac
Re: VIM script replacement question
Alan G Isaac wrote: On Thu, 25 May 2006, Nikolaos A. Patsopoulos apparently wrote: In detail: 1.I want in front of the number in the first column to add # , then change line after the value 2. change line after 3rd column 3. change line after 5th column 4. repeat all three steps %s/^\(\d\+\)\s\+\([01]\)\s\+\([01]\)\s\+\([01]\)\s\+\([01]\)\s*/#\1\r\2 \3\r\4 \5 hth, Alan Isaac Thanks for the answer,but sth is not working right. My output is this: 171100 180000 191111 201000 211101 221000 230100 #24 1 1 1 0 251111 260000 270000 The replacement didn't occur to the whole file. Thanks, Nikos
Re[2]: VIM script replacement question
On Thu, 25 May 2006, Nikolaos A. Patsopoulos apparently wrote: The replacement didn't occur to the whole file. You must have forgotten the '%'. hth, Alan Isaac
Re: VIM script replacement question
Alan G Isaac wrote: On Thu, 25 May 2006, Nikolaos A. Patsopoulos apparently wrote: The replacement didn't occur to the whole file. You must have forgotten the '%'. hth, Alan Isaac No, I used %. Got them same problem with Tim's code :(
Re[2]: VIM script replacement question
On Thu, 25 May 2006, Nikolaos A. Patsopoulos apparently wrote: No, I used %. Got them same problem with Tim's code Something is not right ... Try using :g/./s/ instead of :%s/ and see what happens. hth, Alan Isaac
Re: VIM script replacement question
Alan G Isaac wrote: On Thu, 25 May 2006, Nikolaos A. Patsopoulos apparently wrote: No, I used %. Got them same problem with Tim's code Something is not right ... Try using :g/./s/ instead of :%s/ and see what happens. hth, Alan Isaac Works great! Million thanks! Nikos
Re: VIM script replacement question
Alan G Isaac wrote: On Thu, 25 May 2006, Nikolaos A. Patsopoulos apparently wrote: No, I used %. Got them same problem with Tim's code Something is not right ... Try using :g/./s/ instead of :%s/ and see what happens. hth, Alan Isaac One last question: I get this: #3 00 00 #4 11 10 #5 11 00 How I can put spaces between numbers in same rows? 00 must become0 0 Don't want space after #3 though. Thanks, Nikos
Re: VIM script replacement question
I get this: #3 00 00 #4 11 10 #5 11 00 How I can put spaces between numbers in same rows? Looks like you omitted spaces between the \2 and \3 and between the \4 and \5 in Alan's solution (or my 2nd one that broke out each piece individually) The final replacement should read /#\1\r\2 \3\r\4 \5/ ^ ^ with the two marked spaces. If you prefer tabs, you can change those spaces to \t or just type a tab character there. Or, if you already have the file, and there's only the two characters (0|1) on each line of interest, you can post-process it with :v/^#/s/./\t :v on every line that doesn't match ^# with a # at the beginnof the line s substitute . the first character you find \t with that character followed by a tab (you can change the \t to a , but it doesn't show up quite as nicely in the email :) I'm not sure why :%s didn't work, but :g/./s did work for you...they should be effectively the same: with :%s, if the match isn't found on the line (which is the case for lines that don't match .), it skips the line. Peculiar. I suspect either an incomplete spec (the file wasn't what I copiedpasted from the original posting) or you have a funky mapping that was interfering (starting vim with vim -u NONE and then trying the examples we gave may solve matters). Or, alternatively, our one-line examples got copied over wrong or munged by mailers along the way. -tim
Re[2]: VIM script replacement question
On Thu, 25 May 2006, Nikolaos A. Patsopoulos apparently wrote: 00 must become 0 0 The original replacement I sent had these spaces in it: :g/./s/^\(\d\+\)\s\+\([01]\)\s\+\([01]\)\s\+\([01]\)\s\+\([01]\)\s*/#\1\r\2 \3\r\4 \5 Look after \2 and after \4 hth, Alan Isaac
RE: Working directory problems
I'm sorry, the script which I call basically just makes a system call: function! SDCheckout() let file = expand(%) if (confirm(Checkout from Source Depot?\n\n . file, Yes\nNo, 1) == 1) call system(sd edit . file . /dev/null) if v:shell_error == 0 set noreadonly edit! else if (confirm(An error occured!, Oh no!, 1) == 1) endif endif endif endfunction Sorry for the wrapping problems. I'm not entirely sure what you are suggesting doing with :h and :s??, but would I not suffer the problem of not knowing which subdirectory the file was in? Surely this isn't something that should need to be fixed, rather it should Just Work? Thanks! Max -Original Message- From: Eric Arnold [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 24, 2006 8:10 PM To: Max Dyckhoff Cc: vim@vim.org Subject: Re: Working directory problems I'm not sure how your bound function works. Have you tried using fnamemodify() to manipulate the filename? You can use the :h option to strip the path, and :s?? to substitute the relative path. On 5/24/06, Max Dyckhoff [EMAIL PROTECTED] wrote: Hi, I have some issues with the working directory in vim that I really cannot get to the bottom of. I have tried looking through the help, and I've searched the Interweb too, to no avail, so I thought I would turn to this trusty mailing list! I operate a single vim instance with multiple files open in multiple splits. The common working directory for my code files is c:\project\main\source\, and the majority of the files therein lie in ai\filename. Normally the vim split status line shows the file as being ai\filename, namely the relative path from the working directory of c:\project\main\source\. When I open a new file - which I invariably do using sf filename, as I have all the appropriate directories in my path - occasionally the statusline shows as the absolute path, namely c:\project\main\source\ai\filename. If I perform the command cd c:\project\main\source, then the status line fixes itself. It should be noted that the status line is only incorrect for the new file; existing files are still fine. Now I wouldn't normally be bothered by this, but I have a function in vim which I have bound to F6 that will check the current source file out of our source depot, and if the status line is showing the absolute path then it will fail, because the information about the source depot lies only within the c:\project\main directories. God, I hope that makes sense. It seems like such a trivial problem, but it really irks me, and I wonder if anyone could give me a hand! Cheers, Max -- Max Dyckhoff AI Engineer Bungie Studios
Perl Support in Debian
I'm hoping someone has a quick fix for this. I have installed vim-perl on Debian (from unstable) but when I look at :ver I see that Perl is listed as -perl. As I understand it, I should see +perl. Is there a way to fix this at run-time, or do I have to compile this in? Thanks. -- yours, William
Re: VIM script replacement question
Alan G Isaac wrote: On Thu, 25 May 2006, Nikolaos A. Patsopoulos apparently wrote: 00 must become 0 0 The original replacement I sent had these spaces in it: :g/./s/^\(\d\+\)\s\+\([01]\)\s\+\([01]\)\s\+\([01]\)\s\+\([01]\)\s*/#\1\r\2 \3\r\4 \5 Look after \2 and after \4 hth, Alan Isaac Sth went wrong during copypaste. Added the spaces manually and everything is ok. Thanks, Nikos
Re: Using GUI on Mac OS X
On May 25, 2006, at 2:57 AM, Axel Kielhorn wrote: Am 25.05.2006 um 07:04 schrieb Peter Hodge: Hello all, I am trying to compile vim with gui support on Mac OS X 10.2, but it doesn't seem to work. I use ./configure --enable-gui=auto A simple ./configure should work. (It will detect darwin and enable the carbon gui. I'm using ./configure --enable-multibyte to get unicode support. This is on 10.3, but 10.2 shouldn't be different. Do I need to install some additional libraries such as GTK to make this work? If you want a GTK vim, you will need these libraries. You can get then with fink. Axel You may want to check out http://macvim.org/OSX/index.php Saved me the trouble of compiling vim at all. Mike
Re: Perl Support in Debian
On Thu, May 25, 2006 at 12:02:35PM -0400, William O'Higgins Witteman wrote: I'm hoping someone has a quick fix for this. I have installed vim-perl on Debian (from unstable) Debian Vim maintainer hat Please report bugs with our Vim package directly to us. This allows us to determine if it's a packaging problem which we need to deal with or an upstream problem which we can triage and report to Bram. The preferred method of reporting bugs is via reportbug: apt-get install reportbug reportbug vim-perl /Debian Vim maintainer hat but when I look at :ver I see that Perl is listed as -perl. As I understand it, I should see +perl. Is there a way to fix this at run-time, or do I have to compile this in? Thanks. Are you sure you're running vim.perl and not another one of the variants we provide? Try explicitly invoking vim.perl instead of vim. If that works, then there's probably another variant of Vim installed which is being pointed to by the alternatives system. You can see what alternatives are providing the vim binary via: /usr/sbin/update-alternatives --display vim HTH, James -- GPG Key: 1024D/61326D40 2003-09-02 James Vega [EMAIL PROTECTED] signature.asc Description: Digital signature
Re: Perl Support in Debian
On Thu, May 25, 2006 at 03:13:45PM -0400, James Vega wrote: Aha! You have spotted the problem. I have both vim-perl and vim-python installed, and even though they have the same priority, the system is defaulting to vim.python. You can change that with update-alternatives --config, but then you'll run into a similar situation if you (or someone else on that machine) want to use Python to script Vim. :) So now the question is, is it possible to enable both Perl and Python at the same time? We have vim-full which has support for all the interpreters (minus MzScheme). This is one of the situations where binary distributions are lacking because there's a trade-off between trying to meet everyone's needs and having numerous different versions of the same program. Joy! vim-full is just the ticket. I can't think why it was not installed before. Binary distributions do have drawbacks, but generally, managing all of my programs with apt is far more effective then muddling with source when I don't have to. Thanks for the help. -- yours, William
Re: VIM script replacement question
Nikos, The one line :%s way that was posted before is the truly elegant way of solving this problem. However, I found that macros are especially appropriate in this case. I was able to execute the whole task in 15 seconds by recording a macro for the first line, and then playing it back 26 times. Remember q is for recording macros. --Matt On Thu, May 25, 2006 at 05:26:16PM +0300, Nikolaos A. Patsopoulos wrote: Hi all, I've got a series of files in the following format (tab delimited): 11000 20000 30000 41110 51100 60000 111101 121111 130000 140000 151000 161100 211101 221000 230100 241110 251111 260000 270000 I want to transform them in the following format: #1 1 0 0 0 #2 0 0 0 0 etc.. In detail: 1.I want in front of the number in the first column to add # , then change line after the value 2. change line after 3rd column 3. change line after 5th column 4. repeat all three steps Any ideas?? Thanks in advance, Nikos
Vim for cingular 8125 running Windows mobile 5
Hello, Is there a vim for the Cingular 8125 running windows mobile 5 http://www.cingular.com/8125_consumer ? Thanks, --Suresh
spell checking with html doesn't work
Hi all, With Vim 7 under Windows XP, I don't seem to be able to get spell checking to work with HTML files. Mostly no words are marked as misspelled. But inside some tags, e.g., h1/h1, it seems to work OK. Spelling errors are not highlighted in p/p tags, which is likely to be where most errors are going to be. Spelling for other types (e.g., plain text and LaTeX) seems fine. I have a line like this in my _vimrc: au BufNewFile,BufRead *.html,*.htm,*.asp,*.php set spell spelllang=en_au I am not using any other spelling plugin for Vim. This is a clean install. Any suggestions? It kind of looks like a bug, but maybe I'm missing something obvious. cheers dc -- David Purton Haese Harris Publications Phone: +61 8 8355 9444Email: [EMAIL PROTECTED] Fax: +61 8 8355 9471Web: http://www.haeseandharris.com.au/