[BOF] Killer feature
Hello At the end of the Vim BOF you asked for a killer feature and - unlike your guest - I immediately had few ideas. Thinking of it I was able to boil it down to the one killer feature: Eclipse-Integration And yes, I already voted on it. I soon have to work with Eclipse - no two ways around it. And I don't think I am the only one. And while Eclipse has tons of features when it comes to text editing it's just another CUA Editor. Martin -- Martin Krischik mailto://[EMAIL PROTECTED] pgpWcPq1z4lO3.pgp Description: PGP signature
Re: usability suggestion: 'viminfo'
Tony Mechelynck wrote: Bram: The vimrc_example.vim is already mentioned in 23 helpfile lines. I suggest that (a) it be mentioned also under :help vimrc and (b) that the text under :help not-compatible be changed to mention sourcing rather than (as now) copying. Sourcing is not really more complicated than copying, it is a Vim thing, and it is done the same way on all platforms: I rather have beginners copy the vimrc_example.vim file and change it. That way they learn about the commands inside them and what happens when disabled. Sourcing the script without looking in it doesn't teach you anything. I know this means that an updated version won't be picked up automatically, but that is less important when you are just starting with Vim. -- For a moment, nothing happened. Then, after a second or so, nothing continued to happen. -- Douglas Adams, The Hitchhiker's Guide to the Galaxy /// 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///
Patch 7.0.121
Patch 7.0.121 Problem:GUI: Dragging the last status line doesn't work when there is a text tabline. (Markus Wolf) Solution: Take the text tabline into account when deciding to start modeless selection. Files: src/gui.c *** ../vim-7.0.120/src/gui.cSun Sep 10 21:38:48 2006 --- src/gui.c Sun Oct 8 12:47:04 2006 *** *** 2873,2878 --- 2873,2881 */ if ((State == NORMAL || State == NORMAL_BUSY || (State INSERT)) Y_2_ROW(y) = topframe-fr_height + # ifdef FEAT_WINDOWS + + firstwin-w_winrow + # endif button != MOUSE_DRAG # ifdef FEAT_MOUSESHAPE !drag_status_line *** ../vim-7.0.120/src/version.cFri Oct 6 23:33:22 2006 --- src/version.c Sun Oct 8 13:55:58 2006 *** *** 668,669 --- 668,671 { /* Add new patch number below this line */ + /**/ + 121, /**/ -- If they don't keep on exercising their lips, he thought, their brains start working. -- Douglas Adams, The Hitchhiker's Guide to the Galaxy /// 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///
A couple of notes on VIM performance
Hi All! I'd like to whine about VIM 7 performance a little bit. I use VIM both on Windows and Linux and really love it. But recently I found myself using another editor (embedded editor in FAR file manager, if you know what it is) more often than I'd like to. I analyzed myself and found that the reason is VIM startup time. My VIM configuration became more comples, I moved to VIM 7 and suddenly my the delay of VIM startup became too long for my brain so the brain chooses to start another editor sometimes. This applied to Windows only, because Linux startup is OK (so far - I'm on 6.3 there). Timed with gvim -c :q .vimrc it takes 0.91 seconds for VIM to start up and shut down. I didn't like this thing and decided to do some investigations on VIM startup time. Since the start up time usually has to do with reading various configuration files, I profiled the VIM startup with filemon (from sysinternals.com) and it showed several interesting (maybe to me only) things. 1. Enabling spell checking in .vimrc file is pretty expensive. When I comment out line set spell spelllang=en,ru the startup time reduces to 0.6 seconds. 2. Taglist plugin does a search for ctags command which becames pretty expensive once you have a lot of directories in your PATH. I was able to make it to avoid the search by adding line let g:Tlist_Ctags_Cmd = 'ctags' to my .vimrc. This saved about 0.06 seconds. Not that big but better than it was. 3. I found that I pay about 0.2 seconds on every VIM startup for Perl, TCL, Python and Scheme interfaces. This is very approximate number - I got it from filemon logs and didn't try to recompile VIM without those features. As far as I can see, VIM locates (and loads?) Perl, TCL, Python and Scheme libraries and reads in / parses perl.vim, tcl.vim, python.vim and scheme.vim syntax files. From the source code it seems to be that loading of these interfaces should be on demand, so I'm not sure why this happens. Any hints? 4. There are other places which contribute to the start-up time (not so big, though). For example, I found a lot of reading from $VIMRUNTIME/rgb.txt file. It turned out that I use desert color scheme, which refers the colors by their names. These names are read from the abovementioned file along with their RGB values (gui_mch_get_color). What is not very good is that reading is done for every gui_mch_get_color call (well, if the name of the color is not in pre-defined table) and the result is not kept in the memory. The number 1 above concerns me most of all. I really like spell-checking but paying 0.3 seconds on each startup seems to be slow. It would be nice if VIM could do the loading of spl files in background. -- Alexei Alexandrov
[Vim] Ada language Mode.
Hello, I have created a new language mode for Ada [1] and would like anybody who interested in Ada and Vim to comment on. The new mode offers: * Support for Ada 2005 keywords [2]. * Improved syntax highlight (Including all standart Pragmas and Attributes). * User completion (Keyword, Pragmas, Attributes) * Omni completions (using ctags or gnat xref). * Tag search (using ctags or gnat xref). * Unified Online help (One ada.txt for all). * Compiler support for GNAT and Dec Ada (using an extensible OO-Design). * Three different folding mechanisms. * All function are autoload. * Optimised for Vim 7 The aim is to replace the Ada language mode, which is currently part of the standart runtime, with this new mode. Martin [1] http://www.vim.org/scripts/script.php?script_id=1609 [2] http://www.adaic.org/standards/ada05.html -- mailto://[EMAIL PROTECTED] Ada programming at: http://ada.krischik.com
Re: A couple of notes on VIM performance
On 8.10.2006, at 15:37, Alexei Alexandrov wrote: The number 1 above concerns me most of all. I really like spell- checking but paying 0.3 seconds on each startup seems to be slow. It would be nice if VIM could do the loading of spl files in background. Sorry to be a bit negative, but if the startup time, which to me is quite fast, really bothers you so much, don't quit vim all the time. Also :he clientserver may help you, I don't use it myself though so I don't know much about it. I'll let others comment on optimizing vim. -- Jussi Hagman, [EMAIL PROTECTED], iChat/AIM: jussihagman, ICQ: 54004113 Studentbyn 4 D 33, 20540 Åbo, Finland +358 50 56 51 170
Patch for python syntax
Hi All! Here is a small patch for python.vim syntax file which enables spell checking in comments and strings only. It would be nice to include it into VIM 7. P.S. It seems that very few syntax files support @Spell/@NoSpell correctly. -- Alexei Alexandrov python.vim.patch Description: Binary data
Re: [Vim] Ada language Mode.
On 10/8/06, Martin Krischik [EMAIL PROTECTED] wrote: Hello, I have created a new language mode for Ada [1] and would like anybody who interested in Ada and Vim to comment on. I'm not interested in the slightest, but I'll comment anyway. Here's how to get your additions into the main Vim release: Please get in contact with the current maintainer(s) of the file(s) you intend to replace. They'll either give maintainership to you, or they'll integrate your additions into their file(s). As it sounds like you've maid considerable additions to the language mode, I'll assume that they'll be glad to give you maintainership of the files. Anyway, when that's been decided, get the maintainer(s) to contact Bram to notify him of the changes in maintainership and send along the new files. nikolai
Q: rsync://ftp.vim.org/Vim/runtime/ - when?
When current version of vim runtime will be updated for latest patches? Patch 111 modifies autoload/gzip.vim and doc/eval.txt which are still outdated on ftp... -- Regards, Sir Raorn. signature.asc Description: Digital signature
Re: New Versions of 4nt and tcmd
On Sun 8-Oct-06 7:29pm -0600, Bill McCarthy wrote: New versions of 4nt and tcmd were recently loaded to the FTP site. These are still called 8.00.49. What is the difference? Sorry, I sent that to the wrong email address. -- Best regards, Bill
Re: Q: rsync://ftp.vim.org/Vim/runtime/ - when?
On Sun 8-Oct-06 7:39pm -0600, A.J.Mechelynck wrote: Bill McCarthy wrote: On Sun 8-Oct-06 5:42pm -0600, Alexey I. Froloff wrote: When current version of vim runtime will be updated for latest patches? Patch 111 modifies autoload/gzip.vim and doc/eval.txt which are still outdated on ftp... The gzip.vim is clearly old, but comparing (vimdiff) the eval.txt on the FTP site to the patch version on CVS, they both share the same internal date of 22-Sep-2006 yet the one on the FTP site looks newer. I generally find it easier to ignore the patches to runtime files and, instead, rely on the FTP site for those. They are usually updated fairly quickly. After checking, the new versions of the files mentioned in patch 111 agree with the latest versions I downloaded from the rsync server, except that the gzip.vim lacks the new datestamp (the rest of the file is OK though.) After deleting gzip.vim and performing a copy update from the ftp site, the gzip.vim downloaded is older. It will not use the new shellescape function. It has this logic: if v:version 700 || (v:version == 700 has('patch999')) return shellescape(a:name) endif The patched version on the CVS, has the same code but the has() has: has('patch111')) so it will use the new function. -- Best regards, Bill
Re: turn on automatic indent
Hello, I am using VIM on RH 9.0, is it possible to have automatic indent for linux bash if then ... fi? If yes, could you please explain how? Thank you. Jim
Re: Forms highlighting
Dnia sobota, 7 października 2006 09:23, napisałeś: There is a new version at: http://haridara.googlepages.com/forms.vim Significant changes being: - Support for disabling fields. This may be question of gusto but IMO disabled field should be visible but greyed out, not completely hidden. I know some usability studies favor hiding it but it is usually in GUI when disabled element is completely removed, empty lines in Vim form look strange. Rest feels very nice. Thanks for fixing multiple same-hotkeys problem. I modified the demo to include both enabling/disabling fields as well as validation (zip field). When inserting non-valid data it is almost impossible to leave zip field. At least some warning message would be appropriate. This is not for forms stuff but demoform should set good standards for interaction :) On Thu, 5 Oct 2006 at 1:19pm, Mikolaj Machowski wrote: C-N, C-P? It should work everywhere and is quite natural for Vim users (IMO). Now C-N and C-P also work like Tab and S-Tab. Thanks. It has problems when leaving combobox backward but so far it is the best way to navigate in Linux terminal. I would expect some simplifying in use. For example why explicitly declare them? Create listeners automatically. I am not still clear. How can you create listeners automatically? Can you give some example? Maybe by comparison. Now creation of form is: 1. Create listener 2. Define listener functions 3. Create form (g:forms#form.new) 4. Add fields and in buttons declare listener explicitly 5. Add loop to add listener to all other fields 6. Add listener events functions Steps 1. 5. and second half of 4. IMO are not really necessary. Make it: 1. Create form (g:forms#form.new) 2. Define listener functions 3. Add fields 4. Add listener events functions Creation of listener could be done in form.new depending on argument of call. - Validators. Local validation (onBlur event) can be already done. Problem is when doing after pressing OK. Hmm, in fact it can be also done but is boring ;) to do. Some API for that would be good. How was onBlur event possible? Previously you could do validation in the valueChanged() callback, but you couldn't constrain the focus, but the new isValid() callback allows that. My mistake, looked like valueChanged works in way of onBlur. Title may be declared. Make it support for non showing it, like:: What is the use of declaring it when not showing? Are you thinking of it as an identifier, like a name for fields? Yes. One change which would be good to introduce before official beta: obligatory fields. As I wrote earlier - full validation if possible but laborious. And declaring it in API should allow for some emphasis (highlighting?). Does the new isValid() callback meet your expectations? Sorry, don't have time to test it but I suspect this is exactly what I want. m.
Re: Win32 build of updated gvim
On 10/7/06, A.J.Mechelynck [EMAIL PROTECTED] wrote: http://wyw.dcweb.cn/download.asp?path=vimfile=gvim70.zip Steve Hall's Vim can be downloaded (with runtime files as of build date) from https://sourceforge.net/project/showfiles.php?group_id=43866package_id=39721 -- the latest patchlevel as of this writing is 7.0.118 dated Oct. 3, 2006; and as the release notes show, it has the following characteristics: Big version with MS-Windows 32-bit GUI and OLE support, and also (IIUC) Big MS-Windows 32-bit version without GUI +gettext/dyn +iconv/dyn +multi_byte_ime/dyn +mzscheme/dyn, for libmzsch352.dll and libmzgc352.dll +perl/dyn, for perl58.dll +python/dyn, for python24.dll +ruby/dyn, for msvcrt-ruby18.dll +tcl/dyn, for tcl84.dll As you probably know, /dyn means that the feature will be present if the appropriate DLL is found in the PATH, and that Vim will work OK, but without the feature, if the DLL is not found. IIUC, +multi_byte_ime/dyn also means that it will function as +multi_byte but -multi_byte_ime if the Windows IME is not found. This is not to berate Yongwei's efforts, quite the opposite: the runtime files don't really need to be updated as often as the binaries, and downloading only the latter saves bandwidth (both yours and at the download site). I did try Steve's build, but I found this method of updating is quite troublesome and takes more time than I like to (maybe someone should write a program to automatically update the runtime files?). Besides, my build has some (minor) differences from Steve's: * His binary includes more features, like MzScheme (absent from the standard build too) * His binary is built with GCC, while mine with MSVC * His binary is a little `fatter' than mine * I only provide gvim.exe, but not vim.exe (this can change if people do want it) It is good that people can have multiple choices :-). Best regards, Yongwei -- Wu Yongwei URL: http://wyw.dcweb.cn/
Re: adding first part to input()
Excellent The completion type that I am looking for is dictionary completion like when I go c-X c-K in insert mode. Is there a way to achieve completion from words in specified files with the input() function? Thanks Eric On 08/10/06, A.J.Mechelynck [EMAIL PROTECTED] wrote: The input() function takes (at least in Vim 7) up to three arguments, as follows: input({prompt} [, {text} [, {completion}]]) {prompt} is the question text Vim will ask the user {text} if present and not empty, is the default reply. IIUC, this is what you want. {completion} (optional) is the kind of completion to use. Valid values (which -- Eric Smith
server not dound with aap update
Anyone else experience this: cvs [checkout aborted]: connect to cvs.sf.net(66.35.250.207):2401 failed: No route to host Aap: Error in recipe /home/eric/VIM/main.aap line 38: fetch failed for ['vim7'] -- Eric Smith
Re: Mapping german umlauts
Meino Christian Cramer wrote: Hi, I want to remap the german umlauts to {,[,] and } in normal mode only. When I type the umlauts on the commandline of my zsh there is no problem. When I type them in insert mode in vim: no problems. Therefore I /think/ (read: dont no for sure) that there should be no problem. In my $HOME/.vimrc I wrote: nnoremap o [ nnoremap a ] nnoremap O { nnoremap A } (I replaced the umlauts with their corresponding vowels here in this mail only -- just to make them displayable in any case...) But this does not work. With the :map command I can see the maps but the umlauts looks like 8bit-something. Two of them are displayed as two characters. Then I tried: nnoremap o [ nnoremap a ] nnoremap O { nnoremap A } which results in nothing: Now the corrupted maps via the :map command has vanished completly. Now I got an Error message displayed in front of my inner eye: WARNING! Idea stack underflow! What can I try else ? Thank you very much for any help in advance ! Keep hacking! mcc You should not change 'encoding' after setting your maps; and if your vimrc's 'fileencoding' is not your 'encoding' then it ought to have a :scriptencoding statement. Or else, you can encode it in 7-bit ASCII using Char-nn notation, e.g. exe noremap Char-196 } | LATIN CAPITAL A WITH DIAERESIS exe noremap Char-214 { | LATIN CAPITAL O WITH DIAERESIS exe noremap Char-228 ] | LATIN SMALL A WITH DIAERESIS exe noremap Char-246 [ | LATIN SMALL O WITH DIAERESIS The above should work regardless of whether your 'encoding' is Latin1, UTF-8, or (I think) cp1252; but if you use an 'encoding' different from your locale charset, you should still set 'encoding' first and define the mappings afterwards. (I use :exe wrapping here to allow a comment on the same line.) Similarly: Ä 196 0xC4LATIN CAPITAL A WITH DIAERESIS Ö 214 0xD6LATIN CAPITAL O WITH DIAERESIS Ü 220 0xDCLATIN CAPITAL U WITH DIAERESIS ß 223 0xDFLATIN SMALL LETTER SHARP S ä 228 0xE4LATIN SMALL A WITH DIAERESIS ö 246 0xF6LATIN SMALL O WITH DIAERESIS ü 252 0xFCLATIN SMALL U WITH DIAERESIS see :help Char :help :scriptencoding http://www.unicode.org/charts/PDF/U0080.pdf etc. Best regards, Tony.
Re: turn on automatic indent
Jim wrote: Hello, I am using VIM on RH 9.0, is it possible to have automatic indent for linux bash if then ... fi? If yes, could you please explain how? Thank you. Jim 1. To activate $VIMRUNTIME/indent/sh.vim (and also indent scripts for other filetypes), make sure that your vimrc contains one of filetype plugin indent on or source $VIMRUNTIME/vimrc_example.vim or runtime vimrc_example.vim 2. A file with extension .sh will be recognised as a shell script. Also an existing file whose first line is #!/bin/bash 3. To have Vim recognise a new file with no .sh extension as a shell script, either: 3a. Enter #!/bin/bash then reload the file with :w followed with :e or 3b. :setlocal ft=sh Best regards, Tony.
Re: Mapping german umlauts
From: A.J.Mechelynck [EMAIL PROTECTED] Subject: Re: Mapping german umlauts Date: Sun, 08 Oct 2006 16:41:22 +0200 Meino Christian Cramer wrote: Hi, I want to remap the german umlauts to {,[,] and } in normal mode only. When I type the umlauts on the commandline of my zsh there is no problem. When I type them in insert mode in vim: no problems. Therefore I /think/ (read: dont no for sure) that there should be no problem. In my $HOME/.vimrc I wrote: nnoremap o [ nnoremap a ] nnoremap O { nnoremap A } (I replaced the umlauts with their corresponding vowels here in this mail only -- just to make them displayable in any case...) But this does not work. With the :map command I can see the maps but the umlauts looks like 8bit-something. Two of them are displayed as two characters. Then I tried: nnoremap o [ nnoremap a ] nnoremap O { nnoremap A } which results in nothing: Now the corrupted maps via the :map command has vanished completly. Now I got an Error message displayed in front of my inner eye: WARNING! Idea stack underflow! What can I try else ? Thank you very much for any help in advance ! Keep hacking! mcc You should not change 'encoding' after setting your maps; and if your vimrc's 'fileencoding' is not your 'encoding' then it ought to have a :scriptencoding statement. Or else, you can encode it in 7-bit ASCII using Char-nn notation, e.g. exe noremap Char-196 } | LATIN CAPITAL A WITH DIAERESIS exe noremap Char-214 { | LATIN CAPITAL O WITH DIAERESIS exe noremap Char-228 ] | LATIN SMALL A WITH DIAERESIS exe noremap Char-246 [ | LATIN SMALL O WITH DIAERESIS The above should work regardless of whether your 'encoding' is Latin1, UTF-8, or (I think) cp1252; but if you use an 'encoding' different from your locale charset, you should still set 'encoding' first and define the mappings afterwards. (I use :exe wrapping here to allow a comment on the same line.) Similarly: Ä 196 0xC4LATIN CAPITAL A WITH DIAERESIS Ö 214 0xD6LATIN CAPITAL O WITH DIAERESIS Ü 220 0xDCLATIN CAPITAL U WITH DIAERESIS ß 223 0xDFLATIN SMALL LETTER SHARP S ä 228 0xE4LATIN SMALL A WITH DIAERESIS ö 246 0xF6LATIN SMALL O WITH DIAERESIS ü 252 0xFCLATIN SMALL U WITH DIAERESIS see :help Char :help :scriptencoding http://www.unicode.org/charts/PDF/U0080.pdf etc. Best regards, Tony. Hi Tony, :) What should I say? Thank you so much for your kind help, Tony! becomes a little boring to you in the meanwhile I think, doesn't it? :O) Probably it is a good idea starting to collect the Tony Files or an AI-help-feature for vim with command sequences like: :Tony I-have-an-edit-problem or :Tony umlaut-not-working or :Tony your problem here For me as a still-vim-newbie it is often difficult to analyse the root of the problems I have with vim. But hopefully this will change one day. Boring or not: Thanks a lot for your kind help, Tony!!! :O)\+ Keep hacking! mcc PS: There is still a question open to me, Tony... On a german keyboard you have to press Ctrl-AltGr-9 to jump to a tag under the cursor, which is originally Ctrl-]. This again is bad finger-Yoga (at least for my fingers...;) This is one reason why I wanted used the umlauts in normalmode to act as [,],{ and } (no one needs gemran umaluts in normal mode, so I will loose nothing...) Unfortunately Ctrl-umlaut-a (umlaut-a is mapped to ] now...) does not work as tag-inator. Is this one of these certain-special-keys-cannot-be-used-in-mappings problem, is this due to the nnoremap (instead of nmap...), which forbids later re-remapping, do I have to remap this sepeartely or am I simply to stupid ? ;) Keep hacking II ! mcc
Re: Mapping german umlauts
Meino Christian Cramer wrote: [...] PS: There is still a question open to me, Tony... On a german keyboard you have to press Ctrl-AltGr-9 to jump to a tag under the cursor, which is originally Ctrl-]. This again is bad finger-Yoga (at least for my fingers...;) This is one reason why I wanted used the umlauts in normalmode to act as [,],{ and } (no one needs gemran umaluts in normal mode, so I will loose nothing...) Unfortunately Ctrl-umlaut-a (umlaut-a is mapped to ] now...) does not work as tag-inator. Is this one of these certain-special-keys-cannot-be-used-in-mappings problem, is this due to the nnoremap (instead of nmap...), which forbids later re-remapping, do I have to remap this sepeartely or am I simply to stupid ? ;) Keep hacking II ! mcc Mapping something to ] doesn't map anything to Ctrl-], you have to do it separately. On my Belgian keyboard on SUSE Linux, CTRL doesn't work with any nonalphabetic printable key (in particular, it doesn't work with ]). There are two solutions: a) Use the mouse (double-clicking a help hyperlink activates it) b) Use a mapping. I use :map F9 C-] but of course you can use any {lhs} that suits you if you don't like F9. Since this key has no counterpart you might for instance map ß to it, since no one needs the eszett in Normal mode either. Best regards, Tony.
Re: Win32 build of updated gvim
Yongwei Wu wrote: [...] (maybe someone should write a program to automatically update the runtime files?). [...] How to update the runtime files is OS-dependent, but it is usually not much more than a one-liner. On my SuSE Linux system (with bash), I use cd ~/.build/vim/vim70 rsync -avzcP --delete --exclude=/dos/ ftp.nluug.nl::Vim/runtime/ ./runtime/ cd src make installruntime ../inst_rt.log 21 (the important line is the second one; the third and fourth ones are not necessary if I compile immediately afterwards). Bill McCarthy (on Windows with 4NT.EXE) uses copy /us ftp://ftp.home.vim.org/pub/vim/runtime/dos/*; c:\vim\vim70\ Method I should work on any Unix-like system, including Cygwin if rsync is installed. I don't know whether Method II works with CMD.EXE. Best regards, Tony.
number of folds in foldtext
Is it possible for foldtext to show the number of the fold block. For example there are n paragraphs in a document and folding is by expression defined as a blank line. I want the number of the paragraph to show in the foldtext. Thanks -- Eric Smith
Re: Changing printing colours
[Adding Vim-list as Cc:] Lowell Tackett wrote: I have tried-unsuccessfully-any number of grand schemes to have my printer produce syntax-colored Python scripts as displayed on my Vim editor. How simple it proved to be...just simply ':hardcopy'. Wow! One problem, though. I can't seem to reduce the font such that the entire script will remain on the printed (standard letter size) page. All this effort is being hosted by my Linux (Mandrake 10.1) OS, printing onto an Epson Stylus C86. (Cups thinks it's a Stylus 'C84'. Closest I could get to an ID, but it works). I do not get any printer dialogs preceding the print command going to the printer. Any help on this one would be greatly appreciated. This morning's breakthru-printing in syntax colors-is truly going into my diary as a 'life-altering' moment... [...] On Unix-like systems, printing from Vim uses PostScript and there is no dialog; but there are, among others, the 'printoptions' and 'printfont' options. The font face mentioned in 'printfont' is ignored on PostScript systems, but the size is used. To use an 8pt font instead of the usual 10pt, try :set printfont=Courier:h8 If that gives an error, you may have to use the same format as for your particular Vim version's 'guifont', i.e., if has(printer) if has(gui_gtk2) set pfn=Courier\ 8 elseif has(gui_kde) set pfn=Courier/8/-1/5/50/0/0/0/1/0 elseif has(unix) set pfn=*-Courier-medium-r-normal-*-*-80-*-*-m-*-* else set pfn=Courier:h8 endif endif Once you find something that works for you, write it into your vimrc. Best regards, Tony.
[Vim] Ada language Mode.
Hello, I have created a new language mode for Ada [1] and would like anybody who interested in Ada and Vim to comment on. The new mode offers: * Support for Ada 2005 keywords [2]. * Improved syntax highlight (Including all standart Pragmas and Attributes). * User completion (Keyword, Pragmas, Attributes) * Omni completions (using ctags or gnat xref). * Tag search (using ctags or gnat xref). * Unified Online help (One ada.txt for all). * Compiler support for GNAT and Dec Ada (using an extensible OO-Design). * Three different folding mechanisms. * All function are autoload. * Optimised for Vim 7 The aim is to replace the Ada language mode, which is currently part of the standart runtime, with this new mode. Martin [1] http://www.vim.org/scripts/script.php?script_id=1609 [2] http://www.adaic.org/standards/ada05.html -- mailto://[EMAIL PROTECTED] Ada programming at: http://ada.krischik.com
Re: I cannot install gvim7.0
On 10/2/06, Tom Purl [EMAIL PROTECTED] wrote: Please reply to the list so that others can learn from our mistakes :) I'm sorry. I didn't notice. I thought I had posted my letter to the list. I think it works. But it's really surprising. I run apt-get build-dep vim-gnome, then run ./configure the same result:checking --enable-gui argument... no GUI support. You can also try the `apt-get build-dep` command with the following Debian packages: vim-gtk vim-gui-common I removed the original source codes, and get a new one from vim-7.0-extra.tar.gz, vim-7.0-lang.tar.gz, vim-7.0.tar.bz2. You should only require the last file in that list to compile gvim. I need to use Chinese. Then I can compile vim with GUI. By the way, I run ./configure without any arguments. This is probably a *big* part of the reason why you can't compile gvim. In order to compile GVIM, it was my understanding that you needed to use some sort of GUI flag when executing the ./configuration step. Try running the following command in the future when compiling vim: I didn't use any argument of configure, and could still compile gvim. ./configure --help | grep GUI This will show you all of the GUI-related flags that you need to consider when compiling gvim. HTH! Tom Purl On 10/2/06, Tom Purl [EMAIL PROTECTED] wrote: On Mon, Oct 02, 2006 at 12:42:52AM +0800, Zheng Da wrote: Hello. I try to install vim7.0 But I can't install vim with GUI. It seems that configure automatically looks for a GUI, but it always tells no in my system. checking --enable-gui argument... no GUI support And I'm sure there isn't gvim in my system. I read src/INSTALL. It tells me that I need glib and gtk+ at least version 1.1.16, but below 2.0. I use Debian, and in my system, there are libgtk1.2, libgtk1.2-common, libgtk1.2-dev, libglib1.2, libglib1.2-dev. So what else do I need? -- With regards Zheng Da I had this same problem, and I think that it was fixed by installing the xwindows dev libraries. The output of ./configure told me what was missing from an X11 dev perspective. You might also want to try the following to install all of the compilation dependencies: sudo apt-get build-dep vim-gnome HTH! Tom Purl -- With regards Zheng Da -- With regards Zheng Da
Re: [Vim] Ada language Mode.
On 10/8/06, Martin Krischik [EMAIL PROTECTED] wrote: Hello, I have created a new language mode for Ada [1] and would like anybody who interested in Ada and Vim to comment on. I'm not interested in the slightest, but I'll comment anyway. Here's how to get your additions into the main Vim release: Please get in contact with the current maintainer(s) of the file(s) you intend to replace. They'll either give maintainership to you, or they'll integrate your additions into their file(s). As it sounds like you've maid considerable additions to the language mode, I'll assume that they'll be glad to give you maintainership of the files. Anyway, when that's been decided, get the maintainer(s) to contact Bram to notify him of the changes in maintainership and send along the new files. nikolai
Re: combining two mapping into one
A.J.Mechelynck schrieb: Kamaraju Kusumanchi wrote: On Friday 06 October 2006 08:24, Andy Wokula wrote: Kamaraju Kusumanchi schrieb: I use two mappings for my Fortran (.f90) files map F5 Homev%zf map F6 HomezDv%zf The idea is to create folds for code blocks which are of the form subroutine some_name_here statements_here end subroutine some_name_here Here F5 folds the subroutine block irrespective of whether there are any folds within it. F6 folds the subroutine block after deleting the existing folds. However, if there are no folds and if I press F6, I get an error saying that E490: No fold found Is it possible to combine these two maps into a single map such that 1) If there are no existing folds, create a fold (i.e. perform F5) 2) If there are already some folds defined, then delete them and define a new fold (i.e. perform F6) Any ideas? thanks raju Some time ago I saw this: http://vim.sourceforge.net/tips/tip.php?tip_id=1330 Andy Thanks for the pointer. I tried nnoremap F5 @=((foldclosed(line('.')) 0) ? 'Homev%zfjj' : 'HomezDv%zfjj')CR but it did not work due to Home. Dont know how to escape it properly. Any ideas? For now I am using nnoremap F5 @=((foldclosed(line('.')) 0) ? '1\|v%zfjj' : '1\| zDv%zfjj')CR but would like to use Home instead of 1\| since that would make the map more readable. thanks raju To use the Home key in an expression (as here), use a double-quoted string and a backslash-escape: \Home See the last item under :help expr-quote. Best regards, Tony. Seems to be theory in this case, a mapping like :nn f7 @=\homecr results in an error: =\ E15: Invalid expression: \ Nevertheless :let home = \home :nn f7 @=homecr works. Same for both GVim 6.4 and GVim 7.0 (no latest patches) on Win32. Looks like a bug?! Andy ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Re: combining two mapping into one
Andy Wokula wrote: A.J.Mechelynck schrieb: Kamaraju Kusumanchi wrote: On Friday 06 October 2006 08:24, Andy Wokula wrote: Kamaraju Kusumanchi schrieb: I use two mappings for my Fortran (.f90) files map F5 Homev%zf map F6 HomezDv%zf The idea is to create folds for code blocks which are of the form subroutine some_name_here statements_here end subroutine some_name_here Here F5 folds the subroutine block irrespective of whether there are any folds within it. F6 folds the subroutine block after deleting the existing folds. However, if there are no folds and if I press F6, I get an error saying that E490: No fold found Is it possible to combine these two maps into a single map such that 1) If there are no existing folds, create a fold (i.e. perform F5) 2) If there are already some folds defined, then delete them and define a new fold (i.e. perform F6) Any ideas? thanks raju Some time ago I saw this: http://vim.sourceforge.net/tips/tip.php?tip_id=1330 Andy Thanks for the pointer. I tried nnoremap F5 @=((foldclosed(line('.')) 0) ? 'Homev%zfjj' : 'HomezDv%zfjj')CR but it did not work due to Home. Dont know how to escape it properly. Any ideas? For now I am using nnoremap F5 @=((foldclosed(line('.')) 0) ? '1\|v%zfjj' : '1\| zDv%zfjj')CR but would like to use Home instead of 1\| since that would make the map more readable. thanks raju To use the Home key in an expression (as here), use a double-quoted string and a backslash-escape: \Home See the last item under :help expr-quote. Best regards, Tony. Seems to be theory in this case, a mapping like :nn f7 @=\homecr results in an error: =\ E15: Invalid expression: \ Nevertheless :let home = \home :nn f7 @=homecr works. Same for both GVim 6.4 and GVim 7.0 (no latest patches) on Win32. Looks like a bug?! Andy The backslash is interpreted when storing the mapping, and then again when invoking it In this case, you don't need @= at all :mapF7 Home :nnoremap F5 @=((foldclosed(line('.')) 0) ? \ BslashltHomev%zfjj : \ BslashltHomezDv%zfjj)CR see :help :map-special-chars Best regards, Tony.
Re: Mapping german umlauts
From: A.J.Mechelynck [EMAIL PROTECTED] Subject: Re: Mapping german umlauts Date: Sun, 08 Oct 2006 17:28:51 +0200 Meino Christian Cramer wrote: [...] PS: There is still a question open to me, Tony... On a german keyboard you have to press Ctrl-AltGr-9 to jump to a tag under the cursor, which is originally Ctrl-]. This again is bad finger-Yoga (at least for my fingers...;) This is one reason why I wanted used the umlauts in normalmode to act as [,],{ and } (no one needs gemran umaluts in normal mode, so I will loose nothing...) Unfortunately Ctrl-umlaut-a (umlaut-a is mapped to ] now...) does not work as tag-inator. Is this one of these certain-special-keys-cannot-be-used-in-mappings problem, is this due to the nnoremap (instead of nmap...), which forbids later re-remapping, do I have to remap this sepeartely or am I simply to stupid ? ;) Keep hacking II ! mcc Mapping something to ] doesn't map anything to Ctrl-], you have to do it separately. On my Belgian keyboard on SUSE Linux, CTRL doesn't work with any nonalphabetic printable key (in particular, it doesn't work with ]). There are two solutions: a) Use the mouse (double-clicking a help hyperlink activates it) b) Use a mapping. I use :map F9 C-] but of course you can use any {lhs} that suits you if you don't like F9. Since this key has no counterpart you might for instance map ß to it, since no one needs the eszett in Normal mode either. Best regards, Tony. Hi Tony, things are becoming better ! Using the umlauts for {,[,] and } makes things a lot easier and far more convenient. But there are still things I dont understand...as always...sorry... I did the following: LATIN SMALL LETTER SHARP S noremap Char-252 C-] LATIN CAPITAL A WITH DIAERESIS noremap Char-196 } LATIN CAPITAL O WITH DIAERESIS noremap Char-214 { LATIN SMALL A WITH DIAERESIS noremap Char-228 ] LATIN SMALL O WITH DIAERESIS noremap Char-246 [ which works in normal mode. In insert mode the umlauts appears as umlauts as it should be. But: WHY? If I understood the according help correctly noremap is a short form of no remap. And it is not bound to any mode -- and _n_noremap (for example) is bound to normal mode. Therefore (according to my obviously wrong logic...;) the above mapping would apply also to insert mode. But it does not (and it should not, since the umlauts are needed in insert). More mysteriously: Using nnoremap -- as I think it would make the above mappings only to apply in normal mode -- for the above mappings breaks everything: no {,[,] or } at the umlaut-keys in normal mode. The other thing what I tried was to map every ( every = what I could find and thought it would be nice to have ) combination of something and the {,[,],} to combinations with the umluat keys in the appropiate mode. I wrote: noremap Char-228-Char-228 ]] noremap Char-246-Char-246 [[ noremap Char-246-Char-228 [] noremap Char-228-Char-246 ][ which works with the mysterious charme as described above as far as I could test it (normap - nnoremap) Then I did: vnoremap a-Char-246 a[ vnoremap a-Char-228 a] vnoremap i-Char-246 i[ vnoremap i-Char-228 i] vnoremap a-Char-214 a{ vnoremap a-Char-196 a} vnoremap i-Char-214 i{ vnoremap i-Char-196 i} for the motions in visual mode -- and it fails totally. Again I got stuck. Thanks a lot for any help in advance ! :O) Keep hacking! mcc
Re: copy a word without moving cursor
Osho GG wrote: Hi All, I know this mustbe pretty simple but I can't figure this out. I want to copy a word into a buffer without moving the cursor. Currently I do something like *ayw^O:nohCR to get this effect. But, this seems like such a round about way to do this. Is there a simpler way to achieve this? :let @a= expand(cword) Regards, Chip Campbell