Re: How to get the number of occurances of a search pattern ?

2007-03-29 Thread Wolfgang Schmidt
Hi, to count the number of matches, see :help count-items Hope this helps Wolfgang MM wrote: When I do a search using / ,?,* or # how do I determine the number of matches of search pattern in the current buffer ? Thanks

Re: Get date and filename as plain text

2007-03-15 Thread Wolfgang Schmidt
Hi, I don't know about the filename part, but you could insert a date with the following mapping: inoremap @date C-R=strftime(%d.%m.%Y)CR Cheers, Wolfgang Eric Leenman wrote: Hi, Is it possible to make an inoremap that inserts the date as text and the filename as text? For

Re: run make! from subdirs

2007-02-20 Thread Wolfgang Schmidt
Hi Ilia, to me it looks like you always want to compile using the Makefile in ProjectDir. I don't know if this helps much, but I would recommend to open the Makefile in one buffer, then hide it: :hid and do your source editing. When you want to compile your files, use :sb Maktab to

alt gr on german keyboard not working in gvim

2007-02-13 Thread Wolfgang Schmidt
Hi vimmers, I just compiled an actual vim/gvim (7.0) on linux (2.4.21-226-smp4G). In the console, everything is fine, I can use ALTGR-q to get an atsign on a german keyboard. When I'm in gvim and try the same, I just get a 'q' typed, seems like ALT GR is deactivated in gvim (same for

Re: How to diff in gvim

2007-02-13 Thread Wolfgang Schmidt
Eric Leenman wrote: Hi, I'm trying to diff two files in (portable) gvim I have two files opened in two vertical windows. (Kind of Winmerge screen setup) When I type :diff I get the error E97: Can not create diffs Why is that? When I type :verbose I dont get more info Hi, try :help

Re: How to override $HOME on Windows NT/XP?

2006-11-22 Thread Wolfgang Schmidt
Hi, to me it's no clear what you mean by prevent Vim from going to my Home directory. I'm using Vim on windows, too, but he never asked me for a HOME directory. Instead, the _vimrc file is kept in $VIMRUNTIME, which by default on XP is C:\Programme\Vim\vim70. Therefore, all you have to do

Re: search in files

2006-10-31 Thread Wolfgang Schmidt
bolow wrote: hi all, I have a question:how to search a keyword in all files in a current dir(include the sub dirs) by vim? thanks for your reply:) Hi, what you're looking for is grep/vimgrep, I think. grep uses an external grep command, vimgrep is a built-in functionality of vim.

Re: Paren highlighting and jump to

2006-10-12 Thread Wolfgang Schmidt
Meino Christian Cramer wrote: Hi, (I am vim 7.0.131 on the console only on a recent gentoo Linux system) I looked into :h paren but found nothing appropiate... Currently my vim highlights matching parens. This is nice as long the corrosponding paren are on different lines or at least not

autoread

2006-09-07 Thread Wolfgang Schmidt
Hi, I want to use vim to watch the output of another program (logfile, compilation output, ...). I want to have something like the functionality of the unix tail command, that is, if something new is written to the file, I want the buffer to get updated. I know I can reload the file

Re: autoread

2006-09-07 Thread Wolfgang Schmidt
Yakov Lerner wrote: On 9/7/06, Wolfgang Schmidt [EMAIL PROTECTED] wrote: Hi, I want to use vim to watch the output of another program (logfile, compilation output, ...). I want to have something like the functionality of the unix tail command, that is, if something new is written

E505, File is write-protected

2006-08-21 Thread Wolfgang Schmidt
Hi vimmers, when I try to write (:w) a certain buffer, I get E505 (~ file XXX is write-protected, override with w!). The protection seems to be set by Vim, not the OS (WinXP). So I looked for the readonly option value, but it's set to noreadonly. I also checked write, which is set to

Re: E505, File is write-protected

2006-08-21 Thread Wolfgang Schmidt
Wolfgang Schmidt wrote: when I try to write (:w) a certain buffer, I get E505 (~ file XXX is write-protected, override with w!). The protection seems to be set by Vim, not the OS (WinXP). So I looked for the readonly option value, but it's set to noreadonly. I also checked write, which is set

Re: E505, File is write-protected - Problem solved

2006-08-21 Thread Wolfgang Schmidt
I don't know. I'm sending this to the list so someone else may answer. (Please use Reply to all next time.) Best regards, Tony. I got rid of the problem finally now by - rebooting. I looks like another nice feature of this obscure NTFS file system. Thanx Tony and Jürgen for your

non-greedy pattern matching

2006-08-16 Thread Wolfgang Schmidt
Hi vimmers, I'm trying to do a regexp replacement. My original line is ignore MATCH1 ignore_again MATCH2 I want to match MATCH1 and MATCH2, so here's my trial: s/^ignore \(.*\{-}\) .*\{-} \(.*\)/matched:\1,\2/gc I tried to use \{-} to make the .* match non-greedy, but I get E62 and E476.

Re: Problem doing diffs using win 2000

2006-07-03 Thread Wolfgang Schmidt
Yegappan Lakshmanan wrote: Do you have the 'diffexpr' set in your .vimrc file? :verbose set diffexpr? - Yegappan Hi, yes, it's set to MyDiff(), which is defined in _vimrc as set diffexpr=MyDiff() function MyDiff() let opt = '-a --binary ' if diffopt =~ 'icase' | let opt = opt . '-i

Correction: Problem doing diffs using win 2000

2006-07-03 Thread Wolfgang Schmidt
Hi, after re-examination of the problem I found the diff functionaliy now working on Win2k, still don't know what caused the problem. Anyway, diff'ing does work under Win2k, sorry for the confusion and thanks to those who tried to help. Sorry, Wolfgang Wolfgang Schmidt wrote: Hi

Problem doing diffs using win 2000

2006-06-30 Thread Wolfgang Schmidt
Hi, I just installed gvim70 (from the self-extracting exe) on WIN 2K system. Everything seems to work, exept the diff functionality. If I do a diff, e.g. C:\Programme\Vimvim _vimrc -d _vimrc.bak I get 2 Dateien zum Editieren Das angegebene Programm kann nicht ausgeführt werden. E97: