Re: How to find a file.

2006-10-16 Thread Peter Hodge
--- Zheng Da <[EMAIL PROTECTED]> wrote:

> Hello.
> I want to open a file, and I know its name, but don't know the path.
> I want to use the command "find". For example I want to open the file
> space.cc, and use the command :find space.cc. I know the file may be
> in the current directory, or the subdirectories, but always get the
> error E345: Cannot find file "space.cc" in path. I use the default
> path, it should be .,/usr/include,,. (I use Linux).
> So what's the problem? And how to open the file I want?

Hello,

If you prefix '**/' to the filename, Vim should search through subdirectories
for the file:

  :edit **/space.cc
  :find **/space.cc

Also, if you use , Vim will show you a list of matching files:

  :find **/space.cc
src/space.cc
src/backup/space.cc

regards,
Peter




 
On Yahoo!7 
Music: Create your own personalised radio station. 
http://au.launch.yahoo.com/ 



Re: substitude, write and close with one command

2006-10-16 Thread Tomas Lovetinsky

Peter Hodge napsal(a):

--- Tomas Lovetinsky <[EMAIL PROTECTED]> wrote:


Hi,
I would like to ask you for help with my problem. I think it is simple but in
fact I'm not able to 
find the solution as quickly as I need.

I need to do sometink like
:s/a/b/g :wq
It means to substitute, write and close file.


Hello,

You can separate multiple commands using '|', therefore:

  :s/a/b/g | wq

regards,
Peter



Thanks to all for your advices - it works well!

Tomas


Re: How to find a file.

2006-10-16 Thread panshizhu
I guess this may not be all you want, for example, if you want to search
files in ~/src, now you got a file in ~/src/abc/def/.

Then your current directory is ~/src/abc/def/. and when you need to search
within ~/src again to find something in ~/src/ghi/jkl/., how to do that?

I recommend a probably better approach, just create a filelist inside the
~/src, you can use the following command to create the file list:

in ~/src:
find . > filelist

okay, now each time you want to search for file, just open the filelist,
and search for the filename, when you've got the desired file, use gf to
open the file. You can also map a shortcut-key to open the filelist.

for example: I use  to open the file list, press  and now the
filelist opens.
use /foobar.txt and press enter to search for the file, if the file has
multiple occorences, press n.
when you've got the file, press gf and the file will be opened.

--
Sincerely, Pan, Shi Zhu. ext: 2606


"Zheng Da" <[EMAIL PROTECTED]> 写于 2006-10-16 22:24:47:

> I have used your script, but it can't content me.
> I want to find the file under the current dir, its subdir or maybe its
> sub-subdir. So I hope while I'm inputting the filename, the popup menu
> should display the paths with the file, not the dir, containing the
> characters I input.
>
> --
> With regards
> Zheng Da
>
> On 10/15/06, Hari Krishna Dara <[EMAIL PROTECTED]> wrote:
> >
> > On Sun, 15 Oct 2006 at 3:41pm, Zheng Da wrote:
> >
> > > Hello.
> > > I want to open a file, and I know its name, but don't know the path.
> > > I want to use the command "find". For example I want to open the file
> > > space.cc, and use the command :find space.cc. I know the file may be
> > > in the current directory, or the subdirectories, but always get the
> > > error E345: Cannot find file "space.cc" in path. I use the default
> > > path, it should be .,/usr/include,,. (I use Linux).
> > > So what's the problem? And how to open the file I want?
> >
> > You got the answer for using :find command already, but I would like to
> > suggest you to try my LookupFile plugin that allows you to use the Vim7
> > popup completion to do this using custom tags files.
> >
> > http://www.vim.org//script.php?script_id=1581
> >
> > --
> > HTH,
> > Hari
> >
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >

Re: Undo between sessions

2006-10-16 Thread Benji Fisher
On Mon, Oct 16, 2006 at 02:31:40PM -0700, Max Dyckhoff wrote:
> I am almost certain that this has been asked before, and I am almost
> sure that the answer is "no, that would be silly", but I can't find
> anything in the archives, in :help or on Google in general. I am
> suffering the aftereffects of a bout of flu today, so perhaps I'm just
> being bad at searching.
> 
> Basically, is there any (easy) way of preserving the undo stack
> between sessions? I typically work with half a dozen tabs and 20-30
> files open at any one time and whenever I need to reboot my machine
> then I do a :mksession and reload it when I come back. It is
> ridiculously useful, but I would love if the undo was stored too.
> 
> Cheers, and sorry for asking this over-asked question again.
> 
> Max

 Have you tried saving the swap file?  While editing foo.txt, that
file would normally be .foo.txt.swp.  Normally, it is deleted when you
quit vim.  If you save and restore the swap file (and maybe also the
version of the file before you started editing it) then I think you will
be back where you started.

:help swap-file

Disclaimer:  I have not tried this myself, and you *really* want to test
this idea before using it on files that matter!

HTH --Benji Fisher


Re: replace using variable

2006-10-16 Thread Peter Hodge

--- Akbar <[EMAIL PROTECTED]> wrote:

> Hi, I have these words:
> 
> 1. I am good
> 2. You sucks!
> 3. Take that, moron
> 
> I want to change those sentences into:
> 1. I am good
> 2. You sucks!
> 3. Take that, moron
> 
> How do I do that using vim replace command?
> All I can think  is this:
> :%s/\d/\d/igc
> 
> But that does not work. Any idea? Yeah, I can change them using vim
> macro or using scripting language but it will be nice if I can change
> them using vim replace command.

Hello, you're looking for backreferences:

  :help /\1

You want this command:

  :%s/\(\d\+\)/\1/igc

regards,
Peter

P.S. If you are feeling frustrated (Vim can do that to you), try writing
something more soothing, e.g.:

  1. I am happy
  2. You are beautiful!
  3. Take that, as a token of my love





 
On Yahoo!7 
Music: Create your own personalised radio station. 
http://au.launch.yahoo.com/ 



replace using variable

2006-10-16 Thread Akbar

Hi, I have these words:

1. I am good
2. You sucks!
3. Take that, moron

I want to change those sentences into:
1. I am good
2. You sucks!
3. Take that, moron

How do I do that using vim replace command?
All I can think  is this:
:%s/\d/\d/igc

But that does not work. Any idea? Yeah, I can change them using vim
macro or using scripting language but it will be nice if I can change
them using vim replace command.

Thank you.


Slightly OT: HELP! IDE ahead !

2006-10-16 Thread Meino Christian Cramer
Hi,

 Is it possible to convince kdevelop from using vim?

 I searched the web but the only source of information I found was of
 kvim -- and its homepage isn't there anymore.

 Any ideas?

 Thank you very much in advanve for any help!
 
 Keep hacking!
 mcc




Re: gvim-7-0-118.exe virus found??

2006-10-16 Thread Edward Wong

Tony is right. I was downloading it from
http://sourceforge.net/project/showfiles.php?group_id=43866&package_id=39721

The virus is Trojan horse Downloader.Zlob.CV

Today I just try other different releases, and still find the same
virus in gvim-7-0-135 and gvim-7-0-110.

Thanks for the instruction on compiling my own Vim. Will give it a try
later when I have time.  :)

Ed

On 10/17/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:

Benji Fisher wrote:
> On Mon, Oct 16, 2006 at 03:08:58PM +0800, Edward Wong wrote:
>> Dear all,
>>
>> Just tried downloading gvim-7-0-118 from sourceforge and AVG detects
>> there is a trojan virus. Can it be a false alarm?
>>
>> Ed
>
>  Please be more specific.  Can you give a link to the archive you
> downloaded?  Or did you use CVS or SVN (and , if so, what command did
> you use)?
>
> HTH   --Benji Fisher
>

I suspect it's Steve Hall's build for W32, which is hosted on the sourceforge
servers nowadays (at
https://sourceforge.net/project/showfiles.php?group_id=43866&package_id=39721
). If my guess is right, I would expect a false alarm, but I can't guarantee
that even Steve and SourceForge are immune to virus infestation. If you want
to suffer from no other viruses than your own ones, you (Edward) can compile
your own Vim: it is not really hard. See my HowTo page (for Windows it's at
http://users.skynet.be/antoine.mechelynck/vim/compile.htm ) if you're 
interested.


Best regards,
Tony.



Re: gvim-7-0-118.exe virus found??

2006-10-16 Thread Steve Hall
On Tue, 2006-10-17 at 00:13 +0200, A.J.Mechelynck wrote:
> Benji Fisher wrote:
> > On Mon, Oct 16, 2006 at 03:08:58PM +0800, Edward Wong wrote:
> > > 
> > > Just tried downloading gvim-7-0-118 from sourceforge and AVG
> > > detects there is a trojan virus. Can it be a false alarm?
> > 
> > Please be more specific.  Can you give a link to the archive you
> > downloaded?  Or did you use CVS or SVN (and , if so, what command
> > did you use)?
> 
> I suspect it's Steve Hall's build for W32, which is hosted on the
> sourceforge servers nowadays (at
>
https://sourceforge.net/project/showfiles.php?group_id=43866&package_id=39721 
> ). If my guess is right, I would expect a false alarm, but I can't
> guarantee that even Steve and SourceForge are immune to virus
> infestation.

Some anti-virus software mistakenly interprets the Nullsoft installer
as a virus. Just for the record, to date there have been no other
reports regarding this binary (in 468 downloads), and it was created
on a heavily fortified machine that reports nothing either.


-- 
Steve Hall  [ digitect dancingpaper com ]




Re: visual block calculator

2006-10-16 Thread Luis A. Florit
* El 15/10/06 a las 17:46, A.J.Mechelynck chamullaba:

> Luis A. Florit wrote:
> [...]
> > I called it MyCalcPresition because users can
> > use the function without any knowledge of bc.
> > The name is self-explanatory.
> [...]
>
> In that case, please call it "MyCalcPrecision".
> Bad spelling is never good advertising.

Ooops (again)...

English is not my native language, and vim
spell check gives an error with either spelling.

I don't know in which language I speak/write anymore.
Or, as a Brazilian teacher told me once, in secret during
a seminar, about a Peruvian student that was speaking:

 "This guy has been in Brazil for many years now,
  and still he doesn't speak Portuguese!
  But... in compensation... he forgot his Spanish."

Sorry,

L.



Re: substitude, write and close with one command

2006-10-16 Thread Peter Hodge
--- Tomas Lovetinsky <[EMAIL PROTECTED]> wrote:

> Hi,
> I would like to ask you for help with my problem. I think it is simple but in
> fact I'm not able to 
> find the solution as quickly as I need.
> I need to do sometink like
> :s/a/b/g :wq
> It means to substitute, write and close file.

Hello,

You can separate multiple commands using '|', therefore:

  :s/a/b/g | wq

regards,
Peter



 
On Yahoo!7 
Caller tones: Replace your ring tone with your favourite sound clip! 
http://callertones.yahoo7.mnetcorporation.com/ctonesmailtag



Re: cursor moves back with ESC

2006-10-16 Thread Lev Lvovsky


On Oct 16, 2006, at 4:33 PM, Peter Hodge wrote:

You can also try:

  inoremap  l

which will work a little quicker in a terminal Vim.


works great, thanks!
-lev


Re: cursor moves back with ESC

2006-10-16 Thread Peter Hodge

--- Yakov Lerner <[EMAIL PROTECTED]> wrote:

> On 10/16/06, Lev Lvovsky <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I've never actually figured out why upon after typing in insert mode,
> > the cursor moves back one character to the left after pressing
> > escape.  What's the reason behind this, and is there any way to turn
> > it off?
> 
> IIRC there was a post some months a go on list with
> location of unofficial patch that changes this behaviour.
> (I dont have the location of the patch at hand).
> 
> You can try this:
> au InsertLeave * norm l
> , not that I find it convenient. YMMV.

You can also try:

  inoremap  l

which will work a little quicker in a terminal Vim.

cheers,
Peter




 
On Yahoo!7 
Fuel Price Watch: Find the cheapest petrol in your area 
http://au.maps.yahoo.com/fuelwatch/


Re: How to find a file.

2006-10-16 Thread A.J.Mechelynck

Zheng Da wrote:

I have used your script, but it can't content me.
I want to find the file under the current dir, its subdir or maybe its
sub-subdir. So I hope while I'm inputting the filename, the popup menu
should display the paths with the file, not the dir, containing the
characters I input.



Try (untested)

:set path=**

to search only in the current directory and below, or

:set path+=**

to add the whole tree starting at the current directory going down, to 
whatever 'path' is already set to.



This method uses no popup menu, it merely changes the set of directories 
searched by the ":find" command.



Best regards,
Tony.


Re: Compiling VIM with custom directories for libraries

2006-10-16 Thread Gary Johnson
On 2006-10-16, Anupam Srivastava <[EMAIL PROTECTED]> wrote:

> Allan Wind wrote:
> > On 2006-10-16T03:03:30+0200, Anupam Srivastava wrote:
> >> So, I have downloaded and compiled ncurses in my local directory. Now
> >> I want Vim to detect this new library. How to do it?
> > 
> > If you with library mean a .so, then including the path where it is
> > stored in LD_LIBRARY_PATH before starting vim should do.
> > 
> > 
> No I am asking about how to compile the Vim given my ncurses is
> installed in /some/path/in/my/home and not in /usr/ or /usr/local/
> 
> I suppose there is some variable which I can reset to this new path.
> What is that variable?

The variables are CPPFLAGS and LDFLAGS.  I have this situation on a
Sun machine.  I downloaded and installed ncurses under
/home/garyjohn/src/SunOS/ncurses-5.4.  Here is how I build vim:

export CPPFLAGS="-I/home/garyjohn/src/SunOS/ncurses-5.4/include/ncurses"
export LDFLAGS="-L/home/garyjohn/src/SunOS/ncurses-5.4/lib"
./configure --prefix=/home/garyjohn/src/SunOS/vim-7.0 --with-tlib=ncurses 
--enable-cscope
make
make install

HTH,
Gary

-- 
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Wireless Division
 | Spokane, Washington, USA


Re: cursor moves back with ESC

2006-10-16 Thread A.J.Mechelynck

Lev Lvovsky wrote:


On Oct 16, 2006, at 10:31 AM, Charles E Campbell Jr wrote:



Seems a reasonable choice, to me.  Any choice would be arbitrary.

Now, to turn it off: don't use insert.  Use append.


if you mean 'a' as opposed to 'i' for the modes, it still does the same 
thing in my version.


thanks,
-lev



When you hit 'a' in Normal mode, the cursor moves one character right while 
going into Insert mode, so that compensates for the leftwards move which 
happens on  in Insert mode.


In Normal mode, the cursor must lie on a character (assuming you're not using 
'virtualedit'). In Insert mode, the cursor can be either on a character, or 
just after the last character on a line (in gvim, the Insert-mode cursor is 
normally a thin vertical line along the left side of its character cell, but 
it must still be regarded as being "on" a character cell). So there are one 
more possible cursor positions on each line in Insert mode than in Normal 
mode. The choice which (IIUC) the authors of Vi (ancestor to Vim) originally 
made, was to have the cursor move back by one character when going from Insert 
to Normal, except when at the left margin. The alternative would have been to 
have the cursor stay put, except when at the end of the line. I suppose either 
choice had arguments in its favour, but we're stuck with the choice that was 
made. Once you're accustomed to it, it stops chafing. One argument in favour 
of the choice that was made, is that when typing in new text you're usually at 
the end of the line (pushing the end of the line with the text you're adding), 
so it would have been awkward to have that be the exception.



Best regards,
Tony.


Re: Vim and foreign languages

2006-10-16 Thread A.J.Mechelynck

Preben Randhol wrote:

Hi

I'm using Vim to write Greek text. I found a nice tip at:
http://betabug.ch/blogs/ch-athens/270
on how to get Vim to accept greek letters as commands. Just using maps
basicly so it is quite easy.

The problem is that I would like to be able to translate in insert mode
the following: 


imap  
imap  
imap  

but it doesn't work. I get only ο, κ and π.

Why?

Thanks in advance

Preben



I believe that this is an OS problem rather than a Vim problem. To see what 
(if any) Vim sees when you hit kappa, omikron or pi with the Ctrl key being 
depressed, hit the key combination in question prefixed by Ctrl-V in Insert 
mode (and if your Ctrl-V is mapped to the paste operation, use Ctrl-Q 
instead). If Ctrl-V Ctrl-kappa enters a plain kappa into your buffer, it means 
that your keyboard interface transmits the same thing to Vim for Ctrl-kappa 
and for kappa, and in that case Vim cannot tell them apart. If you are running 
gvim, Vim in an xterm interfacing through the X-windows server, or Vim in 
Windows, then Xmodmap or some "international keyboard" GUI utility might 
perhaps help you. In the pure-text console /dev/tty on Linux, you may need to 
hack the keyboard map which is loaded at some point during the init bootup 
process.


If your OS "locale" is normally set to some Latin-alphabet locale (such as 
"de_DE.ISO-8859-1" or "French_Belgium.1252"), you don't need to change that to 
be able to input Greek into Vim in Insert mode: see


:help mbyte-keymap
:help 'keymap'
:help digraph.txt
:help i_CTRL-V_digit

Of course, you will first need to make sure that your 'encoding' includes the 
Greek alphabet; but the great thing about this method is that your Latin 
keyboard remains active in Normal and Visual modes, so that you don't get any 
headaches using Vim in that mode. In effect, a keymap is a set of "language 
mappings", i.e., mappings which apply only in Insert/Replace mode, in 
Command-line mode, and for the "text" operand of a few Normal-mode commands 
like r f t etc., and which can be toggled on and off at will, by using Ctrl-^ 
in Insert mode or by toggling the 'iminsert' option by means of the ":set" or 
":setlocal" commands in Normal mode.



Best regards,
Tony.


Re: gvim-7-0-118.exe virus found??

2006-10-16 Thread A.J.Mechelynck

Benji Fisher wrote:

On Mon, Oct 16, 2006 at 03:08:58PM +0800, Edward Wong wrote:

Dear all,

Just tried downloading gvim-7-0-118 from sourceforge and AVG detects
there is a trojan virus. Can it be a false alarm?

Ed


 Please be more specific.  Can you give a link to the archive you
downloaded?  Or did you use CVS or SVN (and , if so, what command did
you use)?

HTH --Benji Fisher



I suspect it's Steve Hall's build for W32, which is hosted on the sourceforge 
servers nowadays (at 
https://sourceforge.net/project/showfiles.php?group_id=43866&package_id=39721 
). If my guess is right, I would expect a false alarm, but I can't guarantee 
that even Steve and SourceForge are immune to virus infestation. If you want 
to suffer from no other viruses than your own ones, you (Edward) can compile 
your own Vim: it is not really hard. See my HowTo page (for Windows it's at 
http://users.skynet.be/antoine.mechelynck/vim/compile.htm ) if you're interested.



Best regards,
Tony.


Re: Please Remove FTP File

2006-10-16 Thread Bill McCarthy
On Mon 16-Oct-06 2:40pm -0600, Bram Moolenaar wrote:

> Bill McCarthy wrote:

>> The runtime directory doc (and dos/doc) contain both
>> getscript.txt and the more recent pi_getscript.txt.
>> 
>> The 'helptags' command doesn't like this :-)
>> 
>> Please delete getscript.txt from both locations.

> Sorry about that.  I'll fix the problem.

All fixed.  Thanks!

-- 
Best regards,
Bill



Cannot compile vim 7.0

2006-10-16 Thread Anne Wall
Hello, I'm getting a parse error when I try to compile vim 7.0. 

I've tried installing the 7.0 release of vim on AIX 5.3. I get the following
error:
 
make install
gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF -DFUNCPROTO=15
-O  -I/usr/X11R6/include-oobjects/buffer.o buffer.c
In file included from gui.h:11,
 from structs.h:81,
 from vim.h:1540,
 from buffer.c:28:
/usr/include/Xm/Xm.h:42:34: X11/extensions/Print.h: No such file or
directory
In file included from gui.h:11,
 from structs.h:81,
 from vim.h:1540,
 from buffer.c:28:
/usr/include/Xm/Xm.h:750: error: parse error before "XPContext"
/usr/include/Xm/Xm.h:753: error: parse error before '}' token
make: 1254-004 The error code from the last command is 1.
Stop.

 
So, the install is getting killed when it goes to include
/usr/include/Xm/Xm.h. What is causing this? I don't feel comfortable
modifying Xm.h, when it might be in use elsewhere.
 
First I applied all the patches to the 7.0 source, but when I ran into this
problem, I tried going back to the source as it was before any patches, and
I still got the same result. So it must not be the patches, then.
 
 
Thanks for any light you can shed on this, 
 
Anne Wall
 


Re: How to find a file.

2006-10-16 Thread Hari Krishna Dara

On Mon, 16 Oct 2006 at 4:24pm, Zheng Da wrote:

> I have used your script, but it can't content me.
> I want to find the file under the current dir, its subdir or maybe its
> sub-subdir. So I hope while I'm inputting the filename, the popup menu
> should display the paths with the file, not the dir, containing the
> characters I input.

If I understand what you say above (and what you said in your original
post) correctly, :LookupFile command is designed to do the same. You
type characters that are present in the name of your file, and you will
see the paths for all the files that have those characters in the name
as matches.

-- 
HTH,
Hari

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Undo between sessions

2006-10-16 Thread Max Dyckhoff
I am almost certain that this has been asked before, and I am almost sure that 
the answer is "no, that would be silly", but I can't find anything in the 
archives, in :help or on Google in general. I am suffering the aftereffects of 
a bout of flu today, so perhaps I'm just being bad at searching.

Basically, is there any (easy) way of preserving the undo stack between 
sessions? I typically work with half a dozen tabs and 20-30 files open at any 
one time and whenever I need to reboot my machine then I do a :mksession and 
reload it when I come back. It is ridiculously useful, but I would love if the 
undo was stored too.

Cheers, and sorry for asking this over-asked question again.

Max


Re: Vim and foreign languages

2006-10-16 Thread Preben Randhol
On Mon, 16 Oct 2006 22:02:25 +0200
Preben Randhol <[EMAIL PROTECTED]> wrote:

> Hi
> 
> I'm using Vim to write Greek text. I found a nice tip at:
> http://betabug.ch/blogs/ch-athens/270
> on how to get Vim to accept greek letters as commands. Just using maps
> basicly so it is quite easy.

Forgot to say that the set langmap in the help of Vim doesn't work. I
use UTF-8 keymap (set by setxkbmap) and Gtk version of Vim 7.0

Preben


Vim and foreign languages

2006-10-16 Thread Preben Randhol
Hi

I'm using Vim to write Greek text. I found a nice tip at:
http://betabug.ch/blogs/ch-athens/270
on how to get Vim to accept greek letters as commands. Just using maps
basicly so it is quite easy.

The problem is that I would like to be able to translate in insert mode
the following: 

imap  
imap  
imap  

but it doesn't work. I get only ο, κ and π.

Why?

Thanks in advance

Preben


Re: --enable-pythoninterp gives "unrecognized option `-pthread'" on MacOS X

2006-10-16 Thread Christian Ebert
* Bram Moolenaar on Friday, September 22, 2006 at 14:24:09 +0200:
> The configure script has a specific check for not adding -pthread on Mac
> OS/X.  It looks like you used the --disable-darwin argument or somehow
> disabled Darwin in another way.  Please check src/auto/config.log.

I just found out that the warning when compiling w/o GUI must
have gone with one of the recent patches.

Thank you.

c
-- 
_B A U S T E L L E N_ lesen! --->> 


Re: Please Remove FTP File

2006-10-16 Thread Bram Moolenaar

Bill McCarthy wrote:

> The runtime directory doc (and dos/doc) contain both
> getscript.txt and the more recent pi_getscript.txt.
> 
> The 'helptags' command doesn't like this :-)
> 
> Please delete getscript.txt from both locations.

Sorry about that.  I'll fix the problem.

-- 
hundred-and-one symptoms of being an internet addict:
42. Your virtual girlfriend finds a new net sweetheart with a larger bandwidth.

 /// 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///


windows (was C++ IDE)

2006-10-16 Thread Brecht Machiels

Hello,

I'm (very) slowly installing plugins and mapping keys to their 
functions. Currently I have the project and the taglist plugins 
configured. Window behaviour is a little annoying though.


I want files to always open in the center window, not in the project 
window, the taglist window or the quickfix window. Is there some way I 
can lock a window to a particular content?


Regards,
Brecht


RE: VIM help for normal text files with extension .lib (on UNIX)

2006-10-16 Thread Kunapuli, Udaykumar
Thanks, it worked!
Actually I was mistaken about the runtime path. I was changing the filetype.vim 
in the wrong location (in the directory where I untarred and unzipped the 
files).

I did a ":echo $VIM" to find out the runtime path and it showed that the 
runtime path was in ~/share/vim/vim70.

I edited the filetype.vim in that directory and it worked.

Thanks again for your help.
 


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 16, 2006 3:48 AM
To: Kunapuli, Udaykumar
Cc: vim@vim.org
Subject: RE: VIM help for normal text files with extension .lib (on UNIX)

Hi,

You problem can be worked around with :set isk+=_

But your problem may be you are not changing the one Vim is sourceing, or if 
the settings are overrideed by future scripts.
you have a filetype.vim in system wide $VIM directory or your ~/.vim
directory or vimfiles/after directory?   see :h 'runtimepath'
or if there is directories like ~/.vim/ftdetect and scripts in there overrides 
the default setting? see :h new-filetype

Hope that helps.
--
Sincerely, Pan, Shi Zhu. ext: 2606


"Kunapuli, Udaykumar" <[EMAIL PROTECTED]> 写于 2006-10-16 18:30:55:

> Looks like it is hard-coded. No matter what I try, VIM does recognize 
> *.lib as a cobol file.
> I have deleted the occurrence of cobol and .lib in the filetype.vim 
> file. But of no use.
> In fact there is no occurrence of "cobol" in any of my runtime files.
>
> The irritating thing is the search pattern, regular expression change.
> You can try hitting "*" on a word with underscore character ("_") on a 
> file with .lib extension, you will see that it considers underscore 
> ("_") as a distinct (non-
> word) character.
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Sunday, October 15, 2006 11:50 PM
> To: Kunapuli, Udaykumar
> Cc: vim@vim.org
> Subject: Re: VIM help for normal text files with extension .lib (on 
> UNIX)
>
> "Kunapuli, Udaykumar" <[EMAIL PROTECTED]> 写于 2006-10-16 14:37:33:
> > Hi,
> >
> > I tried editing the filetype.vim in the runtime directory and 
> > commenting the portion with the .lib extension. But it didn't work.
> >
>
>
> Are you sure you had done it right? I removed the "*.lib" and it works.
>
> this is the filetype.vim around 440 (after the "*.lib" removed)
>
> " Cobol
> au BufNewFile,BufRead *.cbl,*.cob   setf cobol
>
>
> IMO, the "*.lib" is a common extension which should not be treated as 
> cobol file. So just remove the relationship here.


Re: cursor moves back with ESC

2006-10-16 Thread Lev Lvovsky


On Oct 16, 2006, at 10:31 AM, Charles E Campbell Jr wrote:



Seems a reasonable choice, to me.  Any choice would be arbitrary.

Now, to turn it off: don't use insert.  Use append.


if you mean 'a' as opposed to 'i' for the modes, it still does the  
same thing in my version.


thanks,
-lev


Re: cursor moves back with ESC

2006-10-16 Thread Yakov Lerner

On 10/16/06, Lev Lvovsky <[EMAIL PROTECTED]> wrote:

Hello,

I've never actually figured out why upon after typing in insert mode,
the cursor moves back one character to the left after pressing
escape.  What's the reason behind this, and is there any way to turn
it off?


IIRC there was a post some months a go on list with
location of unofficial patch that changes this behaviour.
(I dont have the location of the patch at hand).

You can try this:
   au InsertLeave * norm l
, not that I find it convenient. YMMV.

Yakov


How to get vimspell.vim working?

2006-10-16 Thread Anupam Srivastava
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi! I am working on Vim 6.0 and I cannot update. I am new to VIM. I have
 downloaded vimspell.vim from vim.org and copied it to ~/.vim/plugin

It is installed as I can read :help vimspell

But I don't get how to enable auto-spell check.

Sorry for asking this stupid question as I don't have much time in my
hand right now to read all of the manuals. (I kind of understood
 but I couldn't figure out anything else.

- --
Anupam Srivastava
Scientific Coworker
Universität Stuttgart

Get my public keys:
gpg --keyserver subkeys.pgp.net --recv-keys DF8B2AFE 99F8BB81
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFFM80m7GZ7yN+LKv4RAm6VAJ4iXS/sUSauIrb4ShF7TXafRjBvdwCfV7Kd
1dnXB6/ktbA3Pjd+nnIstL4=
=lLsr
-END PGP SIGNATURE-


Re: Using output of Vim commands in scripts

2006-10-16 Thread Mikolaj Machowski
Dnia poniedziałek, 16 października 2006 15:05, Marius Roets napisał:
> Hi everybody,
> Is it possible to use the output of Vim commands in a script? My
> specific problem currently is that I would like to use the output of
>
> :tabs in a script. I cannot find a Vim function that does the same as
>
> this command. Any ideas?

:help :redir

From third entry you have what you want (redirect to
register/variable/clipboard etc.).

m.



Re: cursor moves back with ESC

2006-10-16 Thread Charles E Campbell Jr

Lev Lvovsky wrote:



I've never actually figured out why upon after typing in insert mode,  
the cursor moves back one character to the left after pressing  
escape.  What's the reason behind this, and is there any way to turn  
it off?


To best understand this, one needs to use console vim.  There, the 
cursor cannot be between characters; it must lie on a character.  So, 
the insert puts a character before the character the cursor is on; when 
done, the cursor lies on the last inserted character.


Now, try gvim.  Gvim lets the cursor lie between characters, but when 
done, the character again lies on the last inserted character.


Seems a reasonable choice, to me.  Any choice would be arbitrary.

Now, to turn it off: don't use insert.  Use append.

Regards,
Chip Campbell



cursor moves back with ESC

2006-10-16 Thread Lev Lvovsky

Hello,

I've never actually figured out why upon after typing in insert mode,  
the cursor moves back one character to the left after pressing  
escape.  What's the reason behind this, and is there any way to turn  
it off?


thanks!
-lev


Re: gvim-7-0-118.exe virus found??

2006-10-16 Thread Paul Irofti
On Monday 16 October 2006 15:40, Benji Fisher wrote:
> On Mon, Oct 16, 2006 at 03:08:58PM +0800, Edward Wong wrote:
> > Dear all,
> >
> > Just tried downloading gvim-7-0-118 from sourceforge and AVG
> > detects there is a trojan virus. Can it be a false alarm?
> >
> > Ed
>
>  Please be more specific.  Can you give a link to the archive you
> downloaded?  Or did you use CVS or SVN (and , if so, what command did
> you use)?
>
> HTH   --Benji Fisher

The name of the viril would be good to know also...


Re: Compiling VIM with custom directories for libraries

2006-10-16 Thread Anupam Srivastava
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Allan Wind wrote:
> On 2006-10-16T03:03:30+0200, Anupam Srivastava wrote:
>> So, I have downloaded and compiled ncurses in my local directory. Now
>> I want Vim to detect this new library. How to do it?
> 
> If you with library mean a .so, then including the path where it is
> stored in LD_LIBRARY_PATH before starting vim should do.
> 
> 
No I am asking about how to compile the Vim given my ncurses is
installed in /some/path/in/my/home and not in /usr/ or /usr/local/

I suppose there is some variable which I can reset to this new path.
What is that variable?

- --
Anupam Srivastava
Scientific Coworker
Universität Stuttgart

Get my public keys:
gpg --keyserver subkeys.pgp.net --recv-keys DF8B2AFE 99F8BB81
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFFM6JX7GZ7yN+LKv4RAq0tAJ98v0oYd7/UsVFxxdNYcUFj9PvLTwCeNGFH
8Yj61Zd/SZYO1jA0/KDsmfs=
=zVrn
-END PGP SIGNATURE-


Re: How to find a file.

2006-10-16 Thread Zheng Da

I have used your script, but it can't content me.
I want to find the file under the current dir, its subdir or maybe its
sub-subdir. So I hope while I'm inputting the filename, the popup menu
should display the paths with the file, not the dir, containing the
characters I input.

--
With regards
Zheng Da

On 10/15/06, Hari Krishna Dara <[EMAIL PROTECTED]> wrote:


On Sun, 15 Oct 2006 at 3:41pm, Zheng Da wrote:

> Hello.
> I want to open a file, and I know its name, but don't know the path.
> I want to use the command "find". For example I want to open the file
> space.cc, and use the command :find space.cc. I know the file may be
> in the current directory, or the subdirectories, but always get the
> error E345: Cannot find file "space.cc" in path. I use the default
> path, it should be .,/usr/include,,. (I use Linux).
> So what's the problem? And how to open the file I want?

You got the answer for using :find command already, but I would like to
suggest you to try my LookupFile plugin that allows you to use the Vim7
popup completion to do this using custom tags files.

http://www.vim.org//script.php?script_id=1581

--
HTH,
Hari

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



auto mkview/loadview

2006-10-16 Thread Samuel Wright

Hi Guys, I used to have this in .vimrc

autocmd BufWinLeave * mkview
autocmd BufWinEnter * silent loadview

to automatically save and load folds. I have recently added it again,
but it does not seem to work in Vim 7 on Win XP.
Have I missed anything obvious?

Thanks

Sam


Using output of Vim commands in scripts

2006-10-16 Thread Marius Roets

Hi everybody,
Is it possible to use the output of Vim commands in a script? My
specific problem currently is that I would like to use the output of
:tabs in a script. I cannot find a Vim function that does the same as
this command. Any ideas?

Thanks
Marius


Re: gvim-7-0-118.exe virus found??

2006-10-16 Thread Benji Fisher
On Mon, Oct 16, 2006 at 03:08:58PM +0800, Edward Wong wrote:
> Dear all,
> 
> Just tried downloading gvim-7-0-118 from sourceforge and AVG detects
> there is a trojan virus. Can it be a false alarm?
> 
> Ed

 Please be more specific.  Can you give a link to the archive you
downloaded?  Or did you use CVS or SVN (and , if so, what command did
you use)?

HTH --Benji Fisher


Re: VIM help for normal text files with extension .lib (on UNIX)

2006-10-16 Thread Benji Fisher
On Sun, Oct 15, 2006 at 11:37:33PM -0700, Kunapuli, Udaykumar wrote:
> Hi,
>  
> I am using VIM 7.0 on UNIX. I have files with extension .lib (*.lib 
> files). VIM automatically thinks that it is a Cobol filetype. The file 
> has nothing to do with Cobol. I have tried setting the following things 
> in my .vimrc. 
>  
> au BufNewFile,BufRead *.lib set ft=text 
> au BufNewFile,BufRead *.lib filetype off
> au BufNewFile,BufRead *.lib filetype plugin indent off

 The first line should be enough.  The 'filetype' (abbreviated 'ft')
option is local to the buffer and should be set each time you edit a
*.lib buffer.  The :filetype command is global.  If you want to turn off
all filetype detection, add the line

filetype off

to your vimrc file.  I cannot think of any situation in which it makes
sense to put it in a BufNewFile,BufRead autocommand.

> I could take away the glaring syntax highlighting (red background on 
> all text!!!), but it was not of any help in terms of searching and 
> regular expression. 
> 
> In ordinary text files, underscore ("_") is considered as a legal part 
> of the word (or the regular expression \w). However in files with 
> extension .lib, VIM seems to consider underscore ("_") as a special 
> character. 
> 
> Is there anyway for me to make *.lib files to be treated as ordinary 
> text files by VIM for everything (syntax highlighting, indenting, 
> regular expression searching etc.)? 

 The problem is that autocommands are executed in the order in which
they are defined.  Apparently, the autocommand in your vimrc file,
setting ft=text, comes after the one that sets ft=cobol.  Thus things
happen in this order:

:set ft=cobol
:source $VIMRUNTIME/syntax/cobol.vim
:setlocal isk=@,48-57,-
:set ft=text

and nothing undoes the 'iskeyword' setting.

 The simple solution is to make sure that your autocommand comes
before any

filetype on

or

source $VIMRUNTIME/vimrc_example.vim

in your vimrc file.

 A more robust method (since it does not rely on the order of lines
in your vimrc file) is to use either method A or C from

:help new-filetype

> I tried editing the filetype.vim in the runtime directory and 
> commenting the portion with the .lib extension. But it didn't work.

 That is not recommended.  If you fix problems by editing things
under $VIMRUNTIME, then you will have to remember to fix them each time
you upgrade to a new version of vim.  In the long run, it is easier to
fix things in your own vim directory.

> Thanks,
> Uday

HTH --Benji Fisher


Re: substitude, write and close with one command

2006-10-16 Thread Gregory Margo
Most commands may be separated by a vertical bar (|), see :help :bar
This will do what you want:
:s/a/b/g | w | q

On Mon, Oct 16, 2006 at 01:34:31PM +0100, Tomas Lovetinsky wrote:
> Hi,
> I would like to ask you for help with my problem. I think it is simple but 
> in fact I'm not able to find the solution as quickly as I need.
> I need to do sometink like
> :s/a/b/g :wq
> It means to substitute, write and close file.
> 
> Is there any solution?
> 
> Thank you all in advance
> 
> Tomas Lovetinsky

-- 
+
Gregory H. Margo
gmargo at yahoo/com, gmail/com, pacbell/net; greg at margofamily/org


Re: substitude, write and close with one command

2006-10-16 Thread A.J.Mechelynck

Tomas Lovetinsky wrote:

Hi,
I would like to ask you for help with my problem. I think it is simple 
but in fact I'm not able to find the solution as quickly as I need.

I need to do sometink like
:s/a/b/g :wq
It means to substitute, write and close file.

Is there any solution?

Thank you all in advance

Tomas Lovetinsky



:s/a/b/g |wq

see ":help :bar" and keep reading until you've scrolled down a hundred lines 
or so.


Note: Without a |range| between : and s the substitute will act only on the 
current line.



Best regards,
Tony.


Re: VIM help for normal text files with extension .lib (on UNIX)

2006-10-16 Thread A.J.Mechelynck

Kunapuli, Udaykumar wrote:

Looks like it is hard-coded. No matter what I try, VIM does recognize *.lib as 
a cobol file.
I have deleted the occurrence of cobol and .lib in the filetype.vim file. But 
of no use.
In fact there is no occurrence of "cobol" in any of my runtime files.

The irritating thing is the search pattern, regular expression change.
You can try hitting "*" on a word with underscore character ("_") on a file with .lib extension, 
you will see that it considers underscore ("_") as a distinct (non-word) character.


Did you restart Vim after that? If you didn't, the autocommands that were set 
up at startup to detect *.lib as filetype "cobol" are probably still in place.


Note: Any changes you make anywhere in the $VIMRUNTIME directory tree can be 
undone silently by any upgrade. You would be better off detecting your "own" 
filetypes in ~/.vim/filetype.vim (for Unix) or ~/vimfiles/filetype.vim (for 
Windows).



Best regards,
Tony.


substitude, write and close with one command

2006-10-16 Thread Tomas Lovetinsky

Hi,
I would like to ask you for help with my problem. I think it is simple but in fact I'm not able to 
find the solution as quickly as I need.

I need to do sometink like
:s/a/b/g :wq
It means to substitute, write and close file.

Is there any solution?

Thank you all in advance

Tomas Lovetinsky


RE: VIM help for normal text files with extension .lib (on UNIX)

2006-10-16 Thread panshizhu
Hi,

You problem can be worked around with :set isk+=_

But your problem may be you are not changing the one Vim is sourceing, or
if the settings are overrideed by future scripts.
you have a filetype.vim in system wide $VIM directory or your ~/.vim
directory or vimfiles/after directory?   see :h 'runtimepath'
or if there is directories like ~/.vim/ftdetect and scripts in there
overrides the default setting? see :h new-filetype

Hope that helps.
--
Sincerely, Pan, Shi Zhu. ext: 2606


"Kunapuli, Udaykumar" <[EMAIL PROTECTED]> 写于 2006-10-16 18:30:55:

> Looks like it is hard-coded. No matter what I try, VIM does
> recognize *.lib as a cobol file.
> I have deleted the occurrence of cobol and .lib in the filetype.vim
> file. But of no use.
> In fact there is no occurrence of "cobol" in any of my runtime files.
>
> The irritating thing is the search pattern, regular expression change.
> You can try hitting "*" on a word with underscore character ("_") on
> a file with .lib extension,
> you will see that it considers underscore ("_") as a distinct (non-
> word) character.
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Sunday, October 15, 2006 11:50 PM
> To: Kunapuli, Udaykumar
> Cc: vim@vim.org
> Subject: Re: VIM help for normal text files with extension .lib (on UNIX)
>
> "Kunapuli, Udaykumar" <[EMAIL PROTECTED]> 写于 2006-10-16 14:37:33:
> > Hi,
> >
> > I tried editing the filetype.vim in the runtime directory and
> > commenting the portion with the .lib extension. But it didn't work.
> >
>
>
> Are you sure you had done it right? I removed the "*.lib" and it works.
>
> this is the filetype.vim around 440 (after the "*.lib" removed)
>
> " Cobol
> au BufNewFile,BufRead *.cbl,*.cob   setf cobol
>
>
> IMO, the "*.lib" is a common extension which should not be treated
> as cobol file. So just remove the relationship here.

RE: VIM help for normal text files with extension .lib (on UNIX)

2006-10-16 Thread Kunapuli, Udaykumar
Looks like it is hard-coded. No matter what I try, VIM does recognize *.lib as 
a cobol file.
I have deleted the occurrence of cobol and .lib in the filetype.vim file. But 
of no use.
In fact there is no occurrence of "cobol" in any of my runtime files.

The irritating thing is the search pattern, regular expression change.
You can try hitting "*" on a word with underscore character ("_") on a file 
with .lib extension, 
you will see that it considers underscore ("_") as a distinct (non-word) 
character.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 15, 2006 11:50 PM
To: Kunapuli, Udaykumar
Cc: vim@vim.org
Subject: Re: VIM help for normal text files with extension .lib (on UNIX)

"Kunapuli, Udaykumar" <[EMAIL PROTECTED]> 写于 2006-10-16 14:37:33:
> Hi,
>
> I tried editing the filetype.vim in the runtime directory and 
> commenting the portion with the .lib extension. But it didn't work.
>


Are you sure you had done it right? I removed the "*.lib" and it works.

this is the filetype.vim around 440 (after the "*.lib" removed)

" Cobol
au BufNewFile,BufRead *.cbl,*.cob   setf cobol


IMO, the "*.lib" is a common extension which should not be treated as cobol 
file. So just remove the relationship here.


Re: VIM as C++ IDE

2006-10-16 Thread panshizhu
Robert Cussons <[EMAIL PROTECTED]> 写于 2006-10-16 16:43:53:

> [EMAIL PROTECTED] wrote:
> > As far as I know Vim cannot recognize the  key (Please correct me
if
> > I'm wrong). In fact, it isn't that difficult to type all those, so I'd
> > refer to keep the :cope window on all the time, and I have the habit to
> > input :w everytime I changed a new line. So all I need to do is to type
> > :make, which isn't complex and I don't need a short-cut for that. Note
that
> > you need to set your 'makeprg' right.
>
> I agree with that, but how do I  keep the :cope window on all the time
> set cope
> in .vimrc or something?
just add a line
:cope 1
in .vimrc and it will be opened, if you want to keep it always open, uh,
just do never close it. ;-)

That's similiar to what I do, I personally using a modified project plugin,
and I wrote it in the startup script of the project, when the project
opens, the :cope window will open.


> sorry, I don't really understande what you mean by this...although I've
> just noticed that I have under KDE modifiers:
>
> Modifier   X11-Mod
> Shift  shift
> Ctrl  control
> Alt  mod1
> Win  mod4
I mean the tabpage left to the page you refered to. If you cannot get it,
well, just ignore it, doesn't matter too much ;-)

--
Sincerely, Pan, Shi Zhu. ext: 2606


Re: copy from pdfs

2006-10-16 Thread A.J.Mechelynck

Vim Visual wrote:

ah!

I love you!

you solved the problem!

My encoding was set to UTF-8, though


then maybe your 'fileencodings' was wrong? (Setting 'encoding' to UTF-8 also 
sets 'fileencodings' to "ucs-bom,utf-8,default,latin1" which helps recognise 
the encodings of Unicode files.)




2006/10/16, A.J.Mechelynck <[EMAIL PROTECTED]>:

Vim Visual wrote:
> Hi,
>
> is there a way to remove all those strange symbols (and substitute
> them with proper caracters) you get when you select a text section
> from a pdf file and try to paste it into a vim file?
>
> The "fi" and " ` " etc are unknown to vim and it refuses to paste 
them...

>
> For instance:
>
> - efficient
>
> - "K"
>
> Try to copy and paste them into a vim file...
>
> Pau
>
>

What do you have 'encoding' set to? If it is set to Latin1, try adding 
the

following to your vimrc:

if (&enc !~? '^u') && (&tenc == '')
let &tenc = &enc
endif
set enc=utf8
setglobal bomb


Best regards,
Tony.







Best regards,
Tony.


Re: copy from pdfs

2006-10-16 Thread Vim Visual

ah!

I love you!

you solved the problem!

My encoding was set to UTF-8, though

2006/10/16, A.J.Mechelynck <[EMAIL PROTECTED]>:

Vim Visual wrote:
> Hi,
>
> is there a way to remove all those strange symbols (and substitute
> them with proper caracters) you get when you select a text section
> from a pdf file and try to paste it into a vim file?
>
> The "fi" and " ` " etc are unknown to vim and it refuses to paste them...
>
> For instance:
>
> - efficient
>
> - "K"
>
> Try to copy and paste them into a vim file...
>
> Pau
>
>

What do you have 'encoding' set to? If it is set to Latin1, try adding the
following to your vimrc:

if (&enc !~? '^u') && (&tenc == '')
let &tenc = &enc
endif
set enc=utf8
setglobal bomb


Best regards,
Tony.



Re: copy from pdfs

2006-10-16 Thread A.J.Mechelynck

Vim Visual wrote:

Hi,

is there a way to remove all those strange symbols (and substitute
them with proper caracters) you get when you select a text section
from a pdf file and try to paste it into a vim file?

The "fi" and " ` " etc are unknown to vim and it refuses to paste them...

For instance:

- efficient

- "K"

Try to copy and paste them into a vim file...

Pau




What do you have 'encoding' set to? If it is set to Latin1, try adding the 
following to your vimrc:


if (&enc !~? '^u') && (&tenc == '')
let &tenc = &enc
endif
set enc=utf8
setglobal bomb


Best regards,
Tony.


Re: problem compiling vim70.

2006-10-16 Thread Vigil
A friend had this problem on Ubuntu. I think it turned out that his 
LD_LIBRARY_PATH or equivalent wasn't pointing to the ncurses library for some 
reason.


On Mon, 16 Oct 2006, Ajay Gupta wrote:


no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
You need to install a terminal library; for example ncurses.
Or specify the name of the library with --with-tlib.


--

.


copy from pdfs

2006-10-16 Thread Vim Visual

Hi,

is there a way to remove all those strange symbols (and substitute
them with proper caracters) you get when you select a text section
from a pdf file and try to paste it into a vim file?

The "fi" and " ` " etc are unknown to vim and it refuses to paste them...

For instance:

- efficient

- "K"

Try to copy and paste them into a vim file...

Pau


Re: VIM as C++ IDE

2006-10-16 Thread Robert Cussons
[EMAIL PROTECTED] wrote:
> As far as I know Vim cannot recognize the  key (Please correct me if
> I'm wrong). In fact, it isn't that difficult to type all those, so I'd
> refer to keep the :cope window on all the time, and I have the habit to
> input :w everytime I changed a new line. So all I need to do is to type
> :make, which isn't complex and I don't need a short-cut for that. Note that
> you need to set your 'makeprg' right.

I agree with that, but how do I  keep the :cope window on all the time
set cope
in .vimrc or something?

> 
> However, if all you need is to make use of the  key, KDE can be set to
> something like the "4-modifiers KDE default", and that's the settings I'm
> currently using that and I use  shortcut key on most KDE-related
> features.

sorry, I don't really understande what you mean by this...although I've
just noticed that I have under KDE modifiers:

ModifierX11-Mod
Shift   shift
Ctrlcontrol
Alt mod1
Win mod4

I think I need to read up on what these KDE modifiers mean, anyway
thanks for the help with using make.

Rob.


Re: [SPAM?]Re: VIM as C++ IDE

2006-10-16 Thread Raimon Grau

On 10/16/06, Robert Cussons <[EMAIL PROTECTED]> wrote:

This is brilliant, I've never used make from inside Vim before, please
surpress your sniggersAs I am working on Linux with a microsoft
ergonomic keyboard, I have an unused windows button or two, how would I
map the right hand one to the same mapping as below, i.e. instead of
F12? As KDE's control centre in the custom shortcuts returns Win for the
windows button, I tried:
map  :w:make:cope
but it doesn't seem to do anything, how does Vim interpret the windows key?


You can map WinKey to Fx (where 12
Many thanks,
Rob.

[EMAIL PROTECTED] wrote:
> "Peng Yu" <[EMAIL PROTECTED]> 写于 2006-10-14 05:59:29:
>
>>map  :w:make
>>Can some body provide some script to satisfy my more general
>>requirement? I want press , then make is called. The error window
>>will not be closed unless I do so. When I brower the error, the file
>>where the error is from will be open automatically and the cursor is
>>put in the error line?
>>
>>Thanks,
>>Peng
>
>
> for that simple, don't need any plugin:
>
> map  :w:make:cope
>
> You see, just add the :cope will do the trick.
>
> Note that the cursor will be in :cope window then, you may need to press an
> enter key to go into the first error. But what to do when there's no error?
> then  does nothing.
>
> --
> Sincerely, Pan, Shi Zhu. ext: 2606
>
>



Re: VIM as C++ IDE

2006-10-16 Thread panshizhu

As far as I know Vim cannot recognize the  key (Please correct me if
I'm wrong). In fact, it isn't that difficult to type all those, so I'd
refer to keep the :cope window on all the time, and I have the habit to
input :w everytime I changed a new line. So all I need to do is to type
:make, which isn't complex and I don't need a short-cut for that. Note that
you need to set your 'makeprg' right.

However, if all you need is to make use of the  key, KDE can be set to
something like the "4-modifiers KDE default", and that's the settings I'm
currently using that and I use  shortcut key on most KDE-related
features.



--
Sincerely, Pan, Shi Zhu. ext: 2606


Robert Cussons <[EMAIL PROTECTED]> 写于 2006-10-16 15:45:47:

> This is brilliant, I've never used make from inside Vim before, please
> surpress your sniggersAs I am working on Linux with a microsoft
> ergonomic keyboard, I have an unused windows button or two, how would I
> map the right hand one to the same mapping as below, i.e. instead of
> F12? As KDE's control centre in the custom shortcuts returns Win for the
> windows button, I tried:
> map  :w:make:cope
> but it doesn't seem to do anything, how does Vim interpret the windows
key?
>
> Many thanks,
> Rob.

Re: [SPAM?]Re: VIM as C++ IDE

2006-10-16 Thread Robert Cussons
This is brilliant, I've never used make from inside Vim before, please
surpress your sniggersAs I am working on Linux with a microsoft
ergonomic keyboard, I have an unused windows button or two, how would I
map the right hand one to the same mapping as below, i.e. instead of
F12? As KDE's control centre in the custom shortcuts returns Win for the
windows button, I tried:
map  :w:make:cope
but it doesn't seem to do anything, how does Vim interpret the windows key?

Many thanks,
Rob.

[EMAIL PROTECTED] wrote:
> "Peng Yu" <[EMAIL PROTECTED]> 写于 2006-10-14 05:59:29:
> 
>>map  :w:make
>>Can some body provide some script to satisfy my more general
>>requirement? I want press , then make is called. The error window
>>will not be closed unless I do so. When I brower the error, the file
>>where the error is from will be open automatically and the cursor is
>>put in the error line?
>>
>>Thanks,
>>Peng
> 
> 
> for that simple, don't need any plugin:
> 
> map  :w:make:cope
> 
> You see, just add the :cope will do the trick.
> 
> Note that the cursor will be in :cope window then, you may need to press an
> enter key to go into the first error. But what to do when there's no error?
> then  does nothing.
> 
> --
> Sincerely, Pan, Shi Zhu. ext: 2606
> 
> 


Re: Version confusion

2006-10-16 Thread panshizhu
Meino Christian Cramer <[EMAIL PROTECTED]> 写于 2006-10-14 14:10:19:
>  I myself use to update my vim source with the newest patches and
>  download the runtime files on a regular base. Furthermore I download
>  the newest CVS stuff from vim-ruby, the ruby support files for vim.
>  How can I simplify the update of my whole vim environment without the
>  need to look into each single file whether it is newer/older as
>  another file of the same name at another place and what version of
>  this file will work with what version of another file of the same
>  suit at shat place?
>
>  Keep hacking!
>  mcc

Tony's reply is precise and detailed, but that's not simple enough.

I simplyfy it to the following:

If you choose to put something in ~/.vim, then you'll always have to update
it yourself.

If there's something both in $VIMRUNTIME and ~/.vim, Vim will use the
version in ~/.vim.

So, if you want the vim distribution to update the script, just do not
custumize it in ~/.vim and keep the "official" version.

If you choose to do it yourself, just be aware what scripts you had in
~/.vim and update it when you feel it necessary.

gvim-7-0-118.exe virus found??

2006-10-16 Thread Edward Wong

Dear all,

Just tried downloading gvim-7-0-118 from sourceforge and AVG detects
there is a trojan virus. Can it be a false alarm?

Ed