Re: savevers plugin

2007-05-02 Thread Yakov Lerner

On 5/3/07, Waters, Bill <[EMAIL PROTECTED]> wrote:

I am looking at using the savevers plugin.  I don't think it does
exactly what I am looking for.


Why don't you set savevers_max to 9 ?
Do you plan to have more than 9 versions ? (if I underdtand
your request right).

Otherwise, your request sounds strange. It sounds like this:
"I want to set savevers_max to 3, and I want savevers to ignore this".

It's like "I want vim to go to line 10 when I tell him to go to line 5".

Why would you want to set savevers_max to wrong value instead of
desired value (999) in the first place ?

Yakov


I want the old version of my file to be
saved regardless of what savevers_max is set to.  If I set savevers_max
to three and I save for the fourth time, I want the oldest, saved
version of the file to be deleted and I want my latest last-version to
be saved.

My files would go from this...

-rw-r- 1 eralston admin  226 Sep 20 11:43 test.txt
-rw-r- 1 eralston admin  102 Sep 20 11:12 test.txt.0001.clean
-rw-r- 1 eralston admin  106 Sep 20 11:14 test.txt.0002.clean
-rw-r- 1 eralston admin  132 Sep 20 11:22 test.txt.0003.clean

To this...

-rw-r- 1 eralston admin  226 Sep 20 11:43 test.txt
-rw-r- 1 eralston admin  106 Sep 20 11:14 test.txt.0002.clean
-rw-r- 1 eralston admin  132 Sep 20 11:22 test.txt.0003.clean
-rw-r- 1 eralston admin  148 Sep 20 11:34 test.txt.0004.clean

Anyway to do this?  Anybody already hacked savevers to do this?  Or have
some clever mappings to handle this?

A related question... is there a way to use a single backup directory
for all files?  I think it would need to have a way to make all file
names unique.  So that saving /dir1/a.txt wouldn't clobber over
/dir2/a.txt.

Thanks,
Bill



Re: undo line numbers wrong

2007-05-02 Thread Yakov Lerner

On 5/2/07, Robert Cussons <[EMAIL PROTECTED]> wrote:

Yakov Lerner wrote:
> On 5/2/07, Robert Cussons <[EMAIL PROTECTED]> wrote:
>
>> Yakov Lerner wrote:
>> > On 4/27/07, Robert Cussons <[EMAIL PROTECTED]> wrote:
>> >
>> >> Thanks Tony, doubt he'll be that interested as he's an emacs user! But
>> >> anyway some time next week I will try and convince him.
>> >
>> >
>> > You can install latest vim under your $HOME -- this does not
>> > require any root privileges -- with a single command, a script
>> > 'vim7-install.sh'.
>> >
>> > Script vim7-install.sh is at
>> >
>> >http://www.vim.org/scripts/script.php?script_id=1473
>> >"vim7-install.sh : {download + build + install} latest vim7 [from
>> > svn sources] in 1 command"
>> >
>> > Yakov
>> >
>>
>> Thanks very much Yakov, just done that and it seems to have worked fine,
>> there's just a couple of curious things:
>>
>> 1) below is the first part of the output, what are the errors right at
>> the bottom of this part?
>>
>> [EMAIL PROTECTED]:~$ sh ./vim7-install.sh
>> This will download, build and install vim7 (using svn).
>> Select one of the following:
>> 1) You know root password and you want to install
>> vim globally for all users on this computer
>> (into /usr/local/bin)
>> 2) You do not know root password or you want to
>> install vim under your $HOME/bin directory
>> 2
>> # previously downloaded source found.
>>  * checking for locally modified files ...
>>  Found locally modified files
>> (dir=/var/tmp/user4046/vim7_from_svn/vim7) *
>> M  src/auto/config.mk
>>  Found locally modified files
>> (dir=/var/tmp/user4046/vim7_from_svn/vim7) *
>> Select (1) Discard local changes (2) Keep local changes [1] ?
>> 2
>> + cd /var/tmp/user4046/vim7_from_svn/vim7
>> + svn up
>> Error validating server certificate for
>> 'https://svn.sourceforge.net:443':
>>   - The certificate is not issued by a trusted authority. Use the
>> fingerprint to validate the certificate manually!
>> Certificate information:
>>   - Hostname: *.sourceforge.net
>>   - Valid: from Jan 17 18:17:01 2007 GMT until Mar 18 18:17:01 2008 GMT
>>   - Issuer: Equifax Secure Certificate Authority, Equifax, US
>>   - Fingerprint:
>> a1:3a:51:83:60:5e:81:07:be:6c:06:d1:db:34:9b:d8:b9:40:b5:d0
>> (R)eject, accept (t)emporarily or accept (p)ermanently? p
>> svn: PROPFIND request failed on '/svnroot/vim/vim7'
>> svn: PROPFIND of '/svnroot/vim/vim7': Could not read status line: Secure
>> connection truncated (https://svn.sourceforge.net)
>> svn returned error(s). Press Enter to continue, Ctrl-C to stop
>>
>> 2) it says I should validate the certificate manually, but how do you
>> actually go about doing that?
>>
>> 3) the final part of the output is as follows:
>>
>> make[1]: Leaving directory `/var/tmp/user4046/vim7_from_svn/vim7/src'
>> Build and install successful
>>
>> ***
>> ***
>>  Warning: directory $HOME/bin is not in you PATH!
>>  You need to add directory $HOME/bin to your PATH to run new vim
>>
>>
>> but if I do the following:
>> [EMAIL PROTECTED]:~/bin$ echo $HOME
>> /the/cussons
>> [EMAIL PROTECTED]:~/bin$ echo $PATH
>> 
/usr/the_local/bin/:/usr/bin/:/the/cussons/bin/:/usr/local/bin:/bin:/usr/bin/X11:/usr/games:/the/cussons/bin/clewn/:/the/cussons/LeoScript/crudeleo-1.9/
>>
>>
>> you can see that $HOME/bin is in my PATH, therefore, does your error
>> message actually mean that as there is a version of vim in /usr/bin/
>> that this one will be loaded first and therefore, I should place
>> /the/cussons/bin/ before it in the PATH to give it preference?
>
>
> 1. Just answer 'p' to accept the certificate permanently.
> 2. The check for $HOME/bin in the path is not comlpete indeed.
>
> a) Type 'type vim' in bash to see which vim is taken, one from
> your /usr/bin or from $HOME/bin.
>
> b) Put $HOME/bin to the *front* of your path, before /usr/bin and before
> /usr/local/bin and before all other dirs that might contain other
> version of vim.
>
> c) Additionally,  put this in your .bashrc:
>  alias vim=$HOME/bin/vim'
>
> d) I recommend that you do both (b) and (c), and then check 'type vim'
> again.
>
>
> I will need to fix vim7-install.sh to fix that $HOME/bin in the end.
> I need to check that $HOME/bin is before other /usr/* dirs,
> not only *somewhere* in the PATH. "Somewhere" in the PATH
> is not good check. In your case, script was confused by the trailing
> slash in $HOME/bin/, it expects $HOME/bin. I'll fix that, too. Thanks
> for reporting.
>
> Yakov
>

Thanks for the utility, had already resolved the problems with the PATH
just thought I should let you know.

Is the part below in the error just to do with the certificate, or
something else?

svn: PROPFIND request failed on '/svnroot/vim/vim7'
svn: PROPFIND of '/svnroot/vim/vim7': Could not read status line: Secure
connection truncated (https://svn.sourceforge.net)
svn returned error(s). Press Enter to continue, Ctrl-C to

figlet script

2007-05-02 Thread Troy Piggins
I was looking for some helper commands for using something like
'figlet' from within vim.

Searched the vim scripts and closest I could find was the
larlet.vim script http://www.vim.org/scripts/script.php?script_id=1357

At present I have this in my .vimrc:

map ,f :r!figlet 

I was wondering if anyone has something a little more advanced.
Perhaps a font chooser?

-- 
Troy Piggins | http://piggo.com/~troy


code_complete plug-in help

2007-05-02 Thread madiyaan

Hello all,

I am trying to install the code_complete plug-in written by Ming Bai. Please
see link below:

http://vim.sourceforge.net/scripts/script.php?script_id=1764

I am using gVim 7.0 on Windows XP. I copied the *.vim files in the zipped
plug-in to my c:\Program Files\Vim\vim70\plugin directory. I also copied
cTags into my $PATH and went to a source C file and typed in:

:!cTags -R --c-kinds=+p --fields=+S .

including the dot (.) at the end. 

Only problem is: the script seemingly isn't working. I think I did all the
required steps, but when I go into a C file and type in:

if  

it actually inserts a tab there instead of auto-putting the parenthesis and
putting the cursor in the middle.

Has anyone successfully installed and got this script to work with Windows
gVim 7.0? If yes, can you please tell me what I am missing? The script looks
*really* cool and is almost *exactly* what I want.

I'd appreciate any inputs.

Regards, 
-- 
View this message in context: 
http://www.nabble.com/code_complete-plug-in-help-tf3684687.html#a10299189
Sent from the Vim - General mailing list archive at Nabble.com.



savevers plugin

2007-05-02 Thread Waters, Bill
I am looking at using the savevers plugin.  I don't think it does
exactly what I am looking for.  I want the old version of my file to be
saved regardless of what savevers_max is set to.  If I set savevers_max
to three and I save for the fourth time, I want the oldest, saved
version of the file to be deleted and I want my latest last-version to
be saved.

My files would go from this...

-rw-r- 1 eralston admin  226 Sep 20 11:43 test.txt
-rw-r- 1 eralston admin  102 Sep 20 11:12 test.txt.0001.clean
-rw-r- 1 eralston admin  106 Sep 20 11:14 test.txt.0002.clean
-rw-r- 1 eralston admin  132 Sep 20 11:22 test.txt.0003.clean

To this...

-rw-r- 1 eralston admin  226 Sep 20 11:43 test.txt
-rw-r- 1 eralston admin  106 Sep 20 11:14 test.txt.0002.clean
-rw-r- 1 eralston admin  132 Sep 20 11:22 test.txt.0003.clean
-rw-r- 1 eralston admin  148 Sep 20 11:34 test.txt.0004.clean

Anyway to do this?  Anybody already hacked savevers to do this?  Or have
some clever mappings to handle this?

A related question... is there a way to use a single backup directory
for all files?  I think it would need to have a way to make all file
names unique.  So that saving /dir1/a.txt wouldn't clobber over
/dir2/a.txt.

Thanks,
Bill


Re: How to set -P argument for the cscope being run by the vim6.3

2007-05-02 Thread Natesh Kedlaya
Thank you Taylor.

Your suggestion worked. I had to make two changes though.

1. unset the env parameter CSCOPE_DB
2. Add an extra condition to handle the non-existing CSCOPE_DB env  as
   elseif $CSCOPE_DB = ""
 cs add /my/path/cscope.out my/prepend/path
   endif

  For some reason if the CSCOPE_DB env is set the prepend path stuff does not 
work.

Thanks,
Natesh

- Original Message 
From: Taylor Venable <[EMAIL PROTECTED]>
To: Natesh Kedlaya <[EMAIL PROTECTED]>
Cc: vim@vim.org
Sent: Wednesday, May 2, 2007 10:40:28 AM
Subject: Re: How to set -P argument  for the cscope being run by the vim6.3

On Wed, 2 May 2007 09:05:38 -0700 (PDT)
Natesh Kedlaya <[EMAIL PROTECTED]> wrote:

> As one can see from the output, the "prepend path" is set to .
> How do I set the "prepend path" to some value that I want?
> 
> I am able to use -P argument of cscope outside the vim to get the
> intended results but, not in the vim.
> 
> I am using the Vim  6.3.

I'm not sure about Vim 6.3 - but in Vim 7.0 you can pass another
argument to ":cscope add" which sets the prepend path.  So for example:

:cscope add /path/to/database/cscope.out /home/username

This sets /home/username as the prepend path, as if you had done -P on
the command line.

(Upon further inspection, I don't see anything in version7.txt about
this being new in Vim 7.0 so it should work (I would imagine) in the
version of Vim you're running.)

-- 
Taylor Venable
[EMAIL PROTECTED]
http://www.metasyntax.net/




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


Display position marks in splitted window

2007-05-02 Thread Informationen
Hi,

how can I permanently display my position marks(:marks) in an extra
window?

Kind regards and thanks in advance

Chris




Re: moving virual rectange about in virtualedit mode

2007-05-02 Thread Charles E Campbell Jr

Gary Johnson wrote:


On 2007-05-02, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote:
 


Yakov Lerner wrote:

   


I 'set ve=all' and selected a rectangle with Ctrl-V.
How can I move this rectangle up/down left/right with arrows ?
 


With DrawIt v8d, you can move a selected rectangle about with your mouse.
Here's the relevant portion of the help for DrawIt:



   One may drag and move a selection with .  First,
   select the region using the .  Release the mouse button,
   then press ctrl and the  button; while continuing to press
   the button, move the mouse.  The selected block of text will then
   move along with the cursor.
   



Unfortunately, this works only for gvim, not vim.   
in an xterm opens the Main Options menu.


 


Here's how to get & install DrawIt (when 7.1 comes out, this will become
lots easier - just steps 3&4)
   



 


3) Get DrawIt:
  http://vim.sourceforge.net/scripts/script.php?script_id=40
  http://mysite.verizon.net/astronaut/vim/index.html#DRAWIT

4) Install an up-to-date version of Drawit:
  vim DrawIt.vba.gz
  :so %
  :q

   



One may need to uninstall (i.e., delete) any earlier version of
DrawIt, too, specifically the file ~/.vim/plugin/DrawIt.vim.  The
symptoms of needing to do this include vim complaining at startup
that \di has been defined twice.

I use the line-drawing capability of DrawIt all the time.  I haven't
done much with the visual-block commands, so I thought I'd try one.
I think I found a bug in the version of DrawIt from the astronaut
site.

I inserted the following two paragraphs of text into a buffer,
started DrawIt by typing \di, left-clicked the mouse on the
character in the upper left corner of the region (the 'e' in
"everywhere", no longer visible below), dragged the visual selection
to the lower right corner, and typed \b to draw a box.

  Mary had a little lamb,
  Its fleece was white as snow,
  And +--+ went,
  The |amb was sure to go|
||
  It f|llowed her to scho|l one day,
  Whic+--+le,
  And made the children laugh and play
  To see a lamb at school.

Note that the two bars between the paragraphs are in columns 1 and 2
instead of 8 and 27.
 

See DrawIt's help, lines 253-256.  The visual-block commands require 
spaces to work in.
Most of these commands are imported from Sylvain Viart's drawing.vim; I 
haven't tried

making the "holer" routine obsolete yet.

Regards,
Chip Campbell



Re: How to set -P argument for the cscope being run by the vim6.3

2007-05-02 Thread Taylor Venable
On Wed, 2 May 2007 09:05:38 -0700 (PDT)
Natesh Kedlaya <[EMAIL PROTECTED]> wrote:

> As one can see from the output, the "prepend path" is set to .
> How do I set the "prepend path" to some value that I want?
> 
> I am able to use -P argument of cscope outside the vim to get the
> intended results but, not in the vim.
> 
> I am using the Vim  6.3.

I'm not sure about Vim 6.3 - but in Vim 7.0 you can pass another
argument to ":cscope add" which sets the prepend path.  So for example:

:cscope add /path/to/database/cscope.out /home/username

This sets /home/username as the prepend path, as if you had done -P on
the command line.

(Upon further inspection, I don't see anything in version7.txt about
this being new in Vim 7.0 so it should work (I would imagine) in the
version of Vim you're running.)

-- 
Taylor Venable
[EMAIL PROTECTED]
http://www.metasyntax.net/


Re: moving virual rectange about in virtualedit mode

2007-05-02 Thread Gary Johnson
On 2007-05-02, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote:
>  Yakov Lerner wrote:
> 
> > I 'set ve=all' and selected a rectangle with Ctrl-V.
> > How can I move this rectangle up/down left/right with arrows ?
> 
>  With DrawIt v8d, you can move a selected rectangle about with your mouse.
>  Here's the relevant portion of the help for DrawIt:
> 
>  
> 
> One may drag and move a selection with .  First,
> select the region using the .  Release the mouse button,
> then press ctrl and the  button; while continuing to press
> the button, move the mouse.  The selected block of text will then
> move along with the cursor.

Unfortunately, this works only for gvim, not vim.   
in an xterm opens the Main Options menu.

>  Here's how to get & install DrawIt (when 7.1 comes out, this will become
>  lots easier - just steps 3&4)

>  3) Get DrawIt:
>http://vim.sourceforge.net/scripts/script.php?script_id=40
>http://mysite.verizon.net/astronaut/vim/index.html#DRAWIT
> 
>  4) Install an up-to-date version of Drawit:
>vim DrawIt.vba.gz
>:so %
>:q
> 

One may need to uninstall (i.e., delete) any earlier version of
DrawIt, too, specifically the file ~/.vim/plugin/DrawIt.vim.  The
symptoms of needing to do this include vim complaining at startup
that \di has been defined twice.

I use the line-drawing capability of DrawIt all the time.  I haven't
done much with the visual-block commands, so I thought I'd try one.
I think I found a bug in the version of DrawIt from the astronaut
site.

I inserted the following two paragraphs of text into a buffer,
started DrawIt by typing \di, left-clicked the mouse on the
character in the upper left corner of the region (the 'e' in
"everywhere", no longer visible below), dragged the visual selection
to the lower right corner, and typed \b to draw a box.

   Mary had a little lamb,
   Its fleece was white as snow,
   And +--+ went,
   The |amb was sure to go|
||
   It f|llowed her to scho|l one day,
   Whic+--+le,
   And made the children laugh and play
   To see a lamb at school.

Note that the two bars between the paragraphs are in columns 1 and 2
instead of 8 and 27.

Regards,
Gary

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


How to set -P argument for the cscope being run by the vim6.3

2007-05-02 Thread Natesh Kedlaya
Hi,
  I have added following lines to my .vimrc

if has("cscope")
  set csprg=/usr/local/bin/cscope
  set csto=0
  set cst
  set nocsverb
  " add any database in current directory
  if filereadable("cscope.out")
cs add cscope.out
" else add database pointed to by environment
  elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
  endif
  set csverb
endif

I have set the CSCOPE_DB to '/myuser/mydir/cscope/cscope.out'.
When I open a 'C' source file, I could see the cscope connections starting as 
shown below:

#  pid   database name   prepend path
0 22089  /myuser/mydir/cscope/cscope.out  

As one can see from the output, the "prepend path" is set to .
How do I set the "prepend path" to some value that I want?

I am able to use -P argument of cscope outside the vim to get the intended 
results but, not in the vim.

I am using the Vim  6.3.

Please help.

Thanks,
Natesh





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


Re: moving virual rectange about in virtualedit mode

2007-05-02 Thread Charles E Campbell Jr

Yakov Lerner wrote:


I 'set ve=all' and selected a rectangle with Ctrl-V.
How can I move this rectangle up/down left/right with arrows ?


With DrawIt v8d, you can move a selected rectangle about with your mouse.
Here's the relevant portion of the help for DrawIt:



   One may drag and move a selection with .  First,
   select the region using the .  Release the mouse button,
   then press ctrl and the  button; while continuing to press
   the button, move the mouse.  The selected block of text will then
   move along with the cursor.

Here's how to get & install DrawIt (when 7.1 comes out, this will become
lots easier - just steps 3&4)

To get an up-to-date version of drawit, you'll also need to get an 
up-to-date version of vimball.  So:


1) Get an up-to-date version of vimball:
http://vim.sourceforge.net/scripts/script.php?script_id=1502
 -or-   http://mysite.verizon.net/astronaut/vim/index.html#VimBall
 (the mysite.verizon.net one will be the more recent version)

2) Remove the old vimball plugin and install the new one:

   Linux:
   cd /usr/local/share/vim/vim70
   /bin/rm plugin/vimball*.vim autoload/vimball*.vim doc/pi_vimball.txt
   mv (wherever it was downloaded)/vimball.tar.gz .
   gunzip vimball.tar.gz
   tar -xvf vimball.tar

   Windows:
   Under Windows, check your runtimepath to determine where your 
vim 7.0's runtime directories are:


   vim
   :echo &rtp
   :q

   The first directory is likely your personal plugins directory, 
the second one is your vim system directory.


   cd (to your vim system directory)
   del plugin\vimballPlugin.vim
   del autoload\vimball.vim
   del doc\pi_vimball.txt
   ren (wherever)\vimball.tar.gz vimball.tar.gz
   gunzip vimball.tar.gz
   tar -xvf vimball.tar


3) Get DrawIt:
  http://vim.sourceforge.net/scripts/script.php?script_id=40
  http://mysite.verizon.net/astronaut/vim/index.html#DRAWIT

4) Install an up-to-date version of Drawit:
  vim DrawIt.vba.gz
  :so %
  :q



Re: undo line numbers wrong

2007-05-02 Thread Robert Cussons

Yakov Lerner wrote:

On 5/2/07, Robert Cussons <[EMAIL PROTECTED]> wrote:


Yakov Lerner wrote:
> On 4/27/07, Robert Cussons <[EMAIL PROTECTED]> wrote:
>
>> Thanks Tony, doubt he'll be that interested as he's an emacs user! But
>> anyway some time next week I will try and convince him.
>
>
> You can install latest vim under your $HOME -- this does not
> require any root privileges -- with a single command, a script
> 'vim7-install.sh'.
>
> Script vim7-install.sh is at
>
>http://www.vim.org/scripts/script.php?script_id=1473
>"vim7-install.sh : {download + build + install} latest vim7 [from
> svn sources] in 1 command"
>
> Yakov
>

Thanks very much Yakov, just done that and it seems to have worked fine,
there's just a couple of curious things:

1) below is the first part of the output, what are the errors right at
the bottom of this part?

[EMAIL PROTECTED]:~$ sh ./vim7-install.sh
This will download, build and install vim7 (using svn).
Select one of the following:
1) You know root password and you want to install
vim globally for all users on this computer
(into /usr/local/bin)
2) You do not know root password or you want to
install vim under your $HOME/bin directory
2
# previously downloaded source found.
 * checking for locally modified files ...
 Found locally modified files
(dir=/var/tmp/user4046/vim7_from_svn/vim7) *
M  src/auto/config.mk
 Found locally modified files
(dir=/var/tmp/user4046/vim7_from_svn/vim7) *
Select (1) Discard local changes (2) Keep local changes [1] ?
2
+ cd /var/tmp/user4046/vim7_from_svn/vim7
+ svn up
Error validating server certificate for 
'https://svn.sourceforge.net:443':

  - The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
Certificate information:
  - Hostname: *.sourceforge.net
  - Valid: from Jan 17 18:17:01 2007 GMT until Mar 18 18:17:01 2008 GMT
  - Issuer: Equifax Secure Certificate Authority, Equifax, US
  - Fingerprint: 
a1:3a:51:83:60:5e:81:07:be:6c:06:d1:db:34:9b:d8:b9:40:b5:d0

(R)eject, accept (t)emporarily or accept (p)ermanently? p
svn: PROPFIND request failed on '/svnroot/vim/vim7'
svn: PROPFIND of '/svnroot/vim/vim7': Could not read status line: Secure
connection truncated (https://svn.sourceforge.net)
svn returned error(s). Press Enter to continue, Ctrl-C to stop

2) it says I should validate the certificate manually, but how do you
actually go about doing that?

3) the final part of the output is as follows:

make[1]: Leaving directory `/var/tmp/user4046/vim7_from_svn/vim7/src'
Build and install successful

***
***
 Warning: directory $HOME/bin is not in you PATH!
 You need to add directory $HOME/bin to your PATH to run new vim


but if I do the following:
[EMAIL PROTECTED]:~/bin$ echo $HOME
/the/cussons
[EMAIL PROTECTED]:~/bin$ echo $PATH
/usr/the_local/bin/:/usr/bin/:/the/cussons/bin/:/usr/local/bin:/bin:/usr/bin/X11:/usr/games:/the/cussons/bin/clewn/:/the/cussons/LeoScript/crudeleo-1.9/ 



you can see that $HOME/bin is in my PATH, therefore, does your error
message actually mean that as there is a version of vim in /usr/bin/
that this one will be loaded first and therefore, I should place
/the/cussons/bin/ before it in the PATH to give it preference?



1. Just answer 'p' to accept the certificate permanently.
2. The check for $HOME/bin in the path is not comlpete indeed.

a) Type 'type vim' in bash to see which vim is taken, one from
your /usr/bin or from $HOME/bin.

b) Put $HOME/bin to the *front* of your path, before /usr/bin and before
/usr/local/bin and before all other dirs that might contain other
version of vim.

c) Additionally,  put this in your .bashrc:
 alias vim=$HOME/bin/vim'

d) I recommend that you do both (b) and (c), and then check 'type vim' 
again.



I will need to fix vim7-install.sh to fix that $HOME/bin in the end.
I need to check that $HOME/bin is before other /usr/* dirs,
not only *somewhere* in the PATH. "Somewhere" in the PATH
is not good check. In your case, script was confused by the trailing
slash in $HOME/bin/, it expects $HOME/bin. I'll fix that, too. Thanks
for reporting.

Yakov



Thanks for the utility, had already resolved the problems with the PATH 
just thought I should let you know.


Is the part below in the error just to do with the certificate, or 
something else?


svn: PROPFIND request failed on '/svnroot/vim/vim7'
svn: PROPFIND of '/svnroot/vim/vim7': Could not read status line: Secure
connection truncated (https://svn.sourceforge.net)
svn returned error(s). Press Enter to continue, Ctrl-C to stop


Also what does it mean by manually validating the certificate, it is not 
relevant to this install, but just wondering if anyone out there knows 
what it means?


Error validating server certificate for
'https://svn.sourceforge.net:443':
  - The certificate is not issued by a trusted authority. Use the
fingerprint to validat

Re: A challenge for those who feel like it

2007-05-02 Thread Dolazy

Thanks for your replies.

I like the first solution, but it doesn't return to the original tab, which
was what I found most difficult.
Ian's solution works :-)

I didn't know about the function tabpagenr(), my solution was:

:function OpenFile()
:   let tab_id = expand("%") 
:   tab split
:   tabmove
:   cs find f" locate the file using cscope plugin ( 'normal gf'
is fine also)
:   while tab_id != expand("%")
:   tabprev
:   endw
:   normal j
:endfunction

Kind regards,
Francis
-- 
View this message in context: 
http://www.nabble.com/A-challenge-for-those-who-feel-like-it-tf3657250.html#a10281573
Sent from the Vim - General mailing list archive at Nabble.com.



Re: undo line numbers wrong

2007-05-02 Thread Yakov Lerner

On 5/2/07, Robert Cussons <[EMAIL PROTECTED]> wrote:

Yakov Lerner wrote:
> On 4/27/07, Robert Cussons <[EMAIL PROTECTED]> wrote:
>
>> Thanks Tony, doubt he'll be that interested as he's an emacs user! But
>> anyway some time next week I will try and convince him.
>
>
> You can install latest vim under your $HOME -- this does not
> require any root privileges -- with a single command, a script
> 'vim7-install.sh'.
>
> Script vim7-install.sh is at
>
>http://www.vim.org/scripts/script.php?script_id=1473
>"vim7-install.sh : {download + build + install} latest vim7 [from
> svn sources] in 1 command"
>
> Yakov
>

Thanks very much Yakov, just done that and it seems to have worked fine,
there's just a couple of curious things:

1) below is the first part of the output, what are the errors right at
the bottom of this part?

[EMAIL PROTECTED]:~$ sh ./vim7-install.sh
This will download, build and install vim7 (using svn).
Select one of the following:
1) You know root password and you want to install
vim globally for all users on this computer
(into /usr/local/bin)
2) You do not know root password or you want to
install vim under your $HOME/bin directory
2
# previously downloaded source found.
 * checking for locally modified files ...
 Found locally modified files
(dir=/var/tmp/user4046/vim7_from_svn/vim7) *
M  src/auto/config.mk
 Found locally modified files
(dir=/var/tmp/user4046/vim7_from_svn/vim7) *
Select (1) Discard local changes (2) Keep local changes [1] ?
2
+ cd /var/tmp/user4046/vim7_from_svn/vim7
+ svn up
Error validating server certificate for 'https://svn.sourceforge.net:443':
  - The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
Certificate information:
  - Hostname: *.sourceforge.net
  - Valid: from Jan 17 18:17:01 2007 GMT until Mar 18 18:17:01 2008 GMT
  - Issuer: Equifax Secure Certificate Authority, Equifax, US
  - Fingerprint: a1:3a:51:83:60:5e:81:07:be:6c:06:d1:db:34:9b:d8:b9:40:b5:d0
(R)eject, accept (t)emporarily or accept (p)ermanently? p
svn: PROPFIND request failed on '/svnroot/vim/vim7'
svn: PROPFIND of '/svnroot/vim/vim7': Could not read status line: Secure
connection truncated (https://svn.sourceforge.net)
svn returned error(s). Press Enter to continue, Ctrl-C to stop

2) it says I should validate the certificate manually, but how do you
actually go about doing that?

3) the final part of the output is as follows:

make[1]: Leaving directory `/var/tmp/user4046/vim7_from_svn/vim7/src'
Build and install successful

***
***
 Warning: directory $HOME/bin is not in you PATH!
 You need to add directory $HOME/bin to your PATH to run new vim


but if I do the following:
[EMAIL PROTECTED]:~/bin$ echo $HOME
/the/cussons
[EMAIL PROTECTED]:~/bin$ echo $PATH
/usr/the_local/bin/:/usr/bin/:/the/cussons/bin/:/usr/local/bin:/bin:/usr/bin/X11:/usr/games:/the/cussons/bin/clewn/:/the/cussons/LeoScript/crudeleo-1.9/

you can see that $HOME/bin is in my PATH, therefore, does your error
message actually mean that as there is a version of vim in /usr/bin/
that this one will be loaded first and therefore, I should place
/the/cussons/bin/ before it in the PATH to give it preference?


1. Just answer 'p' to accept the certificate permanently.
2. The check for $HOME/bin in the path is not comlpete indeed.

a) Type 'type vim' in bash to see which vim is taken, one from
your /usr/bin or from $HOME/bin.

b) Put $HOME/bin to the *front* of your path, before /usr/bin and before
/usr/local/bin and before all other dirs that might contain other
version of vim.

c) Additionally,  put this in your .bashrc:
 alias vim=$HOME/bin/vim'

d) I recommend that you do both (b) and (c), and then check 'type vim' again.


I will need to fix vim7-install.sh to fix that $HOME/bin in the end.
I need to check that $HOME/bin is before other /usr/* dirs,
not only *somewhere* in the PATH. "Somewhere" in the PATH
is not good check. In your case, script was confused by the trailing
slash in $HOME/bin/, it expects $HOME/bin. I'll fix that, too. Thanks
for reporting.

Yakov