replace word from buffer

2007-04-05 Thread meino . cramer
Hi,

 is there a way to do this more effectively?

 I often get in the situation of yanking a word
 into the buffer, search another word I want to
 replace with the contents of the buffer, delete
 the found word and paste the contents of the buffer
 at the place of the previously found word.

 Despite the fact, that -- without the yank-ring
 script -- you have to keep an eye on what is
 in what buffer, it would be more effective
 if one could do the following:
  
 yw"yank replacement word
 /word "find word ("word") to be replaced
 cw"change word under cursor with that in buffer

 I know, that "cw" is another command, which is "wrong" in 
 this case...I only needed a name for what I want to do and
 cw keeps track of the length of the replaced word and the
 replacement.

 Thank you very much for any helpful hint :)   !

 Keep editing!
 mcc
-- 
Please don't send me any Word- or Powerpoint-Attachments
unless it's absolutely neccessary. - Send simply Text.
See http://www.gnu.org/philosophy/no-word-attachments.html
In a world without fences and walls nobody needs gates and windows.


答复: How to open a BIG file quickly?

2007-04-05 Thread 陈方荣

> -邮件原件-
> 发件人: Jean-Rene David [mailto:[EMAIL PROTECTED]
> 发送时间: 2007年4月6日 :00:09
> 收件人: Vim
> 主题: Re: How to open a BIG file quickly?
> 
> * Tom Purl [2007.04.05 12:00]:
> > > I need to do that quite often. They are usually
> > > log files from a long running program in debug
> > > mode.
> >
> > Actually, you can think of a log file as a sort
> > of flat file database.  Here's an example
> 
> I appreciate all the help but I really don't have
> a problem with large files. I *do* preprocess my
> large files with grep/awk/perl in all sorts of
> ways and *do* use vim to view and edit the
> resulting chunks.
> 
> I am not the OP, and I was just mentioning log
> files because someone sounded surprised one might
> legitimately need to edit a 1GB file.
> 
> And before somebody mentions it, I do know about
> logrotate... :-)
> 
> --
> JR

Thank you all for the help.
I'm a new user to GVIM, so I think I can use GVIM to open any files.

Thanks to Christian Ebert [EMAIL PROTECTED] for giving the URL:
 >> Try .
It works.

I think that "grep/awk/perl" can handle this case. (I'm a M$ user. :( ,and not 
install Cygwin, o(∩_∩)o... ) I'll study that.

Please close this topic.

--
Regards
Chenfangrong




Re: How to modify code so that only one space is between two characters or words?

2007-04-05 Thread Matthew Winn
On Fri, 06 Apr 2007 05:52:33 +, "Eric Leenman"
<[EMAIL PROTECTED]> wrote:

> >:%s/:\s\+in/: in/g
> 
> This works for all lines containing one or more spaces.
> Why doesn't it work for lines which have no space between : and in?

Use ":%s/:\s*in/: in/g" instead (replace the \+ with *: \+ means "one
or more", * means "zero or more").

-- 
Matthew Winn


Re: creating your own indent markers

2007-04-05 Thread Dimitar
May be what you need is:

:help cinoptions-values

if you are using cindent

Regards,
Dimitar

* Eric Leenman <[EMAIL PROTECTED]> [070406 08:10]:
> Hi,
> 
> Is it possible to redefine (or adjust) some of the indent markers.
> I have code containing  ( at the end
> I.e:
> port map (
>  aa => bb,
>  cc => dd);
> 
> 
> when I indent the file with gg=G it get indented so that
> aa is below the ( character and not indented two spaces from port map.
> (I've showned it below but not sure it's aligned right when displayed in all 
> mail clients)
> port map (
>   aa => bb,
>   cc => dd);
> 
> Can you tell vim that it should indent from the p of port iso the (?
> 
> Rgds,
> Eric
> 
> _
> Download Messenger. Join the i?m Initiative. Help make a difference today. 
> http://im.live.com/messenger/im/home/?source=TAGHM_APR07


Re: How to modify code so that only one space is between two characters or words?

2007-04-05 Thread Eric Leenman

[...]
You could use a Search/Replace on the full text.  This does end up 
modifying your base text, so be sure to only use it on modifiable buffers.

For example:
- all lines containing the char : followed with zero or more then one 
space(s) and then in

should become:  : in(
 aaa : in std_logic;
 bb : in std_logic_vector(7 downto 0);

:%s/: \+in/: in/g

or, if you want to overwrite all whitespace (spaces, tabs, other 
unprintable characters), use:


:%s/:\s\+in/: in/g


Thanks,

This works for all lines containing one or more spaces.
Why doesn't it work for lines which have no space between : and in?
So when it'saaa :in std_logic;

_
MSN is giving away a trip to Vegas to see Elton John.  Enter to win today. 
http://msnconcertcontest.com?icid-nceltontagline




creating your own indent markers

2007-04-05 Thread Eric Leenman

Hi,

Is it possible to redefine (or adjust) some of the indent markers.
I have code containing  ( at the end
I.e:
port map (
 aa => bb,
 cc => dd);


when I indent the file with gg=G it get indented so that
aa is below the ( character and not indented two spaces from port map.
(I've showned it below but not sure it's aligned right when displayed in all 
mail clients)

port map (
  aa => bb,
  cc => dd);

Can you tell vim that it should indent from the p of port iso the (?

Rgds,
Eric

_
Download Messenger. Join the i’m Initiative. Help make a difference today. 
http://im.live.com/messenger/im/home/?source=TAGHM_APR07




copy pasting HTML code into vim

2007-04-05 Thread Kamaraju S Kusumanchi
Let's say I open up a webpage, select some text and paste it into vim. Then
all I see in vim is the text I see on the browser. While this is OK most of
the times, sometimes I wish there is a way to paste the actual HTML code
directly into the vim.

Selecting "view source of the webpage" and then copy pasting into vim will
work. But it is very cumbersome and time consuming. So this is not an
option for me.

Currently the editor in docs.google.com does what I need, Is there any way
the same can be achieved by vim?

thanks
raju

-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/



Re: VIM Delete All Except

2007-04-05 Thread cga2000
On Thu, Apr 05, 2007 at 10:10:03AM EDT, jas01 wrote:
> 
> I have a huge file where I need to delete all lines except for a few I need.
> I'm trying to do this in a single command.
> 
> I know that:
> 
> :v/Text/d 
> 
> will delete all lines except for ones containing 'Text.' I have no idea how
> to put multiple strings so the command deletes everything except for 'Text'
> and 'Text2' and 'Text3'.
> 
> Please help!

Maybe you're using the wrong tool to begin with?

If the file is really huge, you may find adopting a different strategy is
preferable.  

If you're on linux or similar you might use a command-line tool such as:

$ grep Text[1-3] huge_file > a_few_lines

What this does is that it finds all the lines that contain at least one
occurrence of Text1, Text2, or Text3 in ./huge_file and copies them to
./a_few.lines.

Thanks,
cga


Re: how to replace ESC to some other key?

2007-04-05 Thread panshizhu
wangxu <[EMAIL PROTECTED]> 写于 2007-04-05 21:08:43:
> but in this situation,is there any way to auto-indent *.py?
>

 << is "decrease indent" (hold on Shift, then '<' twice)
 >> is "increase indent"
You can use << or >> command in Normal mode and Visual mode. which is as
good as, if no better than, the  key.

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

Re: how to replace ESC to some other key?

2007-04-05 Thread Taylor Venable
On Wed, 4 Apr 2007 10:22:43 -0400
"Yakov Lerner" <[EMAIL PROTECTED]> wrote:

> On 4/4/07, wangxu <[EMAIL PROTECTED]> wrote:
> > ESC is so far from the center of the keyboard.
> > Can I replace this key to Caps Lock,for example?
> 
> I heard some people use Tab as a substitute for Esc. Weird.
> But it's easier to do in platform-independent way.
> 
> Yakov

If Wikipedia is correct in that vi was originally written on ADM-3A
terminals (I think I also read that on here at one time as well) and
that this particular terminal had it's escape key where nearly all
modern keyboards have a tab key, it kinda makes sense.

Here's the page, for reference: http://en.wikipedia.org/wiki/Vi

Although I'm not going to switch to that scheme any time soon -
 ^[ works just as well.

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


Re: Problem with pastetoggle

2007-04-05 Thread Jeffery Small
"A.J.Mechelynck" <[EMAIL PROTECTED]> writes:

>Try setting 'pastetoggle' to a single key (using <> notation for special 
>keys), e.g.,

>   :set pastetoggle=

Unfortunately, there is no <> notation for the "Stop" key.  Also, I have
never been able to get any of these notations to work.  For example, I took
the following lines:

map  [224z :set paste!\|set paste?
set pastetoggle=[224z

which work fine in my xterm window, allowing the F1 key to toggle paste
mode on/off.  I then change them to:

map   :set paste!\|set paste?
set pastetoggle=

and now the F1 key does not work at all, despite the fact that the terminfo
definition for xterm properly defines the mapping:

kf1=\E[224z

I have never been able to understand why the <> mnemonics have never worked,
but this is why all the mappings in my .vimrc file use the escape code
sequences.


>You might also possibly want to set 'ttimeout' on, and 'ttimeoutlen' to 
>something short enough (when positive, it's a number of milliseconds: set it 
>to more than the time between successive bytes auto-generated for a single 
>special key by the keyboard driver, and to less than the time between manual 
>keypresses when you are typing).

This was a great idea but, unfortunately, it had no effect whether I set
ttimeoutlen anywhere from 1 to 1.


>With what you've set, I suspect that when you hit Esc in 'paste' mode Vim 
>waits to see if you hit [ next.

This certainly seems logical.  I don't know why the suggestion above didn't
work.  However, I really appreciate your help.  Thanks.

Regards,
--
Jeff



Re: Problem with pastetoggle

2007-04-05 Thread A.J.Mechelynck

Jeffery Small wrote:

I'm using vim 7.0 on a Solaris 9 system.

If I put the following line in my .vimrc file:

set pastetoggle=[192z

Then when I am editing in insert mode, each time I hit ESC to return
to command mode the cursor sit there jumping to the right and back
continuously until another key is pressed.  If I press ESC again it stops
or if I move the cursor it also stops.  If I comment out the above line
then I do not see this problem.

Any suggestions as to how to address this?  Thanks.

Regards,


Try setting 'pastetoggle' to a single key (using <> notation for special 
keys), e.g.,


:set pastetoggle=

You might also possibly want to set 'ttimeout' on, and 'ttimeoutlen' to 
something short enough (when positive, it's a number of milliseconds: set it 
to more than the time between successive bytes auto-generated for a single 
special key by the keyboard driver, and to less than the time between manual 
keypresses when you are typing).



With what you've set, I suspect that when you hit Esc in 'paste' mode Vim 
waits to see if you hit [ next.



Best regards,
Tony.
--
"Benson, you are so free of the ravages of intelligence"
-- Time Bandits


Re: How to open a BIG file quickly?

2007-04-05 Thread Jason Ribeiro

On 4/5/07, 陈方荣 <[EMAIL PROTECTED]> wrote:

Dear all,
If I want to open one 1G bytes size file,it's really slow.
Thank you in advance.

---
Best regards
longer


For large files I find that turning off syntax highlighting helps a
great deal.  I don't think I've ever needed to edit a 1GB file though.

Jason


RE: Python crash

2007-04-05 Thread Chuck Mason

/nodefaultlib:python24.lib

That's 2.4 right?

The point is that vim.command() is not thread-safe.  I tried this in
pearl (5.8) as well with the same result.  Except that perl's VIM::Msg
works in a thread (albeit things seem unstable) and VIM::DoCommand does
not.

Chuck

-Original Message-
From: A.J.Mechelynck [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 05, 2007 11:11 AM
To: Chuck Mason
Cc: Tom Whittock; vim@vim.org
Subject: Re: Python crash

> -Original Message-
> From: Tom Whittock [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, April 05, 2007 2:47 AM
> To: Chuck Mason
> Cc: vim@vim.org
> Subject: Re: Python crash
> 
>> sys.path.append("c:\\python23\\lib")
> 
> What's the result of
> 
> :py import sys
> :py print sys.version
> 
> ?
> 
> If it's not 2.3.something then there is no way you should be doing
that.
> 
> 
Chuck Mason wrote:
 > Just to verify-I tried with python2.4 libs too :-D
 >

You should be using the same version of Python as what Vim was compiled
for, 
see the second half of the output of ":version".

Best regards,
Tony.
-- 
I've found my niche.  If you're wondering why I'm not there, there was
this little hole in the bottom ...
-- John Croll


Re: Python crash

2007-04-05 Thread A.J.Mechelynck

-Original Message-
From: Tom Whittock [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 05, 2007 2:47 AM

To: Chuck Mason
Cc: vim@vim.org
Subject: Re: Python crash


sys.path.append("c:\\python23\\lib")


What's the result of

:py import sys
:py print sys.version

?

If it's not 2.3.something then there is no way you should be doing that.



Chuck Mason wrote:
> Just to verify-I tried with python2.4 libs too :-D
>

You should be using the same version of Python as what Vim was compiled for, 
see the second half of the output of ":version".


Best regards,
Tony.
--
I've found my niche.  If you're wondering why I'm not there, there was
this little hole in the bottom ...
-- John Croll


Re: How to open a BIG file quickly?

2007-04-05 Thread Charles E Campbell Jr

Tom Purl wrote:


On Thu, April 5, 2007 2:38 am, ³Â·½ÈÙ wrote:
 


Dear all,
If I want to open one 1G bytes size file,it's really slow.
Thank you in advance.
   



Just out of curiosity, why are you trying to edit a 1 GB file with any
text editor?  I'm assuming that these files are flat file databases.  If
that's true, then why don't you just read and write to them using some
sort of ODBC driver + database front end?  That will give you far
superior performance to a text editor.

 

I don't know about the OP, but I've gotten several hundred megabyte 
files resulting from use of
my in-line debugger while trying to debug an interpreter.  So, its not 
necessarily a flat file database.


FYIW,
Chip Campbell




Re: Problem with pastetoggle

2007-04-05 Thread Jeffery Small
Albie Janse van Rensburg <[EMAIL PROTECTED]> writes:

>It seems that whenever I set pastetoggle to x (where x is almost 
>any character), it exibits this same behaviour.  You could avoid the 
>problem by setting pastetoggle to something else, preferably something 
>not starting with an ESC character.  Why the funny sequence?

I assign pastetoggle the escape sequence of one of the special keys on my
Sun keyboard.  It happens to be the "Stop" key on the left of my keyboard.
As far as I know, there is no other mnemonic I can use for these special
keys other than using the full escape sequence.

Unless there is some know workaround for this problem, I suggest that the
vim developers might want to look into this and fix it.

Regards,
--
Jeff



Need help with error format

2007-04-05 Thread Christophe Dupre
Hello,

I'm trying to write a compiler plug-in for a compiler (it's a compiler
use for PIC microcontrollers) and I'm hafing difficulties defining the
error format.

Here is a typical compiler output:
>>> Warning 208
"C:\Project\1816-CooperDataInterrogator\CircularBuffer.c" Line 60(6,15):
Function not void and does not return a value  PutRecord
*** Error 165 "C:\Project\1816-CooperDataInterrogator\test.c" Line
7(10,11): No overload function matches

And it's made of:
Error No - Filename - line No(Column Start,Column End) - Message.

I've defined the error format the following way:
CompilerSet errorformat=%*[^0-9]%n\ %f\ %l%v%p%m

After setting the compiler and running make, the first error is
recognised but the line and column number aren't.
How can I model line No(Column Start,Column End), e.g.:  "Line 60(6,15):
", and "Line 7(10,11): "

Thanks for your help,

Best regards,

Christophe 



Re: How to open a BIG file quickly?

2007-04-05 Thread Jean-Rene David
* Tom Purl [2007.04.05 12:00]:
> > I need to do that quite often. They are usually
> > log files from a long running program in debug
> > mode.
> 
> Actually, you can think of a log file as a sort
> of flat file database.  Here's an example

I appreciate all the help but I really don't have
a problem with large files. I *do* preprocess my
large files with grep/awk/perl in all sorts of
ways and *do* use vim to view and edit the
resulting chunks.

I am not the OP, and I was just mentioning log
files because someone sounded surprised one might
legitimately need to edit a 1GB file.

And before somebody mentions it, I do know about
logrotate... :-)

-- 
JR


RE: Python crash

2007-04-05 Thread Chuck Mason
Just to verify-I tried with python2.4 libs too :-D

-Original Message-
From: Tom Whittock [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 05, 2007 2:47 AM
To: Chuck Mason
Cc: vim@vim.org
Subject: Re: Python crash

> sys.path.append("c:\\python23\\lib")

What's the result of

:py import sys
:py print sys.version

?

If it's not 2.3.something then there is no way you should be doing that.


Re: How to open a BIG file quickly?

2007-04-05 Thread Tom Purl
On Thu, April 5, 2007 9:40 am, Jean-Rene David wrote:
>> Just out of curiosity, why are you trying to
>> edit a 1 GB file with any text editor?  I'm
>> assuming that these files are flat file
>> databases.
>
> I need to do that quite often. They are usually
> log files from a long running program in debug
> mode.

Actually, you can think of a log file as a sort of flat file database.
Here's an example

...
2007-04-05 07:15 INFO - Starting process
2007-04-05 07:20 DEBUG - foo is non-zero
2007-04-05 08:15 WARNING - Cannot write to /dev/foo file
2007-04-05 10:15 CRITICAL - Lost db connectivity
...

This may look like a regular log file, but using a tool such as awk, you
can split it into a 4-column text database with the following columns:

* datestamp
* timestamp
* logtype
* message

Then, like Tim said, you could grep based on any column value to "query"
the information that you really need, write that to a new file, and
*then* view/edit it using Vim.

HTH!

Tom Purl




Re: How to open a BIG file quickly?

2007-04-05 Thread Tim Chase
>> Just out of curiosity, why are you trying to
>> edit a 1 GB file with any text editor?  I'm
>> assuming that these files are flat file
>> databases.  
> 
> I need to do that quite often. They are usually
> log files from a long running program in debug
> mode.


I find that pre-processing with grep/sed/awk first in a
stream-like fashion can trim the file down to a manageable size
before I heave the power of Vim at the problem.

If, for example, I'm only interested in the ERRORS and want to
skip the WARNINGs or the DEBUGs in the file, I might use

  bash> grep ERROR infile.log > smaller.log
  bash> vi smaller.log

or I might want to strip out the DEBUG level lines:

  bash> grep -v DEBUG infile.log > smaller.log

I've had a couple log files clock in at over 300 megs...nothing
so gargantuan as over a gig, but the principle is the same.

-tim




Re: VIM Delete All Except

2007-04-05 Thread Charles E Campbell Jr

Charles E Campbell Jr wrote:


jas01 wrote:

I have a huge file where I need to delete all lines except for a few 
I need.

I'm trying to do this in a single command.

I know that:

:v/Text/d
will delete all lines except for ones containing 'Text.' I have no 
idea how
to put multiple strings so the command deletes everything except for 
'Text'

and 'Text2' and 'Text3'.
 



:v/Text[23]\=/d

I rather expect that that answer won't be adequate, though.  If you 
want to construct regexp's that

handle boolean logic requirements, I suggest looking into LogiPat.

So, to do what you're asking, and assuming that you're not literally 
looking for "Text...":


 :echo LogiPat('"Text" & "Text2" & "Text3")

which yields:\%(.*Text.*\&\%(.*Text2.*\&.*Text3.*\)\)

so  :v/\%(.*Text.*\&\%(.*Text2.*\&.*Text3.*\)\)/d

will delete all lines that don't have Text, Text2, or Text3 in them.


Whoops -- sorry, that command will delete all lines that don't have 
Text, Text2 AND Text3 in them.


Try :echo LogiPat("Text" | "Text2" | "Text3")
which yields:  \%(.*Text.*\|\%(.*Text2.*\|.*Text3.*\)\)
so :v/\%(.*Text.*\|\%(.*Text2.*\|.*Text3.*\)\)/d

will do what you want.  Now, LogiPat doesn't guarantee that you'll get 
the smallest possible regexp

to do the job you want.  A smaller one would be:

:v/Text\|Text2\|Text3/d

You'll note that LogiPat has \%(...\) and .* in its pattern which 
facilitates the use of additional logic.


Regards,
Chip Campbell



Re: How to open a BIG file quickly?

2007-04-05 Thread Jean-Rene David
* Tom Purl [2007.04.05 10:30]:
> On Thu, April 5, 2007 2:38 am, ³Â·½ÈÙ wrote:
> > If I want to open one 1G bytes size
> > file,it's really slow.

I suggest splitting it into smaller chunks with
another tool.

> Just out of curiosity, why are you trying to
> edit a 1 GB file with any text editor?  I'm
> assuming that these files are flat file
> databases.  

I need to do that quite often. They are usually
log files from a long running program in debug
mode.

-- 
JR


Re: VIM Delete All Except

2007-04-05 Thread Charles E Campbell Jr

jas01 wrote:


I have a huge file where I need to delete all lines except for a few I need.
I'm trying to do this in a single command.

I know that:

:v/Text/d 


will delete all lines except for ones containing 'Text.' I have no idea how
to put multiple strings so the command deletes everything except for 'Text'
and 'Text2' and 'Text3'.
 



:v/Text[23]\=/d

I rather expect that that answer won't be adequate, though.  If you want 
to construct regexp's that

handle boolean logic requirements, I suggest looking into LogiPat.

You can get the latest LogiPat.vim from

   http://mysite.verizon.net/astronaut/vim/index.html#LOGIPAT
  
or a more stable version from:


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

Then you can do things such as

 search for all lines that don't contain a pattern:   :LogiPat !"some 
string"


search for all lines that do contain two patterns:  :LogiPat "one 
thing" & "another thing"


search for all lines that have A and B but not C :  :LogiPat "A" & "B" 
& !"C"


So, to do what you're asking, and assuming that you're not literally 
looking for "Text...":


 :echo LogiPat('"Text" & "Text2" & "Text3")

which yields:\%(.*Text.*\&\%(.*Text2.*\&.*Text3.*\)\)

so  :v/\%(.*Text.*\&\%(.*Text2.*\&.*Text3.*\)\)/d

will delete all lines that don't have Text, Text2, or Text3 in them.

Regards,
Chip Campbell



Re: How to open a BIG file quickly?

2007-04-05 Thread Tom Purl
On Thu, April 5, 2007 2:38 am, ³Â·½ÈÙ wrote:
> Dear all,
>   If I want to open one 1G bytes size file,it's really slow.
> Thank you in advance.

Just out of curiosity, why are you trying to edit a 1 GB file with any
text editor?  I'm assuming that these files are flat file databases.  If
that's true, then why don't you just read and write to them using some
sort of ODBC driver + database front end?  That will give you far
superior performance to a text editor.

If you can't edit the file like it's a database, then I would seriously
think about creating some sort of Perl or shell script to handle reading
and writing.

HTH!

Tom Purl




Re: VIM Delete All Except

2007-04-05 Thread Jürgen Krämer

Hi,

jas01 wrote:
> I have a huge file where I need to delete all lines except for a few I need.
> I'm trying to do this in a single command.
> 
> I know that:
> 
> :v/Text/d 
> 
> will delete all lines except for ones containing 'Text.' I have no idea how
> to put multiple strings so the command deletes everything except for 'Text'
> and 'Text2' and 'Text3'.

use  \|  in the search pattern

  :v/Text\|Text2\|Text3/d

See

  :help /\|

for more information.

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)


VIM Delete All Except

2007-04-05 Thread jas01

I have a huge file where I need to delete all lines except for a few I need.
I'm trying to do this in a single command.

I know that:

:v/Text/d 

will delete all lines except for ones containing 'Text.' I have no idea how
to put multiple strings so the command deletes everything except for 'Text'
and 'Text2' and 'Text3'.

Please help!
-- 
View this message in context: 
http://www.nabble.com/VIM-Delete-All-Except-tf3531855.html#a9856565
Sent from the Vim - General mailing list archive at Nabble.com.



Is it possible to source all scripts/plugins from VIM without leaving VIM?

2007-04-05 Thread Eric Leenman

Hi,

Is it possible to source all scripts/plugins from VIM without leaving VIM?
When experimenting with plugins, I now
1) modify plugin
2) start VIM
3) test plugin
4) detect an error
5) close VIM
6) goto 1)

And this loops then till I fix it or give up

I know you can type :source eric_plugin
But as the plugin name tested is can be every day different
Instead of remembering all the filenames is it possible to do a "big bang 
call" like:


map  "source all plugins again"

Rgds,
Eric

_
Need a break? Find your escape route with Live Search Maps. 
http://maps.live.com/?icid=hmtag3




Re: How to modify code so that only one space is between two characters or words?

2007-04-05 Thread Albie Janse van Rensburg

Eric Leenman wrote:

Hi

Hi!
How to modify code so that only one space is between two characters or 
words?
You could use a Search/Replace on the full text.  This does end up 
modifying your base text, so be sure to only use it on modifiable buffers.

For example:
- all lines containing the char : followed with zero or more then one 
space(s) and then in

should become:  : in(
 aaa : in std_logic;
 bb : in std_logic_vector(7 downto 0);

:%s/: \+in/: in/g

or, if you want to overwrite all whitespace (spaces, tabs, other 
unprintable characters), use:


:%s/:\s\+in/: in/g
- all lines containing the word process followed with zero or more 
then one space(s) and then a (

should become:  process (

process (clk,reset)
process (clk27)
proc_one : proccess (a,b,c)

:%s/process \+(/process (/g

or for all types of whitespace:

:%s/process\s\+(/process (/g

Rgds,
Eric

HTH

Albie

--
To have died once is enough. -- Publius Vergilius Maro (Virgil)


How to modify code so that only one space is between two characters or words?

2007-04-05 Thread Eric Leenman

Hi

How to modify code so that only one space is between two characters or 
words?


For example:
- all lines containing the char : followed with zero or more then one 
space(s) and then in

should become:  : in(
 aaa : in std_logic;
 bb : in std_logic_vector(7 downto 0);

- all lines containing the word process followed with zero or more then one 
space(s) and then a (

should become:  process (

process (clk,reset)
process (clk27)
proc_one : proccess (a,b,c)


Rgds,
Eric

_
Mortgage rates near historic lows. Refinance $200,000 loan for as low as 
$771/month* 
https://www2.nextag.com/goto.jsp?product=10035&url=%2fst.jsp&tm=y&search=mortgage_text_links_88_h27f8&disc=y&vers=689&s=4056&p=5117




Re: Folding Perl POD

2007-04-05 Thread Ian Tegebo

Have you seen this plugin already?

"POD Folder : Creates folds in POD files based on =head[123] sections"
http://www.vim.org/scripts/script.php?script_id=691

On 4/3/07, Bill Moseley <[EMAIL PROTECTED]> wrote:

I don't use folding often, but I'm not figuring out if/how to fold
POD documentation in a Perl module.

I have a module that includes:

=head1 METHODS

=over 4

=item wazbat

This method returns the wazbat of the current object.

=cut

sub wazbat {
my $self = shift;
return $self->{wazbat}

=item fromp

This methods implements the fromp operation.

=cut

sub fromp {
return "fromp";
}

=back

=head1 WARNINGS

[...]


Is it possible to fold the =head1 or =item sections within a given
=head1 section?


--
Bill Moseley
[EMAIL PROTECTED]





--
Ian Tegebo


Re: Python crash

2007-04-05 Thread Tom Whittock

sys.path.append("c:\\python23\\lib")


What's the result of

:py import sys
:py print sys.version

?

If it's not 2.3.something then there is no way you should be doing that.


Re: How to open a BIG file quickly?

2007-04-05 Thread Christian Ebert
* 陈方荣 on Thursday, April 05, 2007 at 15:38:20 +0800:
> If I want to open one 1G bytes size file,it's really slow.

Try .

c
-- 
Vim plugin to paste current GNU Screen buffer in (almost) any mode:



How to open a BIG file quickly?

2007-04-05 Thread 陈方荣
Dear all,
If I want to open one 1G bytes size file,it's really slow.
Thank you in advance.

---
Best regards
longer



Problem with pastetoggle

2007-04-05 Thread Jeffery Small
I'm using vim 7.0 on a Solaris 9 system.

If I put the following line in my .vimrc file:

set pastetoggle=[192z

Then when I am editing in insert mode, each time I hit ESC to return
to command mode the cursor sit there jumping to the right and back
continuously until another key is pressed.  If I press ESC again it stops
or if I move the cursor it also stops.  If I comment out the above line
then I do not see this problem.

Any suggestions as to how to address this?  Thanks.

Regards,
-- 
Jeffery Small



Re: Problem with pastetoggle

2007-04-05 Thread Albie Janse van Rensburg

Jeffery Small wrote:

I'm using vim 7.0 on a Solaris 9 system.

If I put the following line in my .vimrc file:

set pastetoggle=[192z

Then when I am editing in insert mode, each time I hit ESC to return
to command mode the cursor sit there jumping to the right and back
continuously until another key is pressed.  If I press ESC again it stops
or if I move the cursor it also stops.  If I comment out the above line
then I do not see this problem.

Any suggestions as to how to address this?  Thanks.

Regards,
  
It seems that whenever I set pastetoggle to x (where x is almost 
any character), it exibits this same behaviour.  You could avoid the 
problem by setting pastetoggle to something else, preferably something 
not starting with an ESC character.  Why the funny sequence?


--
God made everything out of nothing, but the nothingness shows through. 
-- Paul Valery


Re: how to replace ESC to some other key?

2007-04-05 Thread Matthew Winn
On Thu, 05 Apr 2007 09:08:43 -0400, wangxu <[EMAIL PROTECTED]>
wrote:

> but in this situation,is there any way to auto-indent *.py?

I wouldn't have thought so, since the meaning of the code is implied
by the indentation rather than vice versa.

Personally I always indent using the basic autoindent option along
with ^T and ^D. I format my code for the benefit of human readers
(mainly myself), so I lay it out to maximise the clarity. Manual
indentation works best for that, and after nearly two decades of
practice my use of ^T and ^D as required has become automatic.

-- 
Matthew Winn