Re: let loaded_matchparen = 1

2007-04-15 Thread Gary Johnson
On 2007-04-15, fREW <[EMAIL PROTECTED]> wrote:
>  On 4/13/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
> > Andre Majorel wrote:
> > > Are there any plans to make the highlight-the-matching-thing
> > > "feature" disabled by default in a future release of Vim ?
> > >
> >
> > AFAIK, there isn't; for one thing, it would break all the vimrc's which 
> > rely
> > on its being set by default (and therefore don't force-set it).
> >
> > As your Subject line shows, you know how to remove that feature.

>  Personally I like this feature, but I do get lost every now and then
>  and forget which one is my cursor.  Is there any way that I can say,
>  make the cursor have a red background and make the matched paren (or
>  whatever) have a blue background?  And is there a way to do this that
>  won't break if the background is already red/blue?

I had this same problem, so I added this line to my color scheme.  
It may be sufficient to just put something like this in your .vimrc.

highlight MatchParen ctermbg=4

HTH,
Gary

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


Re: how to avoid deleting the auto-indent in a new empty line when i press

2007-04-15 Thread Gary Johnson
On 2007-04-16, sun <[EMAIL PROTECTED]> wrote:

> > The idea of the comment shown above was to leave something to 
> > remind you that
> > you had to come back later, since, as you said, you want to leave the 
> > indent
> > there "for future use"; also, the comment would be sure to stay in place 
> > even
> > if the "bare indent" didn't. But if just adding, let's say, a period, then
> > backspacing over it, makes the indent remain, then you don't have to type a
> > lengthy comment unless you need it.
> >
> > You may even try (untested)
> >
> >:inoremap   .
> >
> > Note: Next time, please use "Reply to all" rather than "Reply to sender",
> > unless you're straying off-topic.
> >
> > Best regards,
> > Tony.

>  Do I need always type a char then ?
>  Is there a better solution? I wander whether the vim option can do
>  this automatically.

A better solution to what problem?  If vim automatically indents 
properly when you add a new line, what difference does it make 
whether it leaves leading spaces in that line you left or not?

If you want to leave a blank line and add properly indented text to 
it later, you can resume editing that line by typing S which should 
automatically move your cursor to the proper indentation.

Regards,
Gary

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


Re: Making vim more friendly under windows with non ascii codepage

2007-04-15 Thread Cyril Slobin

Hi!

On 4/15/07, Pavel Shevaev <[EMAIL PROTECTED]> wrote:


I often type in vim using cp1251 charset under windows and currently I
have to switch to english charset every time I need to execute any
action in command mode which is quite inconvenient.



For example I have "ш" Russian symbol along with "i" on the same
button on my keyboard. It would be very nice if while in command mode
"ш" would actually map to "i". The same story with other keys. Thus I
won't have to switch to ascii in command mode.


If you internal encoding is 8-bit one (eg cp1251), then

 set langmap=very_long_list_of_letter_pairs

works fine. Unfortunately this doesn't fork if internal encoding is
utf-8. In later case,

 set keymap=russian-jcukenwin

works fine. The later has a minor disadvantage -- you need
vim-specific keyboard switch instead of standard WIndows one, but
after a shot time you will get used of this, and it is really handy.

--
Cyril Slobin <[EMAIL PROTECTED]> `When I use a word,' Humpty Dumpty said,
 `it means just what I choose it to mean'


Resp.: Help needed on pt_BR spell checking

2007-04-15 Thread Leonardo Fontenelle

Finally, I have a working pt "dictionary" for vim.

I attached a shell script, which means I gave up learning AAP. Not
that it's hard, but it took me long enough to sit down and write the
script, and I wouldn't like to stall any longer.

I believe I wrote all the relevant comments in the script.

The gzipped spl file is 1,3M large, so I didn't attach it yet. May I
send it directly to you, Bram? I have no sug file because it seems
that the MAP's are doing a better job than I could do with SOFO's.

Leonardo Fontenelle

2007/3/26, Bram Moolenaar <[EMAIL PROTECTED]>:


Leonardo Fontenelle wrote:

> Er... does it make a big difference if I send a regular shell script?
>
> I don't know how to write scripts in any other language. That said, if
> it's important maybe I could learn AAP.

Well, I can transform the commands to the Aap script, but we still need
to verify that the result is the same.  Or I can generate and upload the
spell file and then you check if it's OK.  You can use ":spelldump" with
your and the uploaded dictionary.

--
Close your shells, or I'll kill -9 you
Tomorrow I'll quota you
Remember the disks'll always be full
And then while I'm away
I'll write ~ everyday
And I'll send-pr all my buggings to you.
[ CVS log "Beatles style" for FreeBSD ports/INDEX, Satoshi Asami ]

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



mkvim.sh
Description: Bourne shell script


Re: how to avoid deleting the auto-indent in a new empty line when i press

2007-04-15 Thread sun

Do I need always type a char then ?
Is there a better solution? I wander whether the vim option can do
this automatically.


The idea of the comment shown above was to leave something to remind you that
you had to come back later, since, as you said, you want to leave the indent
there "for future use"; also, the comment would be sure to stay in place even
if the "bare indent" didn't. But if just adding, let's say, a period, then
backspacing over it, makes the indent remain, then you don't have to type a
lengthy comment unless you need it.

You may even try (untested)

   :inoremap   .

Note: Next time, please use "Reply to all" rather than "Reply to sender",
unless you're straying off-topic.

Best regards,
Tony.


Re: gvim: menu disappeared

2007-04-15 Thread panshizhu
Guido Milanese <[EMAIL PROTECTED]> 写于 2007-04-16 05:08:14:
> I am sorry to ask such a stupid question, but I'm really puzzled.
> I have been using vim for ages now, and for some tasks, not always,
> I prefer a
> GUI. I use a Mandriva Linux distribution and it's all right.
> Suddendly the menu bar (not the toolbar with icons, the menu bar with
texts:
> File, Edit, and so on) disappeared. I tried several options of the "set
> guioptions" command, but to no success. I also deleted the .vimrc file,
but
> again no change. Then, installed vim-X11 again, but nothing happened.
>
> May I ask your kind help?
>
> Thank you!
> guido, from Italy
>
> 

Will the :se go+=g
show your menu?

If not, then your menu may have some error and vim delete it while loading.

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

Re: how to avoid deleting the auto-indent in a new empty line when i press

2007-04-15 Thread panshizhu
sun <[EMAIL PROTECTED]> 写于 2007-04-15 17:27:28:
> Dear all,
>
> The question is:
>
> When I insert a line then  to edit other place, vim of C filetype
> delete the auto-indented space. But i want to keep the indent there
> for the future editing? Then how to make the auto-indent always insert
> the indent-space regardless whether the line is empty or not?
>
> I read the help file about the 'cpoption' option, it says 'set
> cpoption+=I' can avoid the indent deleting when move the cursor
> updown, but I can't let that work.
>
> Best Regards,
> sun

If you insert a line, and then go somewhere else, and then come back, you
can just type dd to delte the newly inserted line and type o to insert a
new line again. This is only 3 keystrokes and it solves all problem, your
indent come back.

Anyway, this behavior is good for avoid trailing blanks.

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

Re: command to delete just whitespace

2007-04-15 Thread shawn bright

funny, never noticed that dw works if there is no characters under it.
thanks

sk

On 4/15/07, Suresh Govindachar <[EMAIL PROTECTED]> wrote:



  > ok, let me clarify a bit more.  i just need to delete
  > the white space between the cursor and the next character.

  > sorry.
  > sk

  In normal mode, just do "dw" (without quotes).

  --Suresh




auto-scrolling a window?

2007-04-15 Thread Joseph Xu

Hello:

I'm using vim as a front end to a server process that communicates
with it through the python interface. When the server process is doing
something, it sends a lot of output to a vim buffer. I would like to
make it so that the window(s) that buffer is bound to will
automatically scroll to show the newest data, but I will also be
editing other windows simultaneously, so I don't want to have to
change focus to that window everytime to scroll it.

Currently I can change the position of the cursor in that window
without moving to it, but that doesn't scroll the window until the
next time it gets focus.

Is there any function that can do this?

Thanks ahead of time for the help.

Joseph


Re: Vimrc blues.

2007-04-15 Thread panshizhu
"Ananya M (RBIN/ECM1)" <[EMAIL PROTECTED]> 写于 2007-04-13
17:02:11:
> Hi,
> I m very new to Vim. But I'm smitten by it nevertheless.
> I use Gvim 7.0. I also have cygwin installed in my winnt system.
> Cygwin defines $HOME to a network drive and places its own .vimrc file in
it.
> I don’t want gvim to use this rc file since it sits on a server.
> How do I force gvim to always consider the _vimrc file in $VIM?
> Is there a command line or registry option?
> -
> The gvim docs say that gvim looks for $HOME/_vimrc file first(in
> Windows environment).
> However why is my gvim even considering a .vimrc file within $HOME?
> Shouldn’t it have failed its search for _vimrc in $HOME, and moved
> on to $VIM to look for the _vimrc file?
> --
> I tried setting $MYVIMRC to $VIM/_vimrc . But this failed, since
> gvim always overwrites it to $HOME/.vimrc .
> --
> Thanks for all your answers.
> Best regards,
> Ananya M
> //I'm sorry to have sent this mail directly to you.
> //My mailer daemon failed to deliver the mail to vim@vim.org .

Hi, I don't think it's possible to use directories other than $HOME while
HOME is defined. But you can redefine the $HOME in your Windows.
(System|Properties|Advanced|Environment Variables|User variables) so that
the HOME environment variable has a different value, this is the best way
IMO.

Or you can specify the init file manually. try launch vim by vim --help,
you'll see that vim -u can override any .vimrc file.



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

RE: command to delete just whitespace

2007-04-15 Thread Suresh Govindachar


  > ok, let me clarify a bit more.  i just need to delete 
  > the white space between the cursor and the next character.

  > sorry.
  > sk

  In normal mode, just do "dw" (without quotes).

  --Suresh



RE: command to delete just whitespace

2007-04-15 Thread Timothy Adams
Then just

d/\S

Delete through first non-whitespace char 

-Original Message-
From: shawn bright [mailto:[EMAIL PROTECTED] 
Sent: Sunday, April 15, 2007 8:41 PM
To: vimlist
Subject: Re: command to delete just whitespace

ok, let me clarify a bit more.  i just need to delete the white space between 
the cursor and the next character.

sorry.
sk

On 4/15/07, Jean-Rene David <[EMAIL PROTECTED]> wrote:
> * shawn bright [2007.04.15 20:15]:
> > Hey there, i am looking for a command that will delete all 
> > whitespace up until the first character.
> >
> > for example
> >
> > []some_characters
> > []some_characters.
>
> :s/^\[\]\zs\s*//
>
> --
> JR
>


Re: command to delete just whitespace

2007-04-15 Thread shawn bright

ok, let me clarify a bit more.  i just need to delete the white space
between the cursor and the next character.

sorry.
sk

On 4/15/07, Jean-Rene David <[EMAIL PROTECTED]> wrote:

* shawn bright [2007.04.15 20:15]:
> Hey there, i am looking for a command that will
> delete all whitespace up until the first
> character.
>
> for example
>
> []some_characters
> []some_characters.

:s/^\[\]\zs\s*//

--
JR



Re: command to delete just whitespace

2007-04-15 Thread Jean-Rene David
* shawn bright [2007.04.15 20:15]:
> Hey there, i am looking for a command that will
> delete all whitespace up until the first
> character.
> 
> for example
> 
> []some_characters
> []some_characters.

:s/^\[\]\zs\s*//

-- 
JR


RE: command to delete just whitespace

2007-04-15 Thread Timothy Adams
:s/^\s*//

Add % between : and s to apply it to all lines in the buffer 

-Original Message-
From: shawn bright [mailto:[EMAIL PROTECTED] 
Sent: Sunday, April 15, 2007 8:14 PM
To: vimlist
Subject: command to delete just whitespace

Hey there, i am looking for a command that will delete all whitespace up until 
the first character.

for example

[]some_characters
[]some_characters.

i could not find a command to do this ( or perhaps read the cheat sheet and 
:help d wrong )

thanks
sk


Re: command to delete just whitespace

2007-04-15 Thread mikee
On Sun, 15 Apr 2007, shawn bright might have said:

> Hey there, i am looking for a command that will delete all whitespace
> up until the first character.
> 
> for example
> 
> []some_characters
> []some_characters.
> 
> i could not find a command to do this ( or perhaps read the cheat
> sheet and :help d wrong )
> 
> thanks
> sk
> 

Do you mean:

:%s/^[ ^I]*//


command to delete just whitespace

2007-04-15 Thread shawn bright

Hey there, i am looking for a command that will delete all whitespace
up until the first character.

for example

[]some_characters
[]some_characters.

i could not find a command to do this ( or perhaps read the cheat
sheet and :help d wrong )

thanks
sk


gvim: menu disappeared

2007-04-15 Thread Guido Milanese
I am sorry to ask such a stupid question, but I'm really puzzled.
I have been using vim for ages now, and for some tasks, not always, I prefer a 
GUI. I use a Mandriva Linux distribution and it's all right.
Suddendly the menu bar (not the toolbar with icons, the menu bar with texts: 
File, Edit, and so on) disappeared. I tried several options of the "set 
guioptions" command, but to no success. I also deleted the .vimrc file, but 
again no change. Then, installed vim-X11 again, but nothing happened.

May I ask your kind help?

Thank you!
guido, from Italy
 

Guido Milanese
http://www.arsantiqua.org


Re: how to create a command

2007-04-15 Thread shawn bright

Thanks, worked great !

sk

On 4/15/07, Timothy Adams <[EMAIL PROTECTED]> wrote:

I'd try just

cabbr todo GMSend [EMAIL PROTECTED]

The c in front makes it only expand in command line mode, otherwise wherever 
you typed todo (such as in email text you were composing) it'd expand.

*tim*

-Original Message-
From: shawn bright [mailto:[EMAIL PROTECTED]
Sent: Sunday, April 15, 2007 12:38 PM
To: vimlist
Subject: how to create a command

hello there vim dudes.

i am using the gmail.vim plugin. Its cool, and allows me to send myself 
messages. This is how i keep my TODO list, with filters and gmail plus 
addressing. So anyway. It uses a command like this :GMSend someemailaddress.

now, since i am using the same email address everytime i do this, i would like 
a new command that will be shorter. like :todo or something.

is there something i can put in my .vimrc that will let me do this ?
Or would some mapping be more appropriate ?

thanks

sk



RE: how to create a command

2007-04-15 Thread Timothy Adams
I'd try just

cabbr todo GMSend [EMAIL PROTECTED]

The c in front makes it only expand in command line mode, otherwise wherever 
you typed todo (such as in email text you were composing) it'd expand.

*tim* 

-Original Message-
From: shawn bright [mailto:[EMAIL PROTECTED] 
Sent: Sunday, April 15, 2007 12:38 PM
To: vimlist
Subject: how to create a command

hello there vim dudes.

i am using the gmail.vim plugin. Its cool, and allows me to send myself 
messages. This is how i keep my TODO list, with filters and gmail plus 
addressing. So anyway. It uses a command like this :GMSend someemailaddress.

now, since i am using the same email address everytime i do this, i would like 
a new command that will be shorter. like :todo or something.

is there something i can put in my .vimrc that will let me do this ?
Or would some mapping be more appropriate ?

thanks

sk


Re: let loaded_matchparen = 1

2007-04-15 Thread fREW

On 4/13/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:

Andre Majorel wrote:
> Are there any plans to make the highlight-the-matching-thing
> "feature" disabled by default in a future release of Vim ?
>

AFAIK, there isn't; for one thing, it would break all the vimrc's which rely
on its being set by default (and therefore don't force-set it).

As your Subject line shows, you know how to remove that feature.


Best regards,
Tony.
--
Sorry.  I forget what I was going to say.



Personally I like this feature, but I do get lost every now and then
and forget which one is my cursor.  Is there any way that I can say,
make the cursor have a red background and make the matched paren (or
whatever) have a blue background?  And is there a way to do this that
won't break if the background is already red/blue?

-fREW


Re: how to avoid deleting the auto-indent in a new empty line when i press

2007-04-15 Thread A.J.Mechelynck

sun wrote:
If you type an arbitrary character, then delete it immediately, does 
the extra

whitespace stay in place when you move the cursor away?


yes, the spaces remain.


If it does, you may


I meant "if it doesn't"


resort to adding a placeholder comment, like:

function MyFunc()
   {
   /* TODO: code needed here */
   };


you mean just add several character using a quick-key map? but then
everytime i type the code before "/* TODO: code needed here */", i
have to delete it.
can i change the default behavior of vim not to delete the indent?



The idea of the comment shown above was to leave something to remind you that 
you had to come back later, since, as you said, you want to leave the indent 
there "for future use"; also, the comment would be sure to stay in place even 
if the "bare indent" didn't. But if just adding, let's say, a period, then 
backspacing over it, makes the indent remain, then you don't have to type a 
lengthy comment unless you need it.


You may even try (untested)

:inoremap .



Note: Next time, please use "Reply to all" rather than "Reply to sender", 
unless you're straying off-topic.


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
171. You invent another person and chat with yourself in empty chat rooms.


Re: Describe-key ?

2007-04-15 Thread François Pinard

[EMAIL PROTECTED]


is there anything like "describe-key" (EMacs)in vim ?


The simplest might be the Vim help system.  For example:

 :h ^X

describes Ctrl-X.  You have to type "^X" as two characters, not one.

It is a good idea to get familiar with the help system in Vim (the same 
as with the Emacs help system for Emacs users).  Try both:


 :h
 :h help

For commands and keybindings, Emacs has a ¹one-line help (corresponding 
to the first line of a starred doc-string -- if I remember well), ²the 
full doc-string (which is usually more succinct than the manual, yet in 
a few cases more complete than the manual, or even, very rarely, 
contradicting it :-), and the ³automatic display of the manual entry.  
Vim help mostly corresponds to this later one.


--
François Pinard   http://pinard.progiciels-bpi.ca


Describe-key ?

2007-04-15 Thread meino . cramer
Hi,
 
 is there anything like "describe-key" (EMacs)in vim ?

 In EMacs vou can submit this command, press a combination
 of keys and EMacs will tel you the naming convention
 of this key (for example "Meta-p") and its current
 bindings of that combination of keys.

 Anything like that in vim ?

 Would help a lot :)

 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 create a command

2007-04-15 Thread shawn bright

hello there vim dudes.

i am using the gmail.vim plugin. Its cool, and allows me to send
myself messages. This is how i keep my TODO list, with filters and
gmail plus addressing. So anyway. It uses a command like this
:GMSend someemailaddress.

now, since i am using the same email address everytime i do this, i
would like a new command that will be shorter. like :todo or
something.

is there something i can put in my .vimrc that will let me do this ?
Or would some mapping be more appropriate ?

thanks

sk


Re: how to avoid deleting the auto-indent in a new empty line when i press

2007-04-15 Thread sun

If you type an arbitrary character, then delete it immediately, does the extra
whitespace stay in place when you move the cursor away?



yes, the spaces remain.



If it does, you may
resort to adding a placeholder comment, like:

function MyFunc()
   {
   /* TODO: code needed here */
   };



you mean just add several character using a quick-key map? but then
everytime i type the code before "/* TODO: code needed here */", i
have to delete it.
can i change the default behavior of vim not to delete the indent?


Making vim more friendly under windows with non ascii codepage

2007-04-15 Thread Pavel Shevaev

I often type in vim using cp1251 charset under windows and currently I
have to switch to english charset every time I need to execute any
action in command mode which is quite inconvenient.

For example I have "ш" Russian symbol along with "i" on the same
button on my keyboard. It would be very nice if while in command mode
"ш" would actually map to "i". The same story with other keys. Thus I
won't have to switch to ascii in command mode.

--
Best regards, Pavel


Re: Moving cursor on wrapped lines

2007-04-15 Thread Pavel Shevaev

Thanks!

--
Best regards, Pavel


Re: how to avoid deleting the auto-indent in a new empty line when i press

2007-04-15 Thread A.J.Mechelynck

sun wrote:

Dear all,

The question is:

When I insert a line then  to edit other place, vim of C filetype
delete the auto-indented space. But i want to keep the indent there
for the future editing? Then how to make the auto-indent always insert
the indent-space regardless whether the line is empty or not?

I read the help file about the 'cpoption' option, it says 'set
cpoption+=I' can avoid the indent deleting when move the cursor
updown, but I can't let that work.

Best Regards,
sun



If you type an arbitrary character, then delete it immediately, does the extra 
whitespace stay in place when you move the cursor away? If it does, you may 
resort to adding a placeholder comment, like:


function MyFunc()
{
/* TODO: code needed here */
};



Best regards,
Tony.
--
Nuke the gay, unborn, baby whales for Jesus.


how to avoid deleting the auto-indent in a new empty line when i press

2007-04-15 Thread sun

Dear all,

The question is:

When I insert a line then  to edit other place, vim of C filetype
delete the auto-indented space. But i want to keep the indent there
for the future editing? Then how to make the auto-indent always insert
the indent-space regardless whether the line is empty or not?

I read the help file about the 'cpoption' option, it says 'set
cpoption+=I' can avoid the indent deleting when move the cursor
updown, but I can't let that work.

Best Regards,
sun