RE: Gvim for KDE
A.J.Mechelynck wrote: My distribution of SuSE 9.3 came with a program named kvim which is a version of gvim 6.2.14, modified for kde (and, IIUC, Qt) (but --version says compiled by [EMAIL PROTECTED] and no modified-by line). (The console Vim that came with it was a 6.3.58.). Good luck to you if you want to merge kvim into mainstream Vim with a proper set of #ifdef's. I recall that the merging of kvim patches into the Vim tree went further than that - the KDE gui is mentioned in the help files. I even seem to remember that at one point the gui_kde files appeared in CVS, only to be removed again once they became unmaintained. So if a maintainer were to step forward, I would expect that Bram (or someone) would have at least the last 6.3 sources as a starting point. Since KVim is primarily a GUI port, I don't think much has changed between Vim 6.3 and Vim 7 that would cause big problems. I didn't have to change anything in the Win16 GUI code, for example, when I did the Win16 version of Vim 7. Another possible approach would be to do a pure QT port rather than a KDE port (much of the old KDE code could be reused) as then the resulting GUI Vim would be cross-platform (now that QT4 is dual-licensed for Windows as well as Un*x) Vince
Re: Gvim for KDE
On Wednesday 19 July 2006 03:01, Vince Negri wrote: A.J.Mechelynck wrote: My distribution of SuSE 9.3 came with a program named kvim which is a version of gvim 6.2.14, modified for kde (and, IIUC, Qt) (but --version says compiled by [EMAIL PROTECTED] and no modified-by line). (The console Vim that came with it was a 6.3.58.). Good luck to you if you want to merge kvim into mainstream Vim with a proper set of #ifdef's. I recall that the merging of kvim patches into the Vim tree went further than that - the KDE gui is mentioned in the help files. I even seem to remember that at one point the gui_kde files appeared in CVS, only to be removed again once they became unmaintained. So if a maintainer were to step forward, I would expect that Bram (or someone) would have at least the last 6.3 sources as a starting point. Since KVim is primarily a GUI port, I don't think much has changed between Vim 6.3 and Vim 7 that would cause big problems. I didn't have to change anything in the Win16 GUI code, for example, when I did the Win16 version of Vim 7. Another possible approach would be to do a pure QT port rather than a KDE port (much of the old KDE code could be reused) as then the resulting GUI Vim would be cross-platform (now that QT4 is dual-licensed for Windows as well as Un*x) Vince If it's built against KDE4, you'll get the GUI to be cross platform in the first place with minimal (or no) need for the GTK+ version. Pure Qt programs can integrate well with KDE provided you follow the KDE UI guidelines http://developer.kde.org/documentation/standards/kde/style/basics/index.html. You won't get the fun tools like KNotify, the toolbars, etc., but that would be the tradeoff for using just Qt (thus it would be somewhat annoying considering writing a KDE GUI for Vim should be straightforward as compared to a Qt GUI). You could technically use kdelibs4 as that is KDE's top priority in stabilisation, so a KDE4 version of Vim wouldn't be too difficult to maintain. Now I haven't really programmed using kdelibs and such, but if I could learn how, I might be able to help out with a KVim port. -- Matt Sicker pgpfTiYTfg1F0.pgp Description: PGP signature
VIM7 on Tandem OSS
Well, that was exciting... I recently tried to build vim 7 on OSS (Tandem / HP Nonstop S-Series). I finally got it to work by diff'ing the ITUG Floss sources (link below) against vim-6.1 and applying the diffs to vim-7.0 (and by first building/installing ncurses-5.5). I would like to submit my efforts to be included upstream. Are there any objections if I post the .patch here? This is the ITUG vim: https://www.itug.org/secure/ituglib/shared/act_download.cfm/vim.tar.Z?lib_file_id=666 NOTE: I also had to configure ncurses and vim as follows: ncurses5-5$ CFLAGS=-WIEEE_float ./configure vim-7.0$ LDFLAGS=-lfloss CFLAGS=-WIEEE_float ./configure (I am not sure if 'floss' is necessary, but it was used in ITUG vim61.) -- Matthew Lions and tigers and ...penguins? We're being invaded!
Re: VIM7 on Tandem OSS
A.J.Mechelynck wrote: mwoehlke wrote: Well, that was exciting... I recently tried to build vim 7 on OSS (Tandem / HP Nonstop S-Series). I finally got it to work by diff'ing the ITUG Floss sources (link below) against vim-6.1 and applying the diffs to vim-7.0 (and by first building/installing ncurses-5.5). I would like to submit my efforts to be included upstream. Are there any objections if I post the .patch here? This is the ITUG vim: https://www.itug.org/secure/ituglib/shared/act_download.cfm/vim.tar.Z?lib_file_id=666 NOTE: I also had to configure ncurses and vim as follows: ncurses5-5$ CFLAGS=-WIEEE_float ./configure vim-7.0$ LDFLAGS=-lfloss CFLAGS=-WIEEE_float ./configure (I am not sure if 'floss' is necessary, but it was used in ITUG vim61.) Well, IMHO you ought to send them to Bram [EMAIL PROTECTED] , preferably in the form of context or unified diffs against the most recent sources (i.e., 7.0 as seen after applying the 39 official patches already published). If your patches are bulky, they might perhaps not be worth publishing on the list; but that's only my private opinion. Well, I'll hope for a reply from Bram. I'm used to projects that don't appreciate people shooting e-mail off to any particular individual when there is a designated list/forum. :-) So nice to have the keys behave, though. :-) (While we're on the subject, can someone remind me how to *make* a .patch? Is it just 'diff -u' or is there something special in getting the multiple-files-in-one-output-block right?) -- Matthew Now where did I put my hippo?
Re: VIM7 on Tandem OSS
mwoehlke wrote: A.J.Mechelynck wrote: mwoehlke wrote: Well, that was exciting... I recently tried to build vim 7 on OSS (Tandem / HP Nonstop S-Series). I finally got it to work by diff'ing the ITUG Floss sources (link below) against vim-6.1 and applying the diffs to vim-7.0 (and by first building/installing ncurses-5.5). I would like to submit my efforts to be included upstream. Are there any objections if I post the .patch here? This is the ITUG vim: https://www.itug.org/secure/ituglib/shared/act_download.cfm/vim.tar.Z?lib_file_id=666 NOTE: I also had to configure ncurses and vim as follows: ncurses5-5$ CFLAGS=-WIEEE_float ./configure vim-7.0$ LDFLAGS=-lfloss CFLAGS=-WIEEE_float ./configure (I am not sure if 'floss' is necessary, but it was used in ITUG vim61.) Well, IMHO you ought to send them to Bram [EMAIL PROTECTED] , preferably in the form of context or unified diffs against the most recent sources (i.e., 7.0 as seen after applying the 39 official patches already published). If your patches are bulky, they might perhaps not be worth publishing on the list; but that's only my private opinion. Well, I'll hope for a reply from Bram. I'm used to projects that don't appreciate people shooting e-mail off to any particular individual when there is a designated list/forum. :-) Bram is quite busy nowadays, but IIRC he's not against vimmers emailing him privately about that sort of thing. How quickly he responds may depend on how much of his free time he can dedicate to Vim. If the patch is relatively small, you can also post it on the vim-dev list; or, even if it's large, you may upload it anyplace on the Web (on any site where you have upload privileges, such as a personal web site, or maybe in the scripts section of the vim-online site http://vim.sourceforge.net/ ) and post the URI on the list. The advantege of using a personal website rather than the vim-online site is that on your own site you'll be able to delete the patch if and when it becomes either official or obsolete. So nice to have the keys behave, though. :-) (While we're on the subject, can someone remind me how to *make* a .patch? Is it just 'diff -u' or is there something special in getting the multiple-files-in-one-output-block right?) Basically, it's just diff -u. For more details, see man diff. You might want to try giving the output of your diff run as stdin input to the patch program (patch -p0 in the vim70 directory of your build tree, the one which has an src/ subdirectory) and see if it does what one would expect. (The patch program, or at least the version I use, can patch back and forth using the same patch so you won't risk clobbering your good source.) Since patch discards garbage before and after the patch proper, you can embed the patch in an email, like what Bram does when he publishes an official patch on the vim-dev list. Best regards, Tony.
Re: Gvim for KDE
Dnia środa, 19 lipca 2006 10:01, Vince Negri napisał: I recall that the merging of kvim patches into the Vim tree went further than that - the KDE gui is mentioned in the help files. I even seem to remember that at one point the gui_kde files appeared in CVS, It was working. I have compiled KDE version of Vim7 in that period. There was discussion few years ago about problems with KDE version. Major problem is incompatibility between glib event loop used by Vim and Qt event loop. But from various reports looks like Qt4.2 will be able to use glib event loop. It should a) remove some major hacks from kvim implementation b) remove unpleasant delay when using kvim. But to really test this we have to wait for official release of Qt4.2 and someone to write that port (I am not programmer) :/ But it would require to write completely new port - qvim because kdelibs won't be ready for third party things until fall (apart from some really adventurous programmers/users). Another possible approach would be to do a pure QT port rather than a KDE port (much of the old KDE code could be reused) as then the resulting GUI Vim would be cross-platform (now that QT4 is dual-licensed for Windows as well as Un*x) Probably good idea. Although KDE offers nice possibilities: kio-slaves, mox style menu bar. m.
Re: Website Sign-up
lol. When's your next show? :) On Tue, 18 Jul 2006, @ Rocteur CC wrote: Perhaps out of respect for the people and the skill of the people who are knowledgeable enough and have the skills to contribute material to the site that benefit the rest of us so much. The site that people who ask this kind of question just slurp up and devour the information but do not have the class, upbringing or respect to even bother to register or log in. On 17 Jul 2006, at 01:25, Vigil wrote: I hate sites that have the ability to log in but don't tell you why, so: why should I register on vim.org? -- . -- .
Re: search history - more questions
Hi, SHANKAR R-R66203 wrote: I found out that :his / Gives the listing of the search history. In a particular file, I tried using :his / # search history 4 \wallace_tree_4_w4\ 5 ^I 6 crg_arm 7 8 ipss 10 # 11 perl D:/Profiles/r66203/utils/v2html/vhier_ls.pl -f verilog.harlech test.hier 13 \usb_rcv\ 14 \(^\s*\(\else\\)[EMAIL PROTECTED](\#\s*(\s*\w\+\s*)\s\+\)\=\w\+\_s*(\(\/\/\ )\=\)|\(^\s*\w\+\s\+#\s*(.\{-},\) 15 \(\(^\s*\(\else\\)[EMAIL PROTECTED](\#\s*(\s*\w\+\s*)\s\+\)\=\w\+\_s*(\(\/\ /\)\=\)|\\) 16 \(\(^\s*\(\else\\)[EMAIL PROTECTED](\#\s*(\s*\w\+\s*)\s\+\)\=\w\+\_s*(\(\/\ /\)\=\)|\(^\s*\w\+\s\+#\s*(.\{-},\)\) 17 \(\(^\s*\(\else\\)[EMAIL PROTECTED](\#\s*(\s*\w\+\s*)\s\+\)\=\w\+\_s*(\(\/\ /\)\=\)\\|\(^\s*\w\+\s\+#\s*(.\{-},\)\) 20 \reg_out25\ 87 \rd_even_flash_enb\ 138 pllmrbi_ipi 155 ^\s*pllmrbi_ipi\ 156 \(^\s*\(\else\\)[EMAIL PROTECTED](\#\s*(\s*\w\+\s*)\s\+\)\=\w\+\_s*(\(\/\/\ )\=\) 162 \(^\s*\w\+\s\+#\s*(.\{-},\) 177 \ipp_obe_txdata_b\ 192 \(\(^\s*\(\else\\)[EMAIL PROTECTED](\#\s*(\s*\w\+\s*)\s\+\)\=\w\+\_s*(\(\/\ /\)\=\)\|\(^\s*\w\+\s\+#\s*(.\{-},\)\) I do not understand why the numbers are not consecutive. whenever you re-use a search pattern by using UP the search pattern is removed from its current position in the history and put at the end of it. How the search history can be deleted ?? There is a histdel() function. And finaly another question - How do I put the result of the following command in a variable. :his / -2 :let var = histget('/', -2) Regards, Jürgen -- Jürgen Krämer Softwareentwicklung HABEL GmbH Co. KGmailto:[EMAIL PROTECTED] Hinteres Öschle 2 Tel: +49 / 74 61 / 93 53 - 15 78604 Rietheim-WeilheimFax: +49 / 74 61 / 93 53 - 99
Re: Can bold fonts be disabled ?
Groleo Marius wrote: Hi I use a bold font in guifont, but if the colorscheme uses gui=BOLD, then vim will try to thicken the font even more, turning it into unreadable. I tried s/gui=BOLD/gui=NONE/g but the effect seems to persist. I'm asking if there is a way to tell vim what font to use for bold fonts only, sort of -fb option, or not to try to thicken the bold-fonts even more Please see my .gvimrc http://www.pixelbeat.org/settings/.gvimrc Pádraig.
OPen a dialog box
Hi I have want to display a message (which I have in a variable), in a popup-dialog box. Is it possible to do in VIM. I have seen that in ccase.vim In this plugin, in order to enter comments, a dialog box appears and then we have to type in the check in comments into it. I want to do almost the samething. Looked into ccase.vim, but no clues. Any help would be greatly appreciated. Regards, Shankar
Re: OPen a dialog box
Hi, SHANKAR R-R66203 wrote: I have want to display a message (which I have in a variable), in a popup-dialog box. Is it possible to do in VIM. I have seen that in ccase.vim In this plugin, in order to enter comments, a dialog box appears and then we have to type in the check in comments into it. I want to do almost the samething. Looked into ccase.vim, but no clues. have a look at :help input() :help inputdialog() Regards, Jürgen -- Jürgen Krämer Softwareentwicklung HABEL GmbH Co. KGmailto:[EMAIL PROTECTED] Hinteres Öschle 2 Tel: +49 / 74 61 / 93 53 - 15 78604 Rietheim-WeilheimFax: +49 / 74 61 / 93 53 - 99
Re: Can bold fonts be disabled ?
On 7/19/06, Pádraig Brady [EMAIL PROTECTED] wrote: Groleo Marius wrote: Hi I use a bold font in guifont, but if the colorscheme uses gui=BOLD, then vim will try to thicken the font even more, turning it into unreadable. I tried s/gui=BOLD/gui=NONE/g but the effect seems to persist. I'm asking if there is a way to tell vim what font to use for bold fonts only, sort of -fb option, or not to try to thicken the bold-fonts even more Please see my .gvimrc http://www.pixelbeat.org/settings/.gvimrc Pádraig. Thanks. it works nicely -- Regards, Groleo!
Scrolling relative to cursor
Hi, Given are two loaded buffers. When I switch beween them by :bn/:bp or :n#, the window is redrawn similar to z. z. Redraw, line [count] at center of window (default cursor line). Put cursor at first non-blank in the line. Can I change or workaround this behavior not to do this but to keep the buffer view the same? Thank You Joachim ### This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. For more information, connect to http://www.f-secure.com/
Re: Scrolling relative to cursor
On 7/19/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Given are two loaded buffers. When I switch beween them by :bn/:bp or :n#, the window is redrawn similar to z. ... Can I change or workaround this behavior not to do this but to keep the buffer view the same? You need vim7 for that. In vim7, the following works for me: when switching buffers, preserve window view if v:version = 700 au BufLeave * let b:winview = winsaveview() au BufEnter * if(exists('b:winview')) | call winrestview(b:winview) | endif endif Yakov
Re: Using :g to delete patterns that span multiple lines
Noah Spurrier wrote: I used this pattern to select sections of test that belong to me when CVS or SVN generates a merge conflict. This pattern works fine: /^\_.\{-}===.*$/ I have search highlighting turned on and I can see the multiline patterns get highlighted as expected. ...snip Hello! May I suggest that, at least for this particular purpose, that you might find the following of interest: http://vim.sourceforge.net/scripts/script.php?script_id=1370 CVS conflict resolution using vimdiff In a nutshell, it splits conflict files into two files and lets you work with them using vimdiff. Regards, Chip Campbell
Re: search history - more questions
SHANKAR R-R66203 wrote: I found out that :his / Gives the listing of the search history. [...] I do not understand why the numbers are not consecutive. How the search history can be deleted ?? [...] Searching again for the same (identical) pattern moves it to the front, so to speak; no pattern appears more than once in the history. I guess the move to front removes the old number. Best regards, Tony.
Re: R: matchit doesn't work for php
On Fri, Jul 14, 2006 at 04:16:44AM +0200, Cesar Romani wrote: Thanks a lot, it works but I also notice that else if is not part of the matching, although else if is a valid expression in php: It matches if, else, elseif but it doesn't match if, else, else if How can I include else if in the matching? Many thanks in advance. Cesar First of all, it is not clear to me that everyone would want to treat else if the same as elseif. From the PHP manual, In PHP, you can also write 'else if' (in two words) and the behavior would be identical to the one of 'elseif' (in a single word). The syntactic meaning is slightly different (if you're familiar with C, this is the same behavior) but the bottom line is that both would result in exactly the same behavior. Personally, I would use elseif for something like the example given there, if ($a $b) { echo a is bigger than b; } elseif ($a == $b) { echo a is equal to b; } else { echo a is smaller than b; } but I might write else if for something like if ($a $b) { echo a is bigger than b; } else if ($a == $b) { # This is the complicated case! # Many lines of code } else { echo a is smaller than b; } and then I would be annoyed if else if were treated the same as elseif. If you still want to treat them the same, then replace 'elseif' in the matchit patterns with 'else\s*if'. Then test it: you should get different results depending on whether you start with the cursor on the first or second word of else if, and you may like it. If you really want the two cases treated identically, then you have to make sure that the second part of else if is not treated as an if, so replace '\if' in the matching patterns with '\%(\else\s*\)\@!\if' (untested). That should do it. if (help for matchit not yet installed) :help matchit-install :help matchit-spaces HTH --Benji Fisher
Re: Patch for vimtips.vim
On Sat, Jul 15, 2006 at 06:28:27PM -0500, Bill McCarthy wrote: Hello Vim List, Two fairly minor problems with the current script are (1) it is assumed that users do not set report=0 and (2) providers of tips keep their line lengths = 80 characters. The first assumption may be true for most users, but some of use like the feedback provided by report=0 (at least while working interactively. The second is definitely false. Top 848 has a 1,232 character line! The patch solves both of these minor problems. Thanks for the contribution. I will upload a new version to http://www.vim.org/scripts/script.php?script_id=88 You can download a bunch of tips from vim.org, and then this script will display one (in a help window) the first time you start up vim each day. You can also use the command :TipOfTheDay (Normal abbreviation rules apply.) whenever you want. --Benji Fisher P.S. I do not always keep up with this list, and I have set up procmail to sort mail into folders based on the To and Cc lines. I will experiment with filtering on the Delivered-To line. In the mean time, if I do not respond when you have sent mail to the list and cc'ed me, or vice-versa, please try again, sending only to me.
Re: Website Sign-up
From the Site Help link: http://vim.sourceforge.net/huh.php In order to upload scripts you must have an account with vim online. This is so there can be defined contact people for scripts to avoid confusion. User passwords are stored using one-way encryption. It took me about 30 seconds to find and I didn't even know if it was there or not. :Robert
Re: delete buffers matching pattern
On Mon, Jul 17, 2006 at 10:59:41AM -0500, Tim Chase wrote: Is there a way to delete all buffers matching a certain pattern? For example, suppose I just read in all files in a directory and this is my buffer list: 1 a.txt 2 b.txt 3 1.exe 4 2.exe 5 c.txt 6 3.exe 7 d.txt I want to do something like :bdelete *.exe. The following seems to do the trick for me: :bufdo if bufname(%)=~'.exe$' | bdel | endif or its case-insensitive cousin :bufdo if bufname(%)=~?'.exe$' | bdel | endif I think you want to escape the dot: :bufdo if bufname(%) =~? '\.exe$' | bdel | endif (Optional spaces added because I find it more readable that way.) HTH --Benji Fisher
Re: test if insert mode
On Tue, Jul 18, 2006 at 11:49:52AM +0200, Eric Smith wrote: How do I implement a conditional to test if in insert or normal mode? Thanks If I am doing anything at all complicated, I use a function: :map F4 :call Foo()CR If I want to do something slightly different depending on the mode, I add a flag to the argument list: :nmap F4 :call Foo('n')CR :imap F4 :call Foo('i')CR function! Foo(mode) if a:mode == 'n' set up for Normal mode elseif a:mode == 'i' set up for Insert mode else oops! return endif lots more stuff endfun HTH --Benji Fisher
Re: posting to vim
On Tue, Jul 18, 2006 at 03:30:19PM -0400, Charles E Campbell Jr wrote: As I understand things, vim.sf.net is minimally maintained. Some folks have had problems in getting off the mailing list, for example, and there's essentially no administrator willing to take the time to do that. My impression, which may well be utterly wrong, is that the owners of the machine supporting the site are willing to reboot the machine when necessary. My impression, which is no more official than yours, is that Bram and others have access to vim.sf.net a.k.a. vim.org . They mostly let it run automatically, but they do respond to serious problems. The mailing lists are handled by a different machine. (From the mail headers, I think it is foobar.math.fu-berlin.de .) This is a really ancient machine, so forget about upgrading the kernel. AFAIK not even Bram has access to the mailing list admin functions, and no one who does is currently paying any attention (or responding to requests). Once Bram settles in to Google-Zurich (IIRC) and releases vim 7.1 (i.e., however many patches have accumulated since 7.0 was released) I expect that he will move the mailing lists to a new machine. We may all have to re-subscribe. HTH --Benji Fisher
Re: delete buffers matching pattern
:bufdo if bufname(%)=~?'.exe$' | bdel | endif I think you want to escape the dot: :bufdo if bufname(%) =~? '\.exe$' | bdel | endif Oh, so correct. My error. It's one of those subtle things that works just fine until it bites you in the bum when one has file extensions such as the hypothetical filename.annexe (a quick grep of my /usr/share/dict/british-english returned that as the only word ending in exe) (Optional spaces added because I find it more readable that way.) yes, if I have to come back and read my code later, extra spaces are a nice touch...but for these one-line run-it-and-forget-it things, I tend to be a little more compact (a genteel way of saying lazy :) -tim
edit-with-vim context menu item disappeared with vim7 upgrade
I just upgraded from vim 6.2 to vim 7.0 on WinXP Home. My context menu item to edit with vim is no longer present. Should I try to re-install or is there a better way to fix this?
Re: edit-with-vim context menu item disappeared with vim7 upgrade
Michael Sorens wrote: I just upgraded from vim 6.2 to vim 7.0 on WinXP Home. My context menu item to edit with vim is no longer present. Should I try to re-install or is there a better way to fix this? Try running the install program which ought to be in your $VIMRUNTIME directory (i.e., normally in $VIM/vim70), along with gvim.exe . If it doesn't work, see :help win32-popup-menu :help install-registry HTH, Tony.
Re: A card game for Vim
Dnia środa, 19 lipca 2006 04:54, Hari Krishna Dara napisał: First of all, thanks a lot for trying it, you are the only who showed enthusism until now :) Most people probably pretend they are above small game of solitaire ;) On Wed, 19 Jul 2006 at 12:02am, Mikolaj Machowski wrote: Dnia wtorek, 18 lipca 2006 03:57, Hari Krishna Dara napisa?: I am creating a new card game for Vim7 and wonder if anyone is interested to try it and give me feedback. The game is quite usable at the current state, though there are some pending issues. Here are a couple of snapshots of the game to get you interested: http://haridara.googlepages.com/arimona.html http://haridara.googlepages.com/arimona-middle.html I have only tried the game so far on Windows, and the Unicode symbols that the game requires are found to be in the following fonts (out of those that I have installed): Works perfectly on Linux with always present families: Nimbus, Bitstream/DejaVu. Thanks, I will note this down. One problem: all of them are leaving small artefacts (two or three pixels) after removing cards. :redraw! fixes that. Also when removing last card from free cards area (top left corner) whole column is highlighted like stack. ps. Any plans for final animation? ;) I don't know how easy it is going to be, but I would rather spend time in writing a different game (say solitaire). Sure, more is better :) m. -- Show time!
Re: Firefox and VIM?
I am using the firefox extension Editus Externus by Philip Nilsson. This is a great tool. Download it from firefox using Tools:Extensions:Get more extensions at https://addons.mozilla.org/firefox/1195/ and don't forget to set '--nofork' as Argument in the Preferences. --- Andreas Poisel [EMAIL PROTECTED] wrote: * Yakov Lerner [EMAIL PROTECTED] [060719 00:50]: Right, mozex for firefox is at https://addons.mozilla.org/firefox/40/ But it seems not maintained for a long time Try the ViewSourceWith (http://dafizilla.sourceforge.net/viewsourcewith/) extension. It supports editing textareas with a configurable external editor. -- Regards, Andi -- http://clewn.sourceforge.net gdb support in Vim
Sharing vimproject file between WinXP and cygwin
I've been using the Project plugin for many years now and I like it a lot. However one problem keeps bugging me. I would like to share my ~/.vimprojects file between my cygwin and windows version of vim. The problem is the paths for the project. When I enter a posix path, the windows version doesn't recognize it and vice-versa. I could run the file through a small script which converts the paths with cygpath but keeping them synchronized would be cumbersome. Any ideas? -- JR
Re: Sharing vimproject file between WinXP and cygwin
Jean-Rene David wrote: I've been using the Project plugin for many years now and I like it a lot. However one problem keeps bugging me. I would like to share my ~/.vimprojects file between my cygwin and windows version of vim. The problem is the paths for the project. When I enter a posix path, the windows version doesn't recognize it and vice-versa. I could run the file through a small script which converts the paths with cygpath but keeping them synchronized would be cumbersome. Any ideas? If there are paths in the source of your scripts, you can disambiguate between Cygwin and Windows (and, possibly, Linux if you have dual-boot): Windows native has(win32unix) == 0 has(unix) == 0 Cygwin has(win32unix) == 1 has(unix) == 1 Linux has(win32unix) == 0 has(unix) == 1 So, for instance, if has(unix) code specific to Linux or Cygwin else code specific to native Windows endif or if has (win32unix) Cygwin-only code elseif has(unix) code for true unix else code for native Windows endif seε :help has() :help feature-list HTH, Tony.
[Fwd: Re: Sharing vimproject file between WinXP and cygwin]
Whoops, forgot to cc the list. Original Message Subject: Re: Sharing vimproject file between WinXP and cygwin From:Tom Purl [EMAIL PROTECTED] Date:Wed, July 19, 2006 3:03 pm To: Jean-Rene David [EMAIL PROTECTED] -- The following path works well for me on both XP and Linux: some_project=$HOME/some_project filter=*.txt CD=. { I just have to set a %home% environment variable on my XP machine. I can then synchronize my $HOME/some_project project between my Linux and XP computers using unison and work on it using Vim without making any modifications to anything. HTH! Tom Purl I've been using the Project plugin for many years now and I like it a lot. However one problem keeps bugging me. I would like to share my ~/.vimprojects file between my cygwin and windows version of vim. The problem is the paths for the project. When I enter a posix path, the windows version doesn't recognize it and vice-versa. I could run the file through a small script which converts the paths with cygpath but keeping them synchronized would be cumbersome. Any ideas? -- JR
Re: Generic xml omnicomplete
Dnia wtorek, 18 lipca 2006 19:39, A.J.Mechelynck napisał: IMHO, inoremapping / to /C-XC-O might be included as a vim-online tip but definitely not as part of the standard XML/HTML filetype plugins. This is NOT part of xmlcomplete.vim . Just standard response for autoclosing questions. m.
Re: Generic xml omnicomplete
Mikolaj Machowski wrote: Dnia wtorek, 18 lipca 2006 19:39, A.J.Mechelynck napisał: IMHO, inoremapping / to /C-XC-O might be included as a vim-online tip but definitely not as part of the standard XML/HTML filetype plugins. This is NOT part of xmlcomplete.vim . Just standard response for autoclosing questions. m. I think there has been a misunderstanding. From you previous post, I had the impression that you expected Bram to include it into the official runtime files; hence my reaction. If you just meant to have that mapping mentioned in the helpfiles, that's OK by me. Best regards, Tony.
Re: Awareness of python import semantics for [i, etc.?
On 7/13/06, Gary Johnson [EMAIL PROTECTED] wrote: A lot of this is already incorporated into the $VIMRUNTIME/ftplugin/python.vim plugin. For example, gf works fine with Python import statements. Actually, that's my point. gf does _not_ work for Python imports that have a from clause. The paradigm is different from #include files, where the identifier under the cursor is enough information to find the file. In Python, you need the whole line. i.e.: from myproject.something.blar.blag import Bok if you put the cursor over Bok and hit gf, no dice. If the import line is rewritten as import myproject.something.blar.blag.Bok as Bok and you put the cursor over the second word, it works fine.
R: R: matchit doesn't work for php
-Messaggio originale- Da: Benji Fisher [mailto:[EMAIL PROTECTED] Inviato: mercoledì 19 luglio 2006 15.17 A: vim Oggetto: Re: R: matchit doesn't work for php On Fri, Jul 14, 2006 at 04:16:44AM +0200, Cesar Romani wrote: Thanks a lot, it works but I also notice that else if is not part of the matching, although else if is a valid expression in php: It matches if, else, elseif but it doesn't match if, else, else if How can I include else if in the matching? Many thanks in advance. Cesar First of all, it is not clear to me that everyone would want to treat else if the same as elseif. From the PHP manual, In PHP, you can also write 'else if' (in two words) and the behavior would be identical to the one of 'elseif' (in a single word). The syntactic meaning is slightly different (if you're familiar with C, this is the same behavior) but the bottom line is that both would result in exactly the same behavior. Personally, I would use elseif for something like the example given there, if ($a $b) { echo a is bigger than b; } elseif ($a == $b) { echo a is equal to b; } else { echo a is smaller than b; } but I might write else if for something like if ($a $b) { echo a is bigger than b; } else if ($a == $b) { # This is the complicated case! # Many lines of code } else { echo a is smaller than b; } and then I would be annoyed if else if were treated the same as elseif. If you still want to treat them the same, then replace 'elseif' in the matchit patterns with 'else\s*if'. Then test it: you should get different results depending on whether you start with the cursor on the first or second word of else if, and you may like it. If you really want the two cases treated identically, then you have to make sure that the second part of else if is not treated as an if, so replace '\if' in the matching patterns with '\%(\else\s*\)\@!\if' (untested). That should do it. if (help for matchit not yet installed) :help matchit-install :help matchit-spaces HTH --Benji Fisher In the following code, if from line 2 doesn't match else from line 7 1 ?php 2 if($a $b) 3 { 4 echo a is bigger than b; 5 if($a=10) $b=5; 6 } 7 else 8 { 9 echo a is smaller than b; 10 } 11 ? Many thanks in advance. Cesar
Re: Awareness of python import semantics for [i, etc.?
On 2006-07-19, John Reese [EMAIL PROTECTED] wrote: On 7/13/06, Gary Johnson [EMAIL PROTECTED] wrote: A lot of this is already incorporated into the $VIMRUNTIME/ftplugin/python.vim plugin. For example, gf works fine with Python import statements. Actually, that's my point. gf does _not_ work for Python imports that have a from clause. The paradigm is different from #include files, where the identifier under the cursor is enough information to find the file. In Python, you need the whole line. i.e.: from myproject.something.blar.blag import Bok if you put the cursor over Bok and hit gf, no dice. I wouldn't expect that to work because Bok is not a file but an object within the file myproject/something/blar/blag.py. If you put the cursor over myproject.something.blar.blag, on the other hand, it should open that file. If the import line is rewritten as import myproject.something.blar.blag.Bok as Bok and you put the cursor over the second word, it works fine. I would expect that to work, and it confirms that your 'path' is set correctly. All that being said, I'm new at using vim to edit Python files, so I may be misunderstanding something. Regards, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Wireless Division | Spokane, Washington, USA
iconstring (addendum)
I can not get iconstring to work. The WM_ICON_NAME is always the same as WM_NAME. % vim -g --version VIM - Vi IMproved 7.0 (2006 May 7, compiled May 8 2006 13:24:06) Compiled by [EMAIL PROTECTED] Normal version with GTK GUI. Features included (+) or not (-): -arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv -cscope +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path +find_in_path +folding -footer +fork() -gettext -hangul_input -iconv +insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession +modify_fname +mouse +mouseshape -mouse_dec +mouse_gpm -mouse_jsbterm -mouse_netterm +mouse_xterm -multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra -perl +postscript +printer -profile -python +quickfix +reltime -rightleft -ruby +scrollbind +signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save system vimrc file: $VIM/vimrc user vimrc file: $HOME/.vimrc user exrc file: $HOME/.exrc system gvimrc file: $VIM/gvimrc user gvimrc file: $HOME/.gvimrc system menu file: $VIMRUNTIME/menu.vim fall-back for $VIM: /usr/local/share/vim Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/gtk-1.2 +-I/usr/include/glib-1.2 -I/usr/lib64/glib/include -I/usr/X11R6/include -g -O2 -I/usr/X11R6/include Linking: gcc -L/usr/X11R6/lib64 -L/usr/local/lib -o vim -L/usr/lib64 -L/usr/X11R6/lib64 -lgtk -lgdk +-rdynamic -lgmodule -lglib -lXi -lXext -lm -lXt -lncurses -lacl -lgpm :set --- Options --- background=dark formatoptions=qlmouse=nvc syntax=vim wildmenu cmdheight=2 guioptions=almiepreviewheight=8 tabstop=4 window=87 comments= helplang=en scroll=17 textwidth=78 commentstring=%s hlsearchscrolloff=5 title filetype=vimiconshiftwidth=4titlelen=0 foldlevel=16incsearch showfulltag ttyfast backspace=indent,eol,start completeopt=menu,longest guifont=Monospace 8,lucidasanstypewriter-12,Lucida_Console:h9:cANSI iconstring=%t%m%m%m%r makeprg=cd $FE_ROOT;python $FE_ROOT/bin/forge.py -j 2 here\|sed -ue s/^[[^m]*m//g path=.,/usr/include$FE_ROOT/** tags=./tags,tags,$FE_ROOT/tags titlestring=%m%t - VIM %F % xprop [...] WM_ICON_NAME(STRING) = .vimrc - VIM ~/.vimrc WM_NAME(STRING) = .vimrc - VIM ~/.vimrc In this case, I would have liked to have an icon name of .vimrc and a title of VIM ~/.vimrc, but since I can only get one, I jammed them together. This is manually compiled on Red Hat. On another box, I get similar results on an emerge with Gentoo, which uses version 6.4. -- _ ( \ _ \/_ / _ _ Jason Weber Glendale, CA \|(\/)())) \/\/(-/_)(-/( http://www.imonk.com/baboon [EMAIL PROTECTED] // [EMAIL PROTECTED] (/ One more detail. It works fine in non-gui mode. It's just in -g or gvim mode that the iconstring appears to be unrecognized. I'd just like to know if there is some compile option that I'm missing or if maybe X11 iconstring support isn't actually implemented. -- Jason Weber
:edit {file} question
What is the easiest way to edit a file that is in the same directory as the current file? E.g. I open a file like this: vim /x/y/z/w/file1.c and want to now open /x/y/z/w/file2.c? Occasionally want to open files in the parent directory of current file's directory. It would be nice if there is a special character like , which starts from the current buffer's directory. So :e ,/file2.c would work. Or maybe ~~ double tilda character if , doesn't work... Thanks, Malahal.
Re: :edit {file} question
[EMAIL PROTECTED] wrote: What is the easiest way to edit a file that is in the same directory as the current file? E.g. I open a file like this: vim /x/y/z/w/file1.c and want to now open /x/y/z/w/file2.c? Occasionally want to open files in the parent directory of current file's directory. It would be nice if there is a special character like , which starts from the current buffer's directory. So :e ,/file2.c would work. Or maybe ~~ double tilda character if , doesn't work... Thanks, Malahal. Method 1: One particular file :e %:h/filename Method 2: Change directory for the current window only (assuming other files, possibly in other directories, are in split windows which are not to be affected) :lcd %:h :e file1 do some edits :w :e file2 etc. Method 3: Change the current directory for the whole of Vim :cd %:h :e file1 do something :w :e file2 etc. In all the above examples, you can use :new :tabnew etc. instead of :e. In Method 2 the child window will (IIUC) inherit the :lcd setting of its parent, i.e. of the one which was current when you issued the new (etc.) command. See :help :cd :help :_% :help filename-modifiers :help :lcd etc. HTH, Tony.
Re: :edit {file} question
On Thursday 20 July 2006 11:10, [EMAIL PROTECTED] wrote: What is the easiest way to edit a file that is in the same directory as the current file? E.g. I open a file like this: vim /x/y/z/w/file1.c and want to now open /x/y/z/w/file2.c? Occasionally want to open files in the parent directory of current file's directory. It would be nice if there is a special character like , which starts from the current buffer's directory. So :e ,/file2.c would work. Or maybe ~~ double tilda character if , doesn't work... A while back I defined the mapping cmap , c-r=expand('%:h')cr/ which kind of does what you suggested - it inserts the path to the current file when you type a comma in the command line. I've found it very useful. For what I'm doing at present, it suits me to have it. But it does mean that when I want a real comma (eg in a search pattern, or a :set command) I have to use Ctrl-v or Ctrl-q first. I guess it could easily be improved call a function which checks the command line to see if it starts with :e, :sp, and whatever else is appropriate - and otherwise inserts a regular comma. I'll let you know if I get around to it. John
Re: :edit {file} question
Hi Malahal, You can use ':S' to open a new File Explorer window or ':E' to open file explorer in the current window. regards, Peter --- [EMAIL PROTECTED] wrote: What is the easiest way to edit a file that is in the same directory as the current file? E.g. I open a file like this: vim /x/y/z/w/file1.c and want to now open /x/y/z/w/file2.c? Occasionally want to open files in the parent directory of current file's directory. It would be nice if there is a special character like , which starts from the current buffer's directory. So :e ,/file2.c would work. Or maybe ~~ double tilda character if , doesn't work... Thanks, Malahal. On Yahoo!7 Messenger - Make free PC-to-PC calls to your friends overseas. http://au.messenger.yahoo.com
Re: :edit {file} question
[EMAIL PROTECTED] wrote on 2006.07.20 09:10:43: What is the easiest way to edit a file that is in the same directory as the current file? E.g. I open a file like this: vim /x/y/z/w/file1.c and want to now open /x/y/z/w/file2.c? Occasionally want to open files in the parent directory of current file's directory. It would be nice if there is a special character like , which starts from the current buffer's directory. So :e ,/file2.c would work. Or maybe ~~ double tilda character if , doesn't work... Thanks, Malahal. you have many way: 1. open a file explore does this, use :Explore or: 2. creat a map to change to current directory, then just :e tab -- Sincerely, Pan, Shi Zhu. ext: 2606
Miss the file explorer in Vim 6.4
Hello, The vim 7.0 does not come with the file explorer, instead with the netrw plugin. However, I dislike it. My favorate is the file explore standard plugin. I disabled the netrw plugin, I found the file explorer in the Vim 6.4 and copied it into Vim 7.0 but it doesn't work. When I use :Explorer, it reported error in the StartExplore function line 28.--- unable to open swap file for a Well, I bet the Explorer functions well in Vim 6.4. Why can't it work in Vim 7.0? I'm running Vim 7.0 patch 035 on Cygwin, the exploere.vim comes from runtime file in Vim 6.4 -- Sincerely, Pan, Shi Zhu. ext: 2606