Re: Customizing vim: How to change the char before commands

2007-03-23 Thread John Little

FWIW

Somebody suggested, and I use

 noremap ; :

And Tony responded (in part):

 Your example of a semicolon?  The "search for the next f/F/t/T
 search on the line in the same direction as before" command.

I used to use ; for this fairly often, especially with vi, but since I
mapped it to colon I *love* it, and regret not having done it years
ago.  There's so much available in command mode with Vim; it would
have been best to have adopted this map when I started with Vim.

I suspect that on Bill Joy's original keyboard a colon was not a
shifted key press.

Friendly regards,

John Little


Re: IDE's Vim 7 and Apple OS X

2007-03-23 Thread A.J.Mechelynck

Rui Gonçalves wrote:

if you put the '~/.vim' directory in the runtime path (set
runtimepath=~/.vim,...) probably you can put the file in this
directory.

i think you also can put the files in the directory where vim is
installed (for example '/usr/share/vim/vim70').


*DON'T.* Any upgrade may (and the upgrade to Vim 7.1 or Vim 8 will) silently 
overwrite any changes you made in $VIMRUNTIME or its subfolders.




regards
Rui Gonçalves



Use one of the directories listed *before* $VIMRUNTIME in the 'runtimepath' 
option. Typical values include:


	$VIM/vimfiles (e.g. /usr/local/share/vim/vimfiles or "C:\Program 
Files\Vim\vimfiles"): for system-wide scripts.


	$HOME/.vim or $HOME/vimfiles (e.g. /home/johndoe/.vim or "C:\Documents and 
Settings\John Doe\vimfiles"): for single-user scripts.


Use ":set runtimepath?" (without the quotes) to see what 'runtimepath' is set 
to on your system.



Best regards,
Tony.


Re: pasting very long text at command-line

2007-03-23 Thread A.J.Mechelynck

Hari Krishna Dara wrote:

This happened to me always by mistake and what happened today was the
worst. Forgetting that I have copied large amount of text into the
clipboard, I tried to paste it at the search prompt using ^R* and this
caused Vim to hang for a very long time and pressing ^C had no effect.
I remember that Vim used to crash when a large amount of text is pasted
this way, but I think that problem is now fixed, though I think a better
behavior is needed, e.g.,
- Stop and give error after reaching some limit
- Detect ^C and stop.

Any comments?



Ctrl-C ought to be detected, but some users (especially Vim newbies on 
Windows) remap it to "yank to clipboard". You might want to try Ctrl-Break, 
which also (IIRC) has the property that (at the keyboard interrupt driver 
level) it empties the keyboard buffer (of waiting keys).


Best regards,
Tony.
--
Steinbach's Guideline for Systems Programming:
Never test for an error condition you don't know how to
handle.


hosting wiki tips

2007-03-23 Thread Hari Krishna Dara

I know this came up during the recent discussions on using wiki for tips
and it was ruled out. I don't remember exactly what the reason was and
there are too many messages to go through, so I would like to pose this
question again. I came across this free hosting website called 110mb.com
which has like 2gb of free space with no advertisements and no catches
on hosting, and many people were successful in hosting mediawiki (search
their forums) and other wikis on their space. Why shoudn't this be an
option that we should consider? I don't know how successful their
business model is, but if they already proved that it works, they might
be around for a long time.

-- 
Thanks,
Hari


 

Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL


Re: Selecting tag opens file in a new tab - how?

2007-03-23 Thread Andy Wokula

A.J.Mechelynck schrieb:

Zarko Coklin wrote:

I posted following question some time back:
~
Is it possible to have a setup in .vimrc so that every
time I select tag either through "CTRL-]" or by
holding CTRL and pressing left mouse click to open a
new buffer in a new tab?

and got following answer that works:
:map  :exe "tab stag" expand("")
:map  :exe "tab stag"
expand("")
~
The trouble I am having at the moment is that this
approach leads to a quick proliferation of open file
tabs. Ideally, Vim should not open a new tab for the
the file that already has a tab. Rather, it should
simply reuse an existing tab and position itself
within an open tab. Is there a way to get that done?

Thanks in advance,
Zarko


I think it is possible, but not easy, and would require writing a custom 
function, especially if you want to still be able to have split windows. 
I'm not going to try. You may want to try for yourself, or change your 
behaviour.


See, among others:
:help tabpagenr()
:help tabpagewinnr()
:help tabpagebuflist()
:help bufname()
etc.

Best regards,
Tony.


Another idea: Usage of 'switchbuf'
   :set switchbuf=useopen,usetab

Problem: Works with buffer names only
-> Get filename of tag and search it in the buffer list

i.e. (first move cursor to tag)
   :exe "tab sbuf" taglist(expand(""))[0].filename

HTH,
Andy

--
EOM





___ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de


Re: How to turn a q recording into a map?

2007-03-23 Thread Jean-Rene David
* [EMAIL PROTECTED] [2007.03.23 19:45]:
> I was thinking that there should be a way to
> take the register lines and automatically turn
> them into an noremap (including adding the @ to
> start register playback). Has anyone perfected
> this?

If you want your mapping to follow the (possibly
changing) content of q:

map  @q

If you want your mapping to stay fixed even if
register q changes:

:exe "map  " . expand(@q)

and then you can map that...

map  :exe "map  " . expand(@q)

HTH,

-- 
JR


How to turn a q recording into a map?

2007-03-23 Thread noah
Somehow it never occured to me that I could view and edit the contents
of a recording. Of course, it's just a register, so I pasted the register; 
edited the contents; then yanked the lines back into the register...
and naturally this worked fine.

I was thinking that there should be a way to take the register lines
and automatically turn them into an noremap (including adding the @ to start
register playback). Has anyone perfected this?

Yours,
Noah




Re: How to remove all indenting features on Windows GVIM

2007-03-23 Thread Gary Johnson
On 2007-03-23, Kiernan Holland <[EMAIL PROTECTED]> wrote:
> This is the most annoying of the features on GVIM.. I like GVIM because it
> had syntax highlighting, but my fingers are programmed to handle indenting
> with just the basic indenting that is standard even on the elder vi 
> implementation.

I assume you're running gvim on Windows so I'll assume you have 
indenting enabled because your _vimrc has

source $VIMRUNTIME/vimrc_example.vim

at the top, which contains this line:

filetype plugin indent on

To turn indenting off for all file types, just put this line in your 
_vimrc below that "source" line:

filetype indent off

See

:help filetype-indent-off

HTH,
Gary

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


Re: IDE's Vim 7 and Apple OS X

2007-03-23 Thread Rui Gonçalves

if you put the '~/.vim' directory in the runtime path (set
runtimepath=~/.vim,...) probably you can put the file in this
directory.

i think you also can put the files in the directory where vim is
installed (for example '/usr/share/vim/vim70').

regards
Rui Gonçalves

On 3/23/07, Joseph White <[EMAIL PROTECTED]> wrote:

Hi All,

When you download c.vim : C/C++-IDE, BASH-IDE, or Perl-IDE,  for
example, the directions to install and get the menu items to show up,
goes as follows:

install details
Copy the zip archive  cvim.zip to $HOME/.vim/ and run
   unzip cvim.zip

While this works fine on Linux;  Mac OS X Vim does not recognize or
read the $Home/.vim  directory,  is there an alternate location to
place the IDE files?

On Windows it is the c:/program files/vim/plugin directory or
something close to that. Can't figure what it might be on Mac.

Any Ideas?

Thanks,

Joe



RE: Jump to tag opens VIM in a new Microsoft Windows XP window

2007-03-23 Thread Waters, Bill
Thanks.  This gets me close to what I want...

nnoremap <2-LeftMouse> :!start gvim -t 

The only problem is that it will start up a new gvim even if the tag is in the 
file that I started from.  So, you get the same file opened twice, in two 
windows.

Anybody know how to avoid that?

--Bill


-Original Message-
From: Gary Johnson [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 23, 2007 5:14 PM
To: vim@vim.org
Subject: Re: Jump to tag opens VIM in a new Microsoft Windows XP window

On 2007-03-23, "Waters, Bill" <[EMAIL PROTECTED]> wrote:
> When I jump to a tag reference in a different file, can I have VIM 
> open that file in a new Microsoft Window?  As it works now, I jump 
> to the new file in the same VIM session.  I have three problems 
> with that:
> 
> 1. VIM will not jump to the tag unless all of the changes in my 
> current file have been saved.

You can fix this by making the current buffer hidden before 
executing the jump.  See

:help hidden
:help bufhidden
:help hide

> 2. When I jump to the new file, I loose the undo buffer for the 
> previous file.

Making the buffer hidden will fix that, too.

> 3. I would prefer to look at the new file in a separate, 
> side-by-side Microsoft Window.

In that case, you could map your "jump to tag" key to a command that 
would execute

gvim -t 

I'll leave that to you to figure out since it may require ":!start 
gvim ..." instead of just ":!gvim ..." and I don't do Windows that 
much.  See

:help :!
:help :!start
:help -t
:help map.txt

HTH,
Gary

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


How to remove all indenting features on Windows GVIM

2007-03-23 Thread Kiernan Holland

This is the most annoying of the features on GVIM.. I like GVIM because it
had syntax highlighting, but my fingers are programmed to handle indenting
with just the basic indenting that is standard even on the elder vi 
implementation.



How it's hurting me now, an example in PHP:

   if (!is_a("pcollection",$pcollection))
   return error(false,"pcollection invalid in pload->load");


Everytime I type ">" in the line above, the whole line jumps a tab to 
the right..
This is very bothersome, and has been followed with me deleting the auto 
inserted
tab at the beginning.. But every time I do something that Vim interprets 
as something
that needs to be indented, without me asking for it explicitly, it just 
does it..


I have tried everything to get the indenting to default to basic auto 
indention, which

is to not "predict the unpredictable".  I kind of believe that auto-indent
features were brough into the world by Microsoft in an effort to 
stimulate a
software repurchase, this should never be a default feature of any 
application,
except for auto field fill, or auto-completion, in all other cases it's 
disorienting..









Re: Jump to tag opens VIM in a new Microsoft Windows XP window

2007-03-23 Thread Gary Johnson
On 2007-03-23, "Waters, Bill" <[EMAIL PROTECTED]> wrote:
> When I jump to a tag reference in a different file, can I have VIM 
> open that file in a new Microsoft Window?  As it works now, I jump 
> to the new file in the same VIM session.  I have three problems 
> with that:
> 
> 1. VIM will not jump to the tag unless all of the changes in my 
> current file have been saved.

You can fix this by making the current buffer hidden before 
executing the jump.  See

:help hidden
:help bufhidden
:help hide

> 2. When I jump to the new file, I loose the undo buffer for the 
> previous file.

Making the buffer hidden will fix that, too.

> 3. I would prefer to look at the new file in a separate, 
> side-by-side Microsoft Window.

In that case, you could map your "jump to tag" key to a command that 
would execute

gvim -t 

I'll leave that to you to figure out since it may require ":!start 
gvim ..." instead of just ":!gvim ..." and I don't do Windows that 
much.  See

:help :!
:help :!start
:help -t
:help map.txt

HTH,
Gary

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


IDE's Vim 7 and Apple OS X

2007-03-23 Thread Joseph White

Hi All,

When you download c.vim : C/C++-IDE, BASH-IDE, or Perl-IDE,  for  
example, the directions to install and get the menu items to show up,  
goes as follows:


install details
Copy the zip archive  cvim.zip to $HOME/.vim/ and run
  unzip cvim.zip

While this works fine on Linux;  Mac OS X Vim does not recognize or  
read the $Home/.vim  directory,  is there an alternate location to  
place the IDE files?


On Windows it is the c:/program files/vim/plugin directory or  
something close to that. Can't figure what it might be on Mac.


Any Ideas?

Thanks,

Joe 


Jump to tag opens VIM in a new Microsoft Windows XP window

2007-03-23 Thread Waters, Bill
When I jump to a tag reference in a different file, can I have VIM open that 
file in a new Microsoft Window?  As it works now, I jump to the new file in the 
same VIM session.  I have three problems with that:

1. VIM will not jump to the tag unless all of the changes in my current file 
have been saved.

2. When I jump to the new file, I loose the undo buffer for the previous file.

3. I would prefer to look at the new file in a separate, side-by-side Microsoft 
Window.

I see how I can jump to a new split window in the current VIM session, but that 
is not preferred/ideal.

Thanks,

Bill


pasting very long text at command-line

2007-03-23 Thread Hari Krishna Dara

This happened to me always by mistake and what happened today was the
worst. Forgetting that I have copied large amount of text into the
clipboard, I tried to paste it at the search prompt using ^R* and this
caused Vim to hang for a very long time and pressing ^C had no effect.
I remember that Vim used to crash when a large amount of text is pasted
this way, but I think that problem is now fixed, though I think a better
behavior is needed, e.g.,
- Stop and give error after reaching some limit
- Detect ^C and stop.

Any comments?

-- 
Thanks,
Hari


 

Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 


Re: Count characters

2007-03-23 Thread Tobia
Harald Kröll wrote:
> a command or script to count the characters without syntax words. For
> example for people who write LaTeX documents in vim and have to
> control their length...

That depends on the definition of a control word.

If you only want to exclude \backslash_prefixed \words, and nothing
else, then this will do:

:%s/\(\\\w*\)\@

How to save/quit on easy mode

2007-03-23 Thread Filipe Tavares

I want to use vim's easy mode (-y) for entering comments when
committing to my version control system. But I couldn't find any
documentation on how to save/quit on easy mode.

Can anybody tell me how to do this?


Re: Project script

2007-03-23 Thread fREW

On 3/23/07, Mika Fischer <[EMAIL PROTECTED]> wrote:

Hi Claus,

* Claus Atzenbeck <[EMAIL PROTECTED]> [2007-03-23 13:20]:
> Thanks for your mail. \C works perfectly, however \R seems not to add
> recently created subdirectories.

That's true.

> Is there a way to update a Project entry as if I would create a new
> entry with \C?

Not that I know of. I tend to just create the new fold manually since it
doesn't happen too often...

I think the Project script is still maintained by Aric Blumer.  I don't
know if he reads this list, but it might be nice to ask him about it.
Maybe he'll implement it...

Regards,
 Mika



He certainly responds to emails about bugfixes and did so for me just
a few months ago, so it's worth a shot to email him.

--
-fREW


Re: Error In Documentation?

2007-03-23 Thread Bram Moolenaar

Vigil wrote:

> In vim's:
> 
> VIM - Vi IMproved 7.0 (2006 May 7, compiled May 30 2006 13:06:19)
> VIM - Vi IMproved 6.4 (2005 Oct 15, compiled May 23 2006 12:03:57)
> 
> in :help makeprg, I think the {$*} in the example ought to be ${*}. At
> least, it wouldn't work for me unless I did that.

No, it's really $*.  This is replaced by Vim before passing the command
to the shell.

-- 
MONK: ... and the Lord spake, saying, "First shalt thou take out the Holy Pin,
  then shalt thou count to three, no more, no less.  Three shalt be the
  number thou shalt count, and the number of the counting shalt be three.
  Four shalt thou not count, neither count thou two, excepting that thou
  then proceed to three.  Five is right out.  Once the number three, being
  the third number, be reached, then lobbest thou thy Holy Hand Grenade of
  Antioch towards thou foe, who being naughty in my sight, shall snuff it.
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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


Re: Count characters

2007-03-23 Thread Harald Kröll

Andy Wokula schrieb:

Tim Chase schrieb:
Is there some function or script to count characters (letters without 
whitespaces) in vim?


For example Kile the Latex Editor has such a feature to control how 
long texts are.



You can use

:%s/\w/&/g

which will report back "X substitutions on Y lines".  "X" represents 
the number of characters of interest.  Adjust the "\w" regexp for 
whatever constitutes your definiton of "characters" that you want to 
count.  Thus, this might be


:%s/\a/&/g "(only letters)
:%s/\S/&/g"(non-whitespace)

Or any other such combo.

It does have the side effect of "modifying" your document (setting the 
"modified" flag).  If this is a problem, you can "u"ndo it and it 
should revert.  It also requires that the document not be readonly (or 
at least it will gripe if it is, warning you that you're changing a RO 
document).


If you have fewer than 'report' characters, Vim won't report back:

:help 'report'

but you can set this to

:set report=0

to always report any changes.

There are ways to do it on non-modifiable buffers, but they require a 
bit more programatic logic, such as


:let x=0
:g/^/let x+=strlen(substitute(getline('.'), '\W', '', 'g'))
:echo x

where the '\W' is the inverse-set of characters of interest.  In this 
case, if you're interested in "\w" characters, the "\W" is the 
inverse.  If you're interested in non-whitespace characters ("\s"), 
you would use "\S"; and if you're interested in counting vowels, you 
could use "[^aeiouAEIOU]".


You might even notice that the second version uses a :g command that 
matches every line.  With this, you have a lot of flexibility:


  :'<,'>g/^/let ... " counts characters in the linewise selection
  :g/foo/let ..." counts characters on lines containing "foo"

and the like.

All sorts of fun things at your disposal :)  Hope this helps,

-tim


Therefore in Vim7 the 'n' flag was added to the
substitute command:

   :%s/\S/&/gn

just reports the number of matches.  Works also
for read-only files, because no text is changed.

   :h :s_flags


Andy



Ok, thanks. This are a lot of cool Tips.
But to complete the discussion maybe there is missing a command or 
script to count the characters without syntax words. For example for 
people who write LaTeX documents in vim and have to control theyr length...


regards,

Harry


Error In Documentation?

2007-03-23 Thread Vigil

In vim's:

VIM - Vi IMproved 7.0 (2006 May 7, compiled May 30 2006 13:06:19)
VIM - Vi IMproved 6.4 (2005 Oct 15, compiled May 23 2006 12:03:57)

in :help makeprg, I think the {$*} in the example ought to be ${*}. At least, 
it wouldn't work for me unless I did that.


--

.


Re: Undo Levels Reset

2007-03-23 Thread Vigil
Hmm. "My bad", I guess. I must have had some weird settings at the time. Sorry, 
list!



A.J.Mechelynck wrote:

When I save a file, undo levels are kept. Using u then undoes, but marks
the file as modified. Using Ctrl-R redoes, and the 'modified' flag will
disappear when the file-in-memory is identical to the file-on-disk.


--

.


Re: Highlight a specific character using colorscheme?

2007-03-23 Thread flope

Thanks a lot. It works!
Very instructive.
-- 
View this message in context: 
http://www.nabble.com/Highlight-a-specific-character-using-colorscheme--tf3450062.html#a9637945
Sent from the Vim - General mailing list archive at Nabble.com.



Re: Project script

2007-03-23 Thread Mika Fischer
Hi Claus,

* Claus Atzenbeck <[EMAIL PROTECTED]> [2007-03-23 13:20]:
> Thanks for your mail. \C works perfectly, however \R seems not to add
> recently created subdirectories.

That's true.

> Is there a way to update a Project entry as if I would create a new
> entry with \C?

Not that I know of. I tend to just create the new fold manually since it
doesn't happen too often...

I think the Project script is still maintained by Aric Blumer.  I don't
know if he reads this list, but it might be nice to ask him about it.
Maybe he'll implement it...

Regards,
 Mika


Re: Project script

2007-03-23 Thread Claus Atzenbeck
On Fri, 23 Mar 2007, Mika Fischer wrote:

> In the project window you can use "\c" to generate a new project fold.
> It will ask you a few things an generate it for you. In your case you
> may want to use "\C" which works recursively.
>
> > Furthermore, whenever I add another .tex file somewhere in project/ or
> > any of its subdirectories I would like to have it updated.
>
> In the directory fold press "\r". Again "\R" works recursively, so you
> can also press "\R" in the top level of the project.

Thanks for your mail. \C works perfectly, however \R seems not to add
recently created subdirectories. Is there a way to update a Project
entry as if I would create a new entry with \C?

Claus


Re: Undo Levels Reset

2007-03-23 Thread Tobia
A.J.Mechelynck wrote:
> When I save a file, undo levels are kept. Using u then undoes, but marks 
> the file as modified. Using Ctrl-R redoes, and the 'modified' flag will 
> disappear when the file-in-memory is identical to the file-on-disk.

This is my experience as well.

Undo levels are only lost when I close Vim, when I reopen the file with
:e, or when Vim alerts me that the file has been changed and reloads it.
The latter can be dangerous if you're not careful, and I'd appreciate
any tips to work around it.


Tobia


Re: Failed to print PostScript file

2007-03-23 Thread Jabba Laci

Hi,

I found the problem. In the line "call system("lpr -h" . a:fname)",
there must be a space after "-h", i.e.: "call system("lpr -h " .
a:fname)".

   Laszlo

On 3/8/07, Jabba Laci <[EMAIL PROTECTED]> wrote:

Hi,

Until now I could print my files from Vim using the ":ha" command. I
have the following in my .vimrc file:

"###
set printoptions+=header:0

set printexpr=PrintFile(v:fname_in)
function! PrintFile(fname)
  call system("lpr -h" . a:fname)
  call delete(a:fname)
  return v:shell_error
endfunc
"###

But now I get the following error:

E365: Failed to print PostScript file

In my shell PRINTER is set (to "[EMAIL PROTECTED]"), and in gv I can print
(with "lpr -h [EMAIL PROTECTED]") without any problem.

Do you have an idea how to solve it?

 Thanks,

  Laszlo



Re: Project script

2007-03-23 Thread Mika Fischer
Hi Claus,

claus Atzenbeck schrieb:
> I started using the Project script
> . Apparently, it
> cannot gather files recursively in subdirectories, for example:
>
>   project/a/test.tex
>   project/b/c/abc.tex
>   project/d/e/xyz.tex

In the project window you can use "\c" to generate a new project fold.
It will ask you a few things an generate it for you. In your case you
may want to use "\C" which works recursively.

> Furthermore, whenever I add another .tex file somewhere in project/ or
> any of its subdirectories I would like to have it updated.

In the directory fold press "\r". Again "\R" works recursively, so you
can also press "\R" in the top level of the project.

See also :help project.txt

Regards,
 Mika


Re: Undo Levels Reset

2007-03-23 Thread A.J.Mechelynck

Vigil wrote:
When a file is saved with :w, any changes in the undo history are lost 
and I can't undo things to get back to a state before I saved the file. 
How can I prevent the history being lost?




Huh?

When I save a file, undo levels are kept. Using u then undoes, but marks the 
file as modified. Using Ctrl-R redoes, and the 'modified' flag will disappear 
when the file-in-memory is identical to the file-on-disk.


The undo history is only lost when I close Vim with :qa


Best regards,
Tony.
--
"You can't have everything.  Where would you put it?"
-- Steven Wright


Undo Levels Reset

2007-03-23 Thread Vigil
When a file is saved with :w, any changes in the undo history are lost and I 
can't undo things to get back to a state before I saved the file. How can I 
prevent the history being lost?


--

.


Re: Project script

2007-03-23 Thread A.J.Mechelynck

Claus Atzenbeck wrote:

Hi all:

I started using the Project script
. Apparently, it
cannot gather files recursively in subdirectories, for example:

project/a/test.tex
project/b/c/abc.tex
project/d/e/xyz.tex

I would like to have all *.tex files listed in Project, something like
that:

Projects=/home/user/project filter="*.tex" flags=??? {
 test.tex
 abc.tex
 xyz.tex
}

Furthermore, whenever I add another .tex file somewhere in project/ or
any of its subdirectories I would like to have it updated.

Did I overlook something or is the not possible?
Would there be an easy workaround?

Claus



I don't know about that script, but Vim has the special ** wildcard to recurse 
into directories.


See
:help starstar
:help starstar-wildcard


Best regards,
Tony.
--
"The Good Ship Enterprise" (to the tune of "The Good Ship Lollipop")

On the good ship Enterprise
Every week there's a new surprise
Where the Romulans lurk
And the Klingons often go berserk.

Yes, the good ship Enterprise
There's excitement anywhere it flies
Where Tribbles play
And Nurse Chapel never gets her way.

See Captain Kirk standing on the bridge,
Mr. Spock is at his side.
The weekly menace, ooh-ooh
It gets fried, scattered far and wide.

It's the good ship Enterprise
Heading out where danger lies
And you live in dread
If you're wearing a shirt that's red.
-- Doris Robin and Karen Trimble of The L.A. Filkharmonics


Re: question about omni-complete

2007-03-23 Thread A.J.Mechelynck

shawn bright wrote:

lo there,
i just discovered omni-complete . i am starting to use vim for some
python and ruby scripting for work. i found omni-complete. I can type
time.ctrl-x ctrl-o and a list of funtions pop up for me to choose.
but
how do i navigate the list without using arrow keys ? it is getting
kinda natrual to use jk to move up and down ( i find myself typing j
and k into other text editors)

what keys do i use to navigate and select the function from the list ?

thanks
sk



Try Ctrl-N (next) and Ctrl-P (previous), as mentioned under ":help 
i_CTRL-X_CTRL-O". The same keys are used for other kinds of Insert-mode 
completion.


IIUC, when you're at the first match, Ctrl-P goes back to what you typed 
without removing the menu: thus, you can type in more characters of context 
and the menu will change accordingly.



Best regards,
Tony.
--
If Jesus Christ were to come today, people would not even crucify him.
They would ask him to dinner, and hear what he had to say, and make fun
of it.
-- Thomas Carlyle


Re: Highlight a specific character using colorscheme?

2007-03-23 Thread A.J.Mechelynck

flope wrote:

Hi,
this is my second post. so I am new in vim (gvim).
I would like to know if it possible to highlight a specific character such
as ";" differently from others.
I tried different things but without success.  Should I do that in my color
scheme?


Don't use a colorscheme, use the ":match" statement (see ":help :match").

For instance, to highlight all semicolons in the same colour as the bracket 
under the cursor and its mate, (in gvim that would be black on cyan, unless 
changed by a colorscheme) use


:match MatchParen /;/



I use to edit perl scripts so If I load my colorscheme in the .gvimrc file
and the syntax is on, is the perl syntax overwritten by my color scheme? at
least some of the parameters?


A colour scheme has nothing to do with "syntax" (e.g. what is an Identifier 
and what is a Comment), it has everything to do with "colouring" (e.g., 
whether to show comments in blue on white, or in yellow on black). Syntax 
scripts are concerned with both.


A properly-built colorscheme should not be overridden by any properly-built 
syntax script. A syntax script should use the "default" modifier in all its 
":highlight" statements (so as not to override settings already set by a 
colorscheme) and it should use ":highlight default link" in preference to 
specific colours whenever possible. When ":syntax on" is used after your 
colorscheme has been set, the latter is (IIUC) re-invoked, thanks to the 
"g:colors_name" variable.




thank you for your help!!! 


My pleasure.

Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
132. You come back and check this list every half-hour.


Project script

2007-03-23 Thread Claus Atzenbeck
Hi all:

I started using the Project script
. Apparently, it
cannot gather files recursively in subdirectories, for example:

project/a/test.tex
project/b/c/abc.tex
project/d/e/xyz.tex

I would like to have all *.tex files listed in Project, something like
that:

Projects=/home/user/project filter="*.tex" flags=??? {
 test.tex
 abc.tex
 xyz.tex
}

Furthermore, whenever I add another .tex file somewhere in project/ or
any of its subdirectories I would like to have it updated.

Did I overlook something or is the not possible?
Would there be an easy workaround?

Claus


Re: Error

2007-03-23 Thread A.J.Mechelynck

Andreas Bakurov wrote:

felipe fernandez wrote:

I update vim 6.3 to 7.0 on my debian.  The error is
Se ha detectado un error al procesar /usr/share/vim/vim70/menu.vim:
línea  150
E121: Variable sin definir: paste#paste_cmd.
E15: Expresión no válida: 'vnoremenu 

Re: Error

2007-03-23 Thread A.J.Mechelynck

felipe fernandez wrote:

I update vim 6.3 to 7.0 on my debian.  The error is
Se ha detectado un error al procesar /usr/share/vim/vim70/menu.vim:
línea  150
E121: Variable sin definir: paste#paste_cmd.
E15: Expresión no válida: 'vnoremenu 

Re: Selecting tag opens file in a new tab - how?

2007-03-23 Thread A.J.Mechelynck

Zarko Coklin wrote:

I posted following question some time back:
~
Is it possible to have a setup in .vimrc so that every
time I select tag either through "CTRL-]" or by
holding CTRL and pressing left mouse click to open a
new buffer in a new tab?

and got following answer that works:
:map  :exe "tab stag" expand("")
:map  :exe "tab stag"
expand("")
~
The trouble I am having at the moment is that this
approach leads to a quick proliferation of open file
tabs. Ideally, Vim should not open a new tab for the
the file that already has a tab. Rather, it should
simply reuse an existing tab and position itself
within an open tab. Is there a way to get that done?

Thanks in advance,
Zarko


I think it is possible, but not easy, and would require writing a custom 
function, especially if you want to still be able to have split windows. I'm 
not going to try. You may want to try for yourself, or change your behaviour.


See, among others:
:help tabpagenr()
:help tabpagewinnr()
:help tabpagebuflist()
:help bufname()
etc.

Best regards,
Tony.
--
"When in doubt, tell the truth."
-- Mark Twain