REPEAT: Vim in combination with OpenVMS

2006-05-21 Thread Jansen of Lorkeers, Richard
Still no reaction, are there user of VIm with Open VMS??

-Oorspronkelijk bericht-
Van: Jansen of Lorkeers, Richard 
Verzonden: donderdag 18 mei 2006 7:43
Aan: vim@vim.org
Onderwerp: Vim in combination with OpenVMS


I have a general question concerning installation of VIM on a OpenVMS
systems. Who has experience with the installation of the software?

Richard


RE: html auto completion

2006-05-21 Thread Vu The Cuong
Dear Mechelynck

My vimrc file is as below:

set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

Based on your advice, I will remove  "source $VIMRUNTIME/mswin.vim". Is
it right?
But there is a line "behave mswin". Do I must remove this line also?
I just carefully confirm only. Thank you.


-Original Message-
From: A.J.Mechelynck [mailto:[EMAIL PROTECTED] 
Sent: Sunday, May 21, 2006 5:19 PM
To: Vu The Cuong
Cc: Mikolaj Machowski; vim@vim.org
Subject: Re: html auto completion

Vu The Cuong wrote:
> Thanks for the reply.
> My system is WInXP.
>   
>>  :so $VIMRUNTIME/mswin.vim
>> 
> You mean I must put above line into my vimrc file?
>   
We mean you must make sure it _isn't_ there, because it interferes with
the Ctrl-X which is the first key for all omni-completion commands --
mswin.vim maps it to "cut to clipboard".

You must also invoke filetype detection and filetype-specific plugins: 
to see if you've got them, enter ":filetype" without the quotes, the
answer should include "Filetype detection=ON plugin=ON". Filetype indent
may be on or off. If it isn't set, add "filetype plugin on" or "filetype
plugin indent on" to your vimrc.
>  
>   
>> Line in configuration scripts (it is remapping  required for 
>> omni-completion).
>> 
> I not understand clearly what you said.
> I know I bother you, but could you tell me more indetail? Many thanks.
> Suppose that I have "test.html" file.
> I opened it and started to typing:
> 
> But right after I finished typing >, vim did not auto close tag
 for me. 
> I think Omni auto completion is something like that. Isn't it?
> Thanks.
>
> [...]
>   
No.

Type bla1

Then type .

Do it again, you should get , do it again for  and so on
until you get to  after which there's nothing more you can
complete.

Depending on where the cursor is when you invoke omni-completion, you
may get possible tags, or (inside a tag) possible attributes, or after
attribute-name and equal sign possible values (if they are finite in
number, e.g., left/right/center/justify at 

Re: Help: The html file generated with the command :TOhtml doesn't look like the same as in VIM.

2006-05-21 Thread Japerlh

Thanks a lot for all you guys.

On 5/22/06, Japerlh <[EMAIL PROTECTED]> wrote:

Thanks a lot for all you guys.

On 5/19/06, Mark Woodward <[EMAIL PROTECTED]> wrote:
> Hi Japerlh,
>
> On Fri, 19 May 2006 18:13:21 +0800
> Japerlh <[EMAIL PROTECTED]> wrote:
>
> > The html file generated with the command :TOhtml doesn't look like the
> > same as in VIM.
> > Seems like font information is lost.
> > Is there anybody having any idea about that?
> > Thanks.
> >
> >
>
> stick something like the following in the 'head' section
>
> 
>   body,pre,span {
> font-family: Courier;
> font-size: 12px;
>   }
> 
>
>
> or configure it to output as CSS
>
> :let html_use_css = 1
>
> and tweak the CSS rules.
>
>
> Either way read:
>
> :h TOhtml
>
>
> All bets are off if you use a 'non standard' font in Vim.
> For example I use 'Crisp'. There would be very few people with
> that font installed on their system, so what *they* see will be
> totally different. If you must, configure the font-family like:
>
> font-family: Crisp, Courier, Monospace;
>
> ie check for Crisp. If not available check for Courier. If thats
> not available fall back to Monospace.
>
>
> cheers,
>
>
> --
> Mark
>


--

Besh wishes,
Japerlh




--

Besh wishes,
Japerlh


Re: Help: The html file generated with the command :TOhtml doesn't look like the same as in VIM.

2006-05-21 Thread Japerlh

Thanks a lot for all you guys.

On 5/19/06, Mark Woodward <[EMAIL PROTECTED]> wrote:

Hi Japerlh,

On Fri, 19 May 2006 18:13:21 +0800
Japerlh <[EMAIL PROTECTED]> wrote:

> The html file generated with the command :TOhtml doesn't look like the
> same as in VIM.
> Seems like font information is lost.
> Is there anybody having any idea about that?
> Thanks.
>
>

stick something like the following in the 'head' section


  body,pre,span {
font-family: Courier;
font-size: 12px;
  }



or configure it to output as CSS

:let html_use_css = 1

and tweak the CSS rules.


Either way read:

:h TOhtml


All bets are off if you use a 'non standard' font in Vim.
For example I use 'Crisp'. There would be very few people with
that font installed on their system, so what *they* see will be
totally different. If you must, configure the font-family like:

font-family: Crisp, Courier, Monospace;

ie check for Crisp. If not available check for Courier. If thats
not available fall back to Monospace.


cheers,


--
Mark




--

Besh wishes,
Japerlh


Re: VIM7.0: How to switch off the spell check function? Thanks a lot.

2006-05-21 Thread Japerlh

Thanks a lot for all you guys.

On 5/10/06, Pete Johns <[EMAIL PROTECTED]> wrote:

On Tue, 2006-05-09 at 11:50:29 +0800, Japerlh sent:
>VIM7.0: How to switch off the spell check function?
>
>The following command can be used to switch on the spell check.
>What is the command to turn it off?
>   :setlocal spell spelllang=en_us
>
I have the following in my .vimrc:

 Toggle Vim v7.0 Spell-Checking.
if (v:version >= 700)
set spell spelllang=en_au
nnoremap  :set spell! spell?
imap  
vmap  
endif

Hope this helps;


--paj
--
Pete Johns   
Tel/Fax numbers and IM information   
May The Fourth Be With You F...






--

Besh wishes,
Japerlh


Re: cmapping woes

2006-05-21 Thread Hari Krishna Dara

On Sun, 21 May 2006 at 3:12pm, Eric Arnold wrote:

> I've been trying to map "cd" if it's the first two characters on the
> :ex  line.  I've tried all the combinations I can think of.  On
> several of them, I seem to be getting errors as if  is run in
> the sandbox (that dog won't hunt).  The only one that works at all is
> the first simple mapping, but that gets painful, of course, when you
> want to use "cd" in a search, etc.
>
> Anybody know any good tricks?
>
>
> silent! cunmap cd
>
> cnoremap  cd call Cd_plus()
>
> "cnoremap  cd echo getcmdpos()
> "cnoremap  cd if getcmdpos() < 3  call Cd_plus() 
> else  call feedkeys('cd','n')  call setcmdpos(1)  end
> 
> "cnoremap   cd ( getcmdpos() == 1 ? Cd_plus() : 'cd' )
> "cnoremap   cd Cd_plus()
> "abbr   cd Cd_plus()
> "silent! unabbr cd

You should use the new  option and check if you are in the start
of the command from the function. You can then return "cd" or whatever
else you want. I have actually needed this same functionality for
myself, and created a plugin called cmdalias.vim. This was very
complicated to do prior to 7.0, but with the new  feature in 7.0,
it became a very simple plugin. Never the less, it is available at:

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

-- 
HTH,
Hari

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


Re: cmapping woes

2006-05-21 Thread Yakov Lerner

On 5/22/06, Eric Arnold <[EMAIL PROTECTED]> wrote:

I've been trying to map "cd" if it's the first two characters on the
:ex  line.  I've tried all the combinations I can think of.  On
several of them, I seem to be getting errors as if  is run in
the sandbox (that dog won't hunt).  The only one that works at all is
the first simple mapping, but that gets painful, of course, when you
want to use "cd" in a search, etc.

Anybody know any good tricks?


silent! cunmap cd

cnoremap  cd call Cd_plus()

"cnoremap  cd echo getcmdpos()
"cnoremap  cd if getcmdpos() < 3  call Cd_plus() 
else  call feedkeys('cd','n')  call setcmdpos(1)  end

"cnoremap   cd ( getcmdpos() == 1 ? Cd_plus() : 'cd' )
"cnoremap   cd Cd_plus()
"abbr   cd Cd_plus()
"silent! unabbr cd


The following works for me:

cnoremap cd =getcmdpos()==1?"MYCD ":'cd'

Notes
1. Don't use  on cabbrev (doesn't work, documented somewhere).
 on cmap sometimes doesn't work, too.

2. I think you're better off making your
own cd :command not just function.

Yakov


Re: cmapping woes

2006-05-21 Thread Gerald Lai

On Sun, 21 May 2006, Eric Arnold wrote:


I've been trying to map "cd" if it's the first two characters on the
:ex  line.  I've tried all the combinations I can think of.  On
several of them, I seem to be getting errors as if  is run in
the sandbox (that dog won't hunt).  The only one that works at all is
the first simple mapping, but that gets painful, of course, when you
want to use "cd" in a search, etc.

[snip]

"cnoremap   cd ( getcmdpos() == 1 ? Cd_plus() : 'cd' )

[snip]

This one ought to work. Remove "".

  cnoremap  cd ( getcmdpos() == 1 ? Cd_plus() : 'cd' )

HTH.
--
Gerald


cmapping woes

2006-05-21 Thread Eric Arnold

I've been trying to map "cd" if it's the first two characters on the
:ex  line.  I've tried all the combinations I can think of.  On
several of them, I seem to be getting errors as if  is run in
the sandbox (that dog won't hunt).  The only one that works at all is
the first simple mapping, but that gets painful, of course, when you
want to use "cd" in a search, etc.

Anybody know any good tricks?


silent! cunmap cd

cnoremap  cd call Cd_plus()

"cnoremap  cd echo getcmdpos()
"cnoremap  cd if getcmdpos() < 3  call Cd_plus() 
else  call feedkeys('cd','n')  call setcmdpos(1)  end

"cnoremap   cd ( getcmdpos() == 1 ? Cd_plus() : 'cd' )
"cnoremap   cd Cd_plus()
"abbr   cd Cd_plus()
"silent! unabbr cd


Help doc grammar mistakes

2006-05-21 Thread Gerald Lai

I noticed a grammar mistake at

  :help xfree-xterm
  scroll down 57 lines

Original:

  "... but not everybody is it using yet.]"

Should be:

  "... but not everybody is using it yet.]"

Also at

  :help hpterm-color
  scroll down 1 line

Original:

  "... for a hpterm ..."

Should be:

  "... for an hpterm ..."

--
Gerald


Re: folding lines at the top of file

2006-05-21 Thread Eric Arnold

On 5/21/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:

I want to fold lines grouped at the top of file
and matching some pattern. I use foldmethod=expr.
But vim does not behave as expected.

In the testcase, /a/. In the testfile (2) below, I want first 3
lines (a\na\na\n) folded, and nothing else folded. But vim also folds
the last a\na\n lines. I think this is vim bug.

Yakov
-
(1) the code

:set foldmethod=expr foldenable foldexpr=Foo()
function! Foo()
echomsg '>>'.v:lnum.(v:lnum>1 ? ' prev='.foldlevel(v:lnum-1) : '')
if v:lnum>1 && foldlevel(v:lnum-1) == 0
return 0
else
return getline(v:lnum) =~ 'a'
endif
endfun

(2) the testfile is
---
a
a
a
b
b
b
a
a
---



Well, I'm not entirely sure what is supposed to be happening from
looking at the docs, but this works:



function! Foo()
  echomsg '>>'.v:lnum.(v:lnum>1 ? ' prev='.foldlevel(v:lnum-1) : '')
. ', foldlevel=' . foldlevel(v:lnum - 1 )
  if (v:lnum>1 )&& (foldlevel(v:lnum-1) == -1)
   echomsg 'returning 0'
  return 0
  else
  echomsg 'returing ' . (getline(v:lnum) =~ 'a')
  return getline(v:lnum) =~ 'a'
  endif
endfun



If you just print out the value of foldlevel(v:lnum-1), you'll find
it's always -1 for unfolded lines in your test case.

It seems that the foldlevel isn't 0 when you think it is, and I'm not
sure whether that is right or wrong.  The docs say

As a special case the level of the
previous line is usually available.

"usually available" is kinda hard to deal with.


folding lines at the top of file

2006-05-21 Thread Yakov Lerner

I want to fold lines grouped at the top of file
and matching some pattern. I use foldmethod=expr.
But vim does not behave as expected.

In the testcase, /a/. In the testfile (2) below, I want first 3
lines (a\na\na\n) folded, and nothing else folded. But vim also folds
the last a\na\n lines. I think this is vim bug.

Yakov
-
(1) the code

:set foldmethod=expr foldenable foldexpr=Foo()
function! Foo()
   echomsg '>>'.v:lnum.(v:lnum>1 ? ' prev='.foldlevel(v:lnum-1) : '')
   if v:lnum>1 && foldlevel(v:lnum-1) == 0
   return 0
   else
   return getline(v:lnum) =~ 'a'
   endif
endfun

(2) the testfile is
---
a
a
a
b
b
b
a
a
---


Re: vim7: elflord got different

2006-05-21 Thread Yakov Lerner

On 5/21/06, Jabba Laci <[EMAIL PROTECTED]> wrote:

Hi,

> AFAIK, the colorscheme script is the same. However, let's try to guess
> what might cause a single colorscheme to display differently on
> different machines...
>
> Gvim or console Vim? How many colors does the colorscheme require? Are
> they all available on Debian? If in console Vim, do the Debian terminal
> and the Windows dos-box use the same color palette? (still for console
> Vim), are there differences between the display in /dev/tty (the
> "non-X", "hardware text" display) and in an xterm?

I have this problem in "normal" vim, with gvim colors are OK, like
before. I have this problem in xterm, and in console (non-X) too.
I don't know how to check how many colors are required by the scheme,
but before the system upgrade everything was fine.


xterm colors depend on X11 resources. To check xterm-related
X11 resources, you can do something like
   xrdb -query|grep XTerm

To see names of X resources tha affect xterm colors,
do ':he xfree-xterm' and scroll down 36  lines

Yakov


Re: vim7: elflord got different

2006-05-21 Thread Jabba Laci

Hi,


AFAIK, the colorscheme script is the same. However, let's try to guess
what might cause a single colorscheme to display differently on
different machines...

Gvim or console Vim? How many colors does the colorscheme require? Are
they all available on Debian? If in console Vim, do the Debian terminal
and the Windows dos-box use the same color palette? (still for console
Vim), are there differences between the display in /dev/tty (the
"non-X", "hardware text" display) and in an xterm?


I have this problem in "normal" vim, with gvim colors are OK, like
before. I have this problem in xterm, and in console (non-X) too.
I don't know how to check how many colors are required by the scheme,
but before the system upgrade everything was fine.

  Thanks,

  Jabba


Re[2]: Tables.

2006-05-21 Thread Alan G Isaac
On Sun, 21 May 2006, Gary apparently wrote: 
> Some very basic markup language that provides headers, 
> paragraphs, lists, and tables and that could be easily 
> translated to html, pdf, postscript, and simple text would 
> be well-adapted to my needs. 

http://docutils.sourceforge.net/rst.html 
http://skawina.eu.org/mikolaj/vst.html

hth,
Alan Isaac






Re: cindent/smartindent, >> and #

2006-05-21 Thread Yakov Lerner

On 5/21/06, Andre Majorel <[EMAIL PROTECTED]> wrote:

Is there any way to have the functionality of cindent/smartindent
and still have ">>" indent lines beginning with "#" ?


Try this:

   :set cinkeys-=#

vim manual says:

If the 'smartindent' option is on, or 'cindent' is on and 'cinkeys' contains
'#', shift right does not affect lines starting with '#' (these are supposed
to be C preprocessor lines that must stay in column 1).

Yakov


missing system functions in .vim/systags

2006-05-21 Thread Yakov Lerner

I created systags per ':help ft-c-omni' suggestion:
  ctags -R -f ~/.vim/systags /usr/include /usr/local/include
and added systags to &tags (set tags+=~/.vim/systags).

Now I find that system() does not
appear in ~/.vim/systags generated as above. This is Linux, and
prototype for system() appears in /usr/include/stdlib.h

I realize this is ctags issue not vim issue, but maybe
someone knows what's the deal ? This is Linux

Yakov


cindent/smartindent, >> and #

2006-05-21 Thread Andre Majorel
Is there any way to have the functionality of cindent/smartindent
and still have ">>" indent lines beginning with "#" ?

Thanks in advance.

-- 
André Majorel http://www.teaser.fr/~amajorel/>
Do not use this account for regular correspondence.
See the URL above for contact information.


Re: html auto completion

2006-05-21 Thread A.J.Mechelynck

Vu The Cuong wrote:

Thanks for the reply.
My system is WInXP.
  

 :so $VIMRUNTIME/mswin.vim


You mean I must put above line into my vimrc file?
  
We mean you must make sure it _isn't_ there, because it interferes with 
the Ctrl-X which is the first key for all omni-completion commands -- 
mswin.vim maps it to "cut to clipboard".


You must also invoke filetype detection and filetype-specific plugins: 
to see if you've got them, enter ":filetype" without the quotes, the 
answer should include "Filetype detection=ON plugin=ON". Filetype indent 
may be on or off. If it isn't set, add "filetype plugin on" or "filetype 
plugin indent on" to your vimrc.
 
  

Line in configuration scripts (it is remapping  required for
omni-completion).


I not understand clearly what you said.
I know I bother you, but could you tell me more indetail? Many thanks.
Suppose that I have "test.html" file.
I opened it and started to typing:

But right after I finished typing >, vim did not auto close tag  for me. 
I think Omni auto completion is something like that. Isn't it?

Thanks.

[...]
  

No.

Type bla1

Then type . 
Do it again, you should get , do it again for  and so on 
until you get to  after which there's nothing more you can complete.


Depending on where the cursor is when you invoke omni-completion, you 
may get possible tags, or (inside a tag) possible attributes, or after 
attribute-name and equal sign possible values (if they are finite in 
number, e.g., left/right/center/justify at 

See
   :help compl-omni
   :help i_CTRL-X_CTRL-O
   :help ft-html-omni
etc.
  



Best regards,
Tony.


RE: html auto completion

2006-05-21 Thread Vu The Cuong
Thanks for the reply.
My system is WInXP.
>  :so $VIMRUNTIME/mswin.vim
You mean I must put above line into my vimrc file?
 
>Line in configuration scripts (it is remapping  required for
>omni-completion).
I not understand clearly what you said.
I know I bother you, but could you tell me more indetail? Many thanks.
Suppose that I have "test.html" file.
I opened it and started to typing:

But right after I finished typing >, vim did not auto close tag  for 
me. 
I think Omni auto completion is something like that. Isn't it?
Thanks.

 

-Original Message- 
From: Mikolaj Machowski [mailto:[EMAIL PROTECTED] 
Sent: Sat 5/20/2006 8:40 PM 
To: vim@vim.org 
Cc: 
Subject: Re: html auto completion



Dnia sobota, 20 maja 2006 07:11, Vu The Cuong napisał:
> I'm new to vim and I tried a couple of hours to make html auto -
> completion feature to work.
> But had no result. Could anyone tell me how to config vim to turn on
> html auto - completion?

What system? If MS-Windows get rid of::

:so $VIMRUNTIME/mswin.vim

Line in configuration scripts (it is remapping  required for
omni-completion).

If it is no MS-Windows tell exactly what you are doing, error messages,
example of file.

m.





Re: right-to-left text selection

2006-05-21 Thread Jared
On 5/20/2006 7:21 PM, Gerald Lai wrote:
>> Hi, Gerald.  Thanks for the reply.  This is a pretty creative suggestion,
>> but I can't get it to work quite right.  I tried adding this to my
>> .vimrc:
>>
>> nnoremap <2-LeftMouse> viwo
>> vnoremap <2-LeftDrag>  
> 
> Yes, Vim should recognize the <2-LeftDrag> event. I verified your
> problem and found out what happened :)
> 
> Stripping down my mappings led me to the solution. Add this extra
> mapping:
> 
>   nnoremap  

That did it!  Thanks again for the help, Gerald.  With this I'm finally able
to mark the last thing of my vimrc todo list.  :-)

--
Jared