Re: $VIMRUNTIME

2006-04-10 Thread Pete Johns
On Tue, 2006-04-11 at 11:20:42 +0530, jagpreet sent:
>Well I'll try as suggested.  Please do let me know if I need to
>add anylines to .vimrc file to get these scripts(inside .vim)
>activated. Also, Please update me if I need to copy the scripts
>already present in VIMRUNTIME to my local directory structure
>inside .vim.
>
If you are using MS Windows, as your mailer suggests, you need to
create $HOME/vimfiles rather than $HOME/.vim . You will not need
to copy the system-wide runtime files into your own directory.
Full details on where Vim looks for these files can be found by
consulting:

:help vimfiles


>Also, as I saw in the VIMRUNTIME path there are lots of
>directories and each directory is contaning scripts. e.g.
>Syntax.  Does these scripts gets activated when I open any file
>in vim or I need to give any command in .vimrc file to do the
>same.
>
These files are normally loaded automatically as they are needed.
See 

:help :syn-qstart

For a quick guide to hoe syntax files are loaded.

Hope this helps;

-- 
Pete Johns   
Tel/Fax numbers and IM information:  
Time for an update 


pgpnj4LVIIYPQ.pgp
Description: PGP signature


RE: $VIMRUNTIME

2006-04-10 Thread jagpreet
Thanks Yakov.

Well I'll try as suggested.
Please do let me know if I need to add anylines to .vimrc file to get these
scripts(inside .vim) activated. Also, Please update me if I need to copy the
scripts already present in VIMRUNTIME to my local directory structure inside
.vim.

Also, as I saw in the VIMRUNTIME path there are lots of directories and each
directory is contaning scripts. e.g. Syntax.
Does these scripts gets activated when I open any file in vim or I need to
give any command in .vimrc file to do the same.

~regards~
jagpreet



-Original Message-
From: Yakov Lerner [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 10, 2006 7:32 PM
To: [EMAIL PROTECTED]
Cc: Vim mailing list
Subject: Re: $VIMRUNTIME

On 4/10/06, jagpreet <[EMAIL PROTECTED]> wrote:
>I just access to my home directory and don't have any access at all to
> the folders where vim is installed. /usr/share/vim/*
>
> Also, I downloaded some utility scripts from the site and want to use it.
> But for that I need to put the .vim scripts in $VIMRUNTIME directory
> structure as specified in the scripts installation.
> I don't have permission to write to those directories.

Those installation instructions are wrong. *Don't* put anything
into global $VIMRUNTIME. Do as follows. Create directory $HOME/.vim/plugin
(or $HOME/.vim/syntax $HOME/.vim/colors etc) and put new script under
$HOME/.vim/something. The "runtime" command will pick it from there
just as well as if it were under global vimruntime. If you look
attentively at the default value of 'set runtimepath?', you'll see that
it already contains $HOME/.vim.

> " let $VIMRUNTIME = ; "
Don't do it. Just do what I described above, it's enough.

Yakov




ruby omnicomplete function

2006-04-10 Thread Mark Guzman
Hi all,
  I've hacked complete.rb and some of the omni-complete functions in cvs
to create a ruby function. It works for me, ymmv, may cause headaches.
You can find it at
http://blog.hasno.info/blog/segfault/dev/2006/04/10/vim-7-ruby-omni-completion.html
Any input is welcome.
  --mark

-- 
sic transit gloria et adulescentia 
blog | http://blog.hasno.info/blog
wiki | http://wiki.hasno.info



Re: weird LaTeX highlighting in updated vim6.4

2006-04-10 Thread Benji Fisher
On Mon, Apr 10, 2006 at 11:06:12PM -0300, Luis A. Florit wrote:
> Hi all,
> 
> I've always had some special highlighting for TeX
> files. For example, I have the following syn for "$$":
> 
> hi dollars cterm=bold ctermfg=7 ctermbg=4 guifg=white guibg=blue
> syn match dollars /\(\$\$\|\\\[\|\\\]\)/
> 
> It always worked nicely, but since I upgraded to FC5,
> and then from vim6.3 to vim6.4, the highlighting only
> works BEFORE the '\begin{document}', and not after
> (not very useful...). This persist even if I remove
> my .vimrc, or my .vim directory, so it is some new
> problem with version 6.4.
> 
> Any idea about what is happening??
> 
> Thanks a lot,
> 
> Luis.

 Probably your $$ occurs inside some syntax region, so it is not
recognized.  A simple fix might be to add "containedin=ALL" to the "syn
match" line.

:help containedin

> PS:
> BTW, we are receiving a several spam and virus from vim mailing list.
> Not that matters a lot to me, with Linux, SpamAssassin and Clamav,
> but for windows users... The strange thing is that I needed to change
> my "From " first header through sendmail to be able to post in Vim
> mailing list: the most strict list I belong, and the only one with SPAM.
> Perhaps some tunning needed?
> 
> Thanks again.  L.

 Since there was a big problem with the mail servers a few weeks
ago, I think the plan is to move the lists to a new server ASAP after
vim 7.0 is released.  I expect some tuning (tunning?) to take place
then.

HTH --Benji Fisher


Re: Why does session loading trash settings?

2006-04-10 Thread Benji Fisher
On Mon, Apr 10, 2006 at 05:35:51PM -0700, Eric Arnold wrote:
> 
> When I load a session, it's almost as if I had never sourced the
> .vimrc.  I can see how it might want reset some stuff in order to get
> a clean slate, but if so why isn't at least restarting with my default
> environment, i.e. .vimrc and .gvimrc?  And I'm not sure yet, but I
> think that it's clearing some other stuff that it isn't saving.
> 
> My highlighting reverts, and some mappings and vars aren't set, and
> some of my app.s start barfing.  Is this all normal somehow?  It's the
> same for Vim6 and 7. I'm wondering if it clears stuff/vars that are
> auto loaded from the plugin directory, etc.
> 
> Having to re-source .vimrc isn't that bad, but having mysterious
> complaints from apps makes me shy away from the session commands.

 Please describe what you do in a way that someone else can try to
reproduce the problem.  Try to give an example where the vimrc file and
session file are as simple as possible, perhaps by commenting out most
of the file or by adding

:finish

to skip most of it.

HTH --Benji Fisher


Re: vim7 + backspace

2006-04-10 Thread Benji Fisher
On Mon, Apr 10, 2006 at 10:43:20PM +0200, Tobias Pflug wrote:
> hello list, 
> 
> I just compiled vim 7.0 to give it a try. One of the first things I
> noticed was that backspace stopped working. I checked :he fix
> and tried everything mentioned there. But neither fix/fixdel nor 
> fixing the keycoda via:
> 
>  echo "keycode 14 = BackSpace" | loadkeys
> 
> had any effects.
> 
> Any ideas ?
> 
> regards,
> Tobi

 In what way is it not working?

 If you are compiling your own version of vim after getting used to
someone else's distribution, you may be missing a system vimrc file that
was included in the distribution.  In particular, try

:set backspace=indent,eol,start
:help 'backspace'

HTH --Benji Fisher


weird LaTeX highlighting in updated vim6.4

2006-04-10 Thread Luis A. Florit
Hi all,

I've always had some special highlighting for TeX
files. For example, I have the following syn for "$$":

hi dollars cterm=bold ctermfg=7 ctermbg=4 guifg=white guibg=blue
syn match dollars /\(\$\$\|\\\[\|\\\]\)/

It always worked nicely, but since I upgraded to FC5,
and then from vim6.3 to vim6.4, the highlighting only
works BEFORE the '\begin{document}', and not after
(not very useful...). This persist even if I remove
my .vimrc, or my .vim directory, so it is some new
problem with version 6.4.

Any idea about what is happening??

Thanks a lot,

Luis.

PS:
BTW, we are receiving a several spam and virus from vim mailing list.
Not that matters a lot to me, with Linux, SpamAssassin and Clamav,
but for windows users... The strange thing is that I needed to change
my "From " first header through sendmail to be able to post in Vim
mailing list: the most strict list I belong, and the only one with SPAM.
Perhaps some tunning needed?

Thanks again.  L.


Why does session loading trash settings?

2006-04-10 Thread Eric Arnold

When I load a session, it's almost as if I had never sourced the .vimrc.  I can
see how it might want reset some stuff in order to get a clean slate, but if so
why isn't at least restarting with my default environment, i.e. .vimrc and
.gvimrc?  And I'm not sure yet, but I think that it's clearing some other stuff
that it isn't saving.

My highlighting reverts, and some mappings and vars aren't set, and some of my
app.s start barfing.  Is this all normal somehow?  It's the same for Vim6 and
7. I'm wondering if it clears stuff/vars that are auto loaded from the plugin
directory, etc.

Having to re-source .vimrc isn't that bad, but having mysterious complaints
from apps makes me shy away from the session commands.






Re: vim7: syntax highlighting and visual selections

2006-04-10 Thread Gary Johnson
On 2006-04-11, James Oliver <[EMAIL PROTECTED]> wrote:

> One difference to Vim 6.4 (from the Debian Etch) I found is the
> behavior with visual selections. When I selected syntax highlighted
> text with Vim 6.4 the selected text was black/white. With Vim 7.0(c|d)
> (compiled by myself) this has changed to be also colorful. That way
> it's very hard/impossible for me to read. Screenshots are at
> http://dirowsd.tripod.com/vim/vim-highlighting.html
> 
> Is there any way to change this?

I also found visually-selected text to be impossible to read
with vim-7.0b.  I had also been using vim-6.4.  I was about to 
submit a bug report when I realized that ever since I started using 
vim with a 16-color xterm, with white text on a black background, I 
had left 'background' set to "light".  At this point, fixing that 
won't be easy, so I worked around it for now by adding this to my
~/.vimrc:

if v:version >= 700
highlight clear Visual
highlight Visual term=reverse cterm=reverse gui=reverse guifg=Grey 
guibg=fg
endif

I just copied the vim-6.4 highlight values by running vim-6.4,
executing ":hi", and copying the Visual row into my ~/.vimrc,
followed by a little editing.

HTH,
Gary

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


vim7: syntax highlighting and visual selections

2006-04-10 Thread James Oliver
Hi,

I have tried Vim 7.0c and Vim 7.0d and it's great work, thanks so much
to all involved.

One difference to Vim 6.4 (from the Debian Etch) I found is the
behavior with visual selections. When I selected syntax highlighted
text with Vim 6.4 the selected text was black/white. With Vim 7.0(c|d)
(compiled by myself) this has changed to be also colorful. That way
it's very hard/impossible for me to read. Screenshots are at
http://dirowsd.tripod.com/vim/vim-highlighting.html

Is there any way to change this?

Thanks for your answer,
James


Re: has anybody done syntax highlighting for linux Kconfig files ?

2006-04-10 Thread Yakov Lerner
On 4/11/06, Nikolai Weibull <[EMAIL PROTECTED]> wrote:
> On 4/10/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> > I found no syntax highlighting for Kconfig files (linux kernel 
> > configuration).
> > I searched in vim7 runtime, and in vim.org/scripts, and in google.
> >
> > If anybody created Kconfig highlighting already, please post it either
> > to vim.org/scripts or for inclusion into vimruntime,
> > or send it to me, I am willing to maintain it. If not, I'll make it.
>
> As per your request, here's a syntax/kconfig.vim.

Nice job Nikolai, thanks.
I went though all 2.6 Kconfig files and noticed some mishighlightings.
I extracted them into the attchment, which see (with :set ft=kconfig').

Another issue that I noticed:
when scrolling backward (PgUp) on large Kconfig file,
I get  many many unhighlighted lines, sometimes
half-screen of them, which get highlighted when I do Ctrl-L.
Maybe 'syn sync' values shall be adjusted
(screen height was ~ 50, i it's relevant) ?

Thanks
Yakov


Kconfig.mishighlitings
Description: Binary data


Re: has anybody done syntax highlighting for linux Kconfig files ?

2006-04-10 Thread Nikolai Weibull
On 4/10/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> I found no syntax highlighting for Kconfig files (linux kernel configuration).
> I searched in vim7 runtime, and in vim.org/scripts, and in google.
>
> If anybody created Kconfig highlighting already, please post it either
> to vim.org/scripts or for inclusion into vimruntime,
> or send it to me, I am willing to maintain it. If not, I'll make it.

As per your request, here's a syntax/kconfig.vim.  It's rather
complete, although the documentation for the fileformat was
incomplete.  Still, writing parsers using only Vim's :syntax command
is quite fun actually.  The files are lit up like a christmas tree at
the moment, perhaps more to show that everything works than anything
else, but it's not that bad as it clearly separates the help messages
from the cruft around them.  Comments on making the actual
highlighting a little less "verbose" are welcome.

I've also included a ftplugin/kconfig.vim.

Bram: You can add these with the following matcher in filetype.vim:

  au BufNewFile,BufRead Kconfig,Kconfig.debug setf kconfig

Enjoy.

  nikolai
" Vim filetype plugin file
" Maintainer:   Nikolai Weibull <[EMAIL PROTECTED]>
" Latest Revision:  2006-04-10

if exists("b:did_ftplugin")
  finish
endif
let b:did_ftplugin = 1

let b:undo_ftplugin = "setl com< cms< fo<"

setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql


" Vim syntax file
" Maintainer:   Nikolai Weibull <[EMAIL PROTECTED]>
" Latest Revision:  2006-04-10

if exists("b:current_syntax")
  finish
endif

let s:cpo_save = &cpo
set cpo&vim

syn match   kconfigBegin  '^' nextgroup=kconfigKeyword
  \ skipwhite

syn keyword kconfigTodo   contained TODO FIXME XXX NOTE

syn match   kconfigCommentdisplay '#.*$' contains=kconfigTodo

syn keyword kconfigKeywordconfig nextgroup=kconfigSymbol
  \ skipwhite

syn keyword kconfigKeywordmenuconfig nextgroup=kconfigSymbol
  \ skipwhite

syn keyword kconfigKeywordcomment menu mainmenu
  \ nextgroup=kconfigKeywordPrompt
  \ skipwhite

syn keyword kconfigKeywordchoice
  \ [EMAIL PROTECTED]
  \ skipwhite skipnl

syn keyword kconfigKeywordendmenu endchoice

syn keyword kconfigPreProcsource
  \ nextgroup=kconfigPath
  \ skipwhite

" TODO: This is a hack.  The who .*Expr stuff should really be generated so
" that we can reuse it for various nextgroups.
syn keyword kconfigConditionalif endif
  \ [EMAIL PROTECTED]
  \ skipwhite

syn match   kconfigKeywordPrompt  '"[^"\\]*\%(\\.[^"\\]*\)*"'
  \ contained
  \ [EMAIL PROTECTED]
  \ skipwhite skipnl

syn match   kconfigPath   '"[^"\\]*\%(\\.[^"\\]*\)*"\|\S\+'
  \ contained

syn match   kconfigSymbol '\<\k\+\>'
  \ contained
  \ [EMAIL PROTECTED]
  \ skipwhite skipnl

" FIXME: There is – probably – no reason to cluster these instead of just
" defining them in the same group.
syn cluster kconfigConfigOptions  contains=kconfigTypeDefinition,
  \kconfigInputPrompt,
  \kconfigDefaultValue,
  \kconfigDependencies,
  \kconfigReverseDependencies,
  \kconfigNumericalRanges,
  \kconfigHelpText,
  \kconfigDefBool,
  \kconfigOptional

syn keyword kconfigTypeDefinition bool tristate string hex int
  \ contained
  \ nextgroup=kconfigTypeDefPrompt,
  \   @kconfigConfigOptions
  \ skipwhite skipnl

syn match   kconfigTypeDefPrompt  '"[^"\\]*\%(\\.[^"\\]*\)*"'
  \ contained
  \ nextgroup=kconfigConfigOptionIf,
  \   @kconfigConfigOptions
  \ skipwhite skipnl

syn keyword kconfigInputPromptprompt
  \ contained
  

vim7 + backspace

2006-04-10 Thread Tobias Pflug
hello list, 

I just compiled vim 7.0 to give it a try. One of the first things I
noticed was that backspace stopped working. I checked :he fix
and tried everything mentioned there. But neither fix/fixdel nor 
fixing the keycoda via:

 echo "keycode 14 = BackSpace" | loadkeys

had any effects.

Any ideas ?

regards,
Tobi



Re: Recursion in mappings

2006-04-10 Thread Yakov Lerner
On 4/10/06, Bertram Scharpf <[EMAIL PROTECTED]> wrote:
> I read vim tip #1198 and I'm amazed the recursion doesn't
> lead to a stack overflow. I tried to force one and waited
> for estimately 150M executions:
>
>   map  :if strlen(getline("."))<78\|exec "norm 
> Ax\e"\|else\|pu_\|endif\|redraw
>
> Can I rely on this and if yes, why?

Bertram,

:help recursive_mapping
and
:help 'maxmapdepth'
explains some of it.

The  :help 'maxmapdepth' explains why 'maxmapdepth' does not apply
to "tail recursion" case.

I think that with "tail recursion" recursive mappings,
vim memory does not grow (confirmed by your experiment.)

I think C recursion or stack grows is *not* involved in processing of
recursive mappings, I think the code manipulates the input queue.
This is my guess though.

You can read more about general notion of "tail recursion" at
http://en.wikipedia.org/wiki/Tail_call

Yakov


Re: persistent tabstop per-file ? (viminfo)

2006-04-10 Thread Gerald Lai

On Mon, 10 Apr 2006, Russell Bateman wrote:

I'm guessing I'm not answering the real question, Yakov, for I recognize you 
as one of the frequent responders to this list and therefore someone who 
knows better than I. Nevertheless, I promised and answer here and someone 
else may be waiting on it even though it falls short of what you wanted. This 
particular trick has solved all my problems in juggling two separate tab 
formats at my workplace:


/* vim: tabstop=3:shiftwidth=3:noexpandtab
*/

This is what I put in the files I want entabbed at 3 with tabs instead of 
spaces, not the normal format of files for the rest of my development group.


Also, I found I had to put the statement across two lines like that or Vim 
wouldn't take it. I don't remember why, just that this is what I ended up 
with.

[snip]

The reason why you have to put the statement across two lines is because
you're using the first form of modelines that does not allow any text to
come after the options. See ":help modeline".

Based on your example, here is the second form:

  /* vim: set tabstop=3 shiftwidth=3 noexpandtab: */

Hope this helps.
--
Gerald


Re: Vim Job board?

2006-04-10 Thread Bertram Scharpf
Hi,


first thank you all very much for the backings.  I'm on the
way losing trust in my own mind.

Could this be normal?  I've been in two jobs during the past
year and not one of these well-paid colleagues calling
themselves degreed software engineers does even know about
Vim (neither Emacs).  None of them is having Linux at home.
Extrapolating from this I don't expect my next job being
much better.

Is this a problem typical to Germany?

Am Montag, 10.  Apr 2006, 08:19:54 +0100 schrieb Matthew Winn:
> On Sun, Apr 09, 2006 at 08:43:35PM +0200, Bertram Scharpf wrote:
> > Therefore I like to ask vice versa: Is there anywhere
> > on the web a job board for Vimmers? I'm thinking of
> > something like .
> 
> Does it make sense to have jobs for Vimmers?  An editor is just a tool
> used to do a job.  It's not a job in itself.

I just try to sieve against those who don't even use one or
another reasonable tool.

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de


Recursion in mappings

2006-04-10 Thread Bertram Scharpf
Hi,

I read vim tip #1198 and I'm amazed the recursion doesn't
lead to a stack overflow. I tried to force one and waited
for estimately 150M executions: 

  map  :if strlen(getline("."))<78\|exec "norm 
Ax\e"\|else\|pu_\|endif\|redraw

Can I rely on this and if yes, why?

Bertram

-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de


Re: persistent tabstop per-file ? (viminfo)

2006-04-10 Thread Russell Bateman
I'm guessing I'm not answering the real question, Yakov, for I recognize 
you as one of the frequent responders to this list and therefore someone 
who knows better than I. Nevertheless, I promised and answer here and 
someone else may be waiting on it even though it falls short of what you 
wanted. This particular trick has solved all my problems in juggling two 
separate tab formats at my workplace:


/* vim: tabstop=3:shiftwidth=3:noexpandtab
*/

This is what I put in the files I want entabbed at 3 with tabs instead 
of spaces, not the normal format of files for the rest of my development 
group.


Also, I found I had to put the statement across two lines like that or 
Vim wouldn't take it. I don't remember why, just that this is what I 
ended up with.


Hope this helped someone. I know that, a couple of months back when I 
started at this new company, it would have helped me.


Russ



Russell Bateman wrote:

Yakov,

I know how to do this, but the only example I have of it is at work 
and I won't be there until tomorrow.


It involves putting something like this at the top or bottom of the file:

/*
* vim set tabstop 4:shiftwidth 3:autoindent */

Anything you can specify using set in ex will get processed in place 
of what you have in your .vimrc/_vimrc file. I will give you exact 
details tomorrow because I'm certain this syntax isn't spot on as I've 
done it here. Since I entab all files at 3 at home, and only mix 3 and 
4 at work, I realize I don't have an example to look at. I think there 
is help for this in Vim, but I don't remember the topic and I also 
found something peculiar about the number of lines for this thing.


Tomorrow,

Russ

Yakov Lerner wrote:


Some of the files I use are 8-tabbed, some are 4-tabbed.
These files are readonly, so modelines are not an option.
(I am talking about \t tabs, not about vim7 tabpages).

Viminfo remembers last position in the file. When I
reopen file, vim remembers last position.

Is there any way to tell vim to remember the last tabstop-related
options per file in the viminfo ?

Thanks
Yakov


 








Vim version 7.0d BETA has been released

2006-04-10 Thread Bram Moolenaar


Announcing:  Vim (Vi IMproved) version 7.0d BETA


This is the third BETA release of Vim 7.  It appears to be quite stable
and about ready for daily use, but I would like to do some more testing
to be sure.


Since the second BETA release quite a few things were improved, here is
a summary:
- $MYVIMRC is set to to the first found .vimrc file and $MYGVIMRC to the
  first found .gvimrc file.  Added menu item "Startup Settings" that
  edits the $MYVIMRC file
- Added matcharg().
- The tab page labels are shortened, directory names are reduced to a
  single letter by default.  Added the pathshorten() function to allow a
  user to do the same.
- Added CTRL-W gf: open file name under the cursor in a new tab page.
- "New tab" item in the GUI tabline menu opens tab left of the click.
- Added "usetab" to 'switchbuf': jump to window in other tab page.
- Added tabpage-local variables t:var.
- 'cmdheight' now works local to a tab page.
- Motif: Added GUI tab pages line. (Yegappan Lakshmanan)
- Win32: The font used for the tab page labels was too big.  Use the
  system menu font. (George Reilly)
- Use of the Enter key for the popup menu works differently, hopefully
  better.
- Win32: Set the default for 'isprint' back to the wrong default
  "@,~-255", because many people use Windows-1252 while 'encoding' is
  "latin1".
- When init_spellfile() finds a writable directory in 'runtimepath' but
  it doesn't contain a "spell" directory, create one.
- A series of bug fixes, see the end of ":help version7".

Since Vim 6.4 many new features have been added.  To mention a few:

- Spell checking support for about 50 languages
- Intelligent completion: Omni completion
- Tab pages, each containing multiple windows
- Undo branches: never accidentally lose text again
- Vim script supports Lists and Dictionaries (similar to Python)
- Vim script profiling
- Improved Unicode support
- Highlighting of matching parens, cursor line and cursor column
- Translated manual pages support.
- Internal grep; works on all platforms, searches compressed files
- Browsing of remote directories, zip and tar archives
- Printing multi-byte text

Once you have installed Vim 7.0d BETA you can find details about the
changes since Vim 6.4 with ":help version7".  There are also a lot of
bug fixes.


Testing
---

This is a BETA test version.  Please give it a good test and report
anything that isn't right.  That includes a crash but also a typo in the
documentation.

A known problem is that generating the Hungarian spell file doesn't
work.

I will not make an Amiga or OS/2 binary for Vim 7.  A Mac version should
be available soon on http://macvim.org/


Where to get it
---

Information about which files to download for what system:
http://www.vim.org/download.php

All files can be found below this directory:
ftp://ftp.vim.org/pub/vim/unstable/

A list of mirror sites can be found here:
http://www.vim.org/mirrors.php

Vim 7.0d is also available from CVS and with Aap:
http://www.vim.org/develop.php


An overview of the files:

UNIX:
unix/vim-7.0d.tar.bz2   sources + runtime files, bzip2 compressed

VARIOUS:
extra/vim-7.0d-extra.tar.gz extra files
extra/vim-7.0d-lang.tar.gz  multi-language files
doc/vim70dhtml.zip  help files converted to HTML

MS-WINDOWS:
pc/gvim70d.exe  self-installing, includes all runtime files
pc/vim70drt.zip runtime files
pc/vim70dlang.zip   files for translated messages and menus
pc/gvim70d.zip  GUI binary for Windows 95/98/NT/2000/XP
pc/gvim70dole.zip   GUI binary with OLE support
pc/vim70dd16.zip16 bit console version for MS-DOS
pc/vim70dd32.zipconsole version for MS-DOS/Windows 95/98
pc/vim70dw32.zipconsole version for Windows NT/2000/XP
pc/vim70dsrc.zipsources for PC (with CR-LF)

DIFFS TO PREVIOUS BETA:
unix/vim-7.0c-7.0d.diff.gz  sources + runtime files
extra/vim-7.0c-7.0d-extra.diff.gz   extra files
extra/vim-7.0c-7.0d-lang.diff.gzmulti-language files


Mailing lists
-

For user questions you can turn to the Vim mailing list.  There are a
lot of tips, scripts and solutions.  You can ask your Vim questions, but
only if you subscribe.  See http://www.vim.org/maillist.php#vim

If you want to help Vim development or get the latest patches, subscribe
to the vim-dev mailing list.  See http://www.vim.org/maillist.php#vim-dev

Subject specific lists:
Multi-byte issues: http://www.vim.org/maillist.php#vim-multibyte
Macintosh issues:  http://www.vim.org/maillist.php#vim-mac

Before you ask a question you should search the archives, someone may
already have given the answer.


Reporting bugs
--

Send them to <[EMAIL PROTECTED]>.  Please describe the problem precisely.
All the time spent on answering mail is subtracted from the time that is
spent on improving Vim!  Always give a reproducible example 

Re: LaTeX syntax highlighting

2006-04-10 Thread Yakov Lerner
Put it into your ~/.vimrc

Yakov

On 4/10/06, Marco Kunze <[EMAIL PROTECTED]> wrote:
> Hello Yakov,
>
> :match ToDo /(TODO.*)/
>
> did it :-)
>
> Thank you very much. I tried to put it into a vim line like
> vim:match ToDo /(TODO.*)/
>
> but it says that the option "match" is not available. In the documentation I
> didn't find any hints how to do this. Any ideas?
>
> Again, thanks for your help.
>
> Marco
>
> Yakov Lerner wrote:
> > On 4/10/06, Marco Kunze <[EMAIL PROTECTED]> wrote:
> >> Hi,
> >>
> >> I often use things like
> >> (TODO blablabla)
> >> in my LaTeX documents in order to mark todos. However these are not 
> >> highlighted
> >> as usual since they are not within a comment environment. Since LaTeX has 
> >> no
> >> comments which can be used within a line (like /* ... */) I don't want to 
> >> use
> >> normal comments, it would make me use a whole line for every todo and 
> >> render the
> >> text mostly unreadable.
> >>
> >> So I wanted to ask if there is a fast and simple hack to make vim highlight
> >> something like (TODO ...) as a comment environment with the TODO 
> >> highlighted in
> >> the TODO style.
> >>
> >> Unfortunately I don't have the time to try this by myself, I guess my 
> >> approach
> >> would be to write a new LaTeX-highlighting file and include the old one, 
> >> then
> >> extending it with the new grammar. But I really don't have the time to try 
> >> this
> >> by myself.
> >
> > Try
> > syn match ToDo /TODO.*$/
> > or
> > syn keyword ToDo /TODO/
> > or
> > match ToDo /TODO.*$/
>


Re: restore function

2006-04-10 Thread Tim Chase

If I wrongly set  nnoremap w k in my command mode, how
to restore the function of "w"?


nunmap w


This is also the command for creating a mapping in 
parochial-school-mode. :*)


(I hope I don't get my knuckles smacked with a ruler for 
that one...)


-tim







Re: LaTeX syntax highlighting

2006-04-10 Thread Marco Kunze

Hello Yakov,

:match ToDo /(TODO.*)/

did it :-)

Thank you very much. I tried to put it into a vim line like
vim:match ToDo /(TODO.*)/

but it says that the option "match" is not available. In the documentation I 
didn't find any hints how to do this. Any ideas?


Again, thanks for your help.

Marco

Yakov Lerner wrote:

On 4/10/06, Marco Kunze <[EMAIL PROTECTED]> wrote:

Hi,

I often use things like
(TODO blablabla)
in my LaTeX documents in order to mark todos. However these are not highlighted
as usual since they are not within a comment environment. Since LaTeX has no
comments which can be used within a line (like /* ... */) I don't want to use
normal comments, it would make me use a whole line for every todo and render the
text mostly unreadable.

So I wanted to ask if there is a fast and simple hack to make vim highlight
something like (TODO ...) as a comment environment with the TODO highlighted in
the TODO style.

Unfortunately I don't have the time to try this by myself, I guess my approach
would be to write a new LaTeX-highlighting file and include the old one, then
extending it with the new grammar. But I really don't have the time to try this
by myself.


Try
syn match ToDo /TODO.*$/
or
syn keyword ToDo /TODO/
or
match ToDo /TODO.*$/

Yakov






Re: restore function

2006-04-10 Thread Charles E Campbell Jr

linda.s wrote:


If I wrongly set  nnoremap w k in my command mode, how to restore the
function of "w"?

 



nunmap w

Regards,
Chip Campbell




Re: persistent tabstop per-file ? (viminfo)

2006-04-10 Thread Benji Fisher
On Sun, Apr 09, 2006 at 09:48:49AM +, Yakov Lerner wrote:
> Some of the files I use are 8-tabbed, some are 4-tabbed.
> These files are readonly, so modelines are not an option.
> (I am talking about \t tabs, not about vim7 tabpages).
> 
> Viminfo remembers last position in the file. When I
> reopen file, vim remembers last position.
> 
> Is there any way to tell vim to remember the last tabstop-related
> options per file in the viminfo ?

 I do not think so (and I assume you have already read :help 'vi').
You can use a view or session file; have you tried that yet?

:help views-sessions

(See also links from there to the users' manual.)

HTH --Benji Fisher


Re: folder

2006-04-10 Thread Benji Fisher
On Sat, Apr 08, 2006 at 09:39:07PM -0700, linda.s wrote:
> In the vim, how to create a folder and make it permanent? (I tried
> tools/folding/create folder but it was not a permanent change).

 I assume you mean "fold" and not "folder".

 I think that the fold is still there.  You should read about
opening and closing folds.  It also might help to do

:set foldcolumn=2

:help usr_28.txt
:help foldcolumn

HTH --Benji Fisher


Re: run vim

2006-04-10 Thread Benji Fisher
On Sat, Apr 08, 2006 at 04:37:56PM -0700, linda.s wrote:
> what is the difference to run vim from application and run vim from terminal?
> Thanks,
> Linda

 I am not sure what you mean by "run vim from application."  Please
be more specific.  If you are asking about different ways of starting
vim on Mac OS X, you may find an answer at
http://macvim.org/OSX/index.php#FAQ
or by asking on the vim-mac list.

HTH --Benji Fisher


Re: change word

2006-04-10 Thread Hugh Sasse
On Sun, 9 Apr 2006, Thomas Michael Engelke wrote:

> 2006/4/9, linda. s <[EMAIL PROTECTED]>:
> > I read the help file of "cw" but really can not understand what it means.
> > I use "/" to get the word i want to replace, then no matter i type :cw
> > or cw, unexpected results show.
> 
> If you are standing on the word you want to change, just use "cw" to
> change the word from the cursor position to the end or "caw" to change
> it from the beginning. Then just type your word.
> 
> Maybe you need to clarify what you mean by "I use / to get the word".

And also clarify what your expectations were.  Nobody can diagnose
"unexpected results show" without knowing what was there before,
where your cursor was, what you expected to get, and what you
actually got.

In terms of the functionality of cw, how you got to the word (your
use of /) won't matter, except in so far as it determines where your
cursor is relative to the start/end of the word.
> 
> Regards,
> 
> Thomas Engelke
> 
HTH
Hugh


Re: $VIMRUNTIME

2006-04-10 Thread Yakov Lerner
On 4/10/06, jagpreet <[EMAIL PROTECTED]> wrote:
>I just access to my home directory and don't have any access at all to
> the folders where vim is installed. /usr/share/vim/*
>
> Also, I downloaded some utility scripts from the site and want to use it.
> But for that I need to put the .vim scripts in $VIMRUNTIME directory
> structure as specified in the scripts installation.
> I don't have permission to write to those directories.

Those installation instructions are wrong. *Don't* put anything
into global $VIMRUNTIME. Do as follows. Create directory $HOME/.vim/plugin
(or $HOME/.vim/syntax $HOME/.vim/colors etc) and put new script under
$HOME/.vim/something. The "runtime" command will pick it from there
just as well as if it were under global vimruntime. If you look
attentively at the default value of 'set runtimepath?', you'll see that
it already contains $HOME/.vim.

> " let $VIMRUNTIME = ; "
Don't do it. Just do what I described above, it's enough.

Yakov


Re: help on creating a syntax group

2006-04-10 Thread Benji Fisher
On Thu, Apr 06, 2006 at 01:11:35PM -0400, Robert Hicks wrote:
> I am looking at updating the Tcl mode for Vim.
> 
> Tcl has a construct like:
> 
> if {0} {
> # everything in here is ignored and so Tcl'ers
> # will use it to comment out blocks of code.
> }
> 
> I would like everything between the brackets to be colorized like a comment.
> 
> Would it be something like:
> 
> syn region commentstart=+if {0} {+ end=+}+
> 
> Robert

 This is similar to the C construct

#if 0
  char *a = "This is actually a comment.";
#endif

You can see how this is handled in $VIMRUNTIME/syntax/c.vim :  search
for "cCppOut".  It is a little complicated, and I am no syntax guru, so
count me out from here.

HTH --Benji Fisher


Re: swapping caps lock and escape

2006-04-10 Thread mzyzik
On Mon, Apr 10, 2006 at 11:54:50AM +0200, Robert Cussons wrote:
> Thanks for the suggestions, at the moment I think, I like Gerhard's the 
> most. I have created the file, and I'll just have to see tomorrow 
> morning as I don't want to close everything and lock out and in again 
> just now.
> Thanks again for the help,
> Rob.

I do the following:

inoremap  
nnoremap  
vnoremap  gV
inoremap  `^

In this way, I use tab to do what escape does. It's great because it
works on every machine. I used to map caps to escape but then when I
went to work, I couldn't do the same on my work machine.

--Matt


Re: imap and map

2006-04-10 Thread Benji Fisher
On Sat, Apr 08, 2006 at 04:26:48PM -0700, linda.s wrote:
> On 4/6/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> > On 4/6/06, linda. s <[EMAIL PROTECTED]> wrote:
> > > What is the difference between imap and map. Very hard to understand...
> >
> > imap for insert mode. map for normal mode and 2 other modes
> > (visual and operator-pending). for simpicity, you can say that map
> > is for normal mode (such it was in original vi). For normal-mode
> > mapping only, you use nmap, but map is ok too.
> >
> > Yakov
> >
> Can you give an example?
> Linda

 After

:map  g~iw
:imap  HTH = "Hope That Helps"

I can go into Normal mode and use the F3 function key to change a word
into ALL CAPS, or I can go into Insert mode and use the same key to
enter the text

HTH = "Hope That Helps"

to explain my signature.

:help vim-modes-intro

HTH --Benji Fisher


Re: Vim-list improvement suggestions

2006-04-10 Thread Benji Fisher
On Sun, Apr 09, 2006 at 08:34:20PM -0400, James Vega wrote:
> On Sun, Apr 09, 2006 at 03:35:36PM -0400, Kamaraju Kusumanchi wrote:
> > >  It's not that much harder to use "Reply All" or "List Reply" (if
> > >  your MUA supports it) when you want to reply to the list.
> > 
> > I am not the OP. I have a naive question in this regard. If I hit
> > "Reply All", then the To address will have sender's email and the CC
> > field will have vim@vim.org . Does that mean that the recipient will
> > receive the messages twice? Should I always take care to remove the To
> > address field and just keep the CC field or is it fine to leave the To
> > address as it is?
> 
> It probably depends on the mailing list software, but in my opinion (and
> what I've experienced on this list) leaving the sender's email there is
> fine.  The mailing list software used for Vim's lists seem to recognize
> that a copy has already been sent to someone subscribed to the list and
> doesn't send a duplicate message.

 I often receive duplicates when people reply to me and to the list;
maybe that is when my address is in the CC field and vim@vim.org is in
the TO and not the other way around.

 It is probably less trouble for me to delete the duplicate copies I
receive than for you to remove my address from the replies.  Most
convenient is if your e-mail program has a "reply to list" feature (e.g.
L in mutt).  I normally use this, but for this note I am using "reply to
all" to test whether James really gets only one copy.

HTH --Benji Fisher

P.S.  I had to manually enter James's address, since mutt is too clever
for me.


Re: new logo

2006-04-10 Thread Peter Slizik

> BTW, there is a trend towards more colorful, more
> playful icons. I dislike this trend, because most of
> those icons are much less legible than the icons
> having been replaced.

Yes, that's true.  Maybe adding some light glow, color transition, or shadow 
effects would help to make the logo more 'shiny'. But it depends on personal 
taste, of course.

Peter

-- 
There's no trick to being a humorist when you have the whole government 
working for you. --Will Rogers


Re: filling the end of a line

2006-04-10 Thread Georg Dahn
OOPS, doing

50i-

is easier.

Best wishes,
Georg



--- Georg Dahn <[EMAIL PROTECTED]> wrote:

> Hi!
> 
> Do you really need a macro or do you want to insert
> a
> line of '-'s?
> 
> If the latter is the case, I do it as follows:
> 
> Let's assume I want to insert '-' 50 times. Then I
> do
> the following:
> 
> 1. insert '-'
> 2. yank '-' to register a by doing: "ay
> 3. paste register a 49 times by doing: "a49p
> 
> Best wishes,
> Georg
> 
> 
> 
> 
> --- Hjellvik Vidar <[EMAIL PROTECTED]> wrote:
> 
> > Hello,
> > 
> > how do I create a macro in vim that fills a line
> > with '-'s from the end end of the line to e.g.
> > position 50 so that 
> > 
> > Best regards
> > Vidar Hjellvik
> > Observational Methodology
> > Institute of Marine Research
> > P.O.Box 1870 Nordnes
> > N-5817 Bergen, Norway
> > Phone: +47 55 23 86 62
> > E-mail: [EMAIL PROTECTED]
> > 
> > becomes
> > 
> > Best regards--
> > Vidar Hjellvik
> > Observational Methodology-
> > Institute of Marine Research--
> > P.O.Box 1870 Nordnes--
> > N-5817 Bergen, Norway-
> > Phone: +47 55 23 86 62
> > E-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> 
>   
>
___
> 
> To help you stay safe and secure online, we've
> developed the all new Yahoo! Security Centre.
> http://uk.security.yahoo.com
> 






___ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail 
http://uk.messenger.yahoo.com


has anybody done syntax highlighting for linux Kconfig files ?

2006-04-10 Thread Yakov Lerner
I found no syntax highlighting for Kconfig files (linux kernel configuration).
I searched in vim7 runtime, and in vim.org/scripts, and in google.

If anybody created Kconfig highlighting already, please post it either
to vim.org/scripts or for inclusion into vimruntime,
or send it to me, I am willing to maintain it. If not, I'll make it.

Yakov


Re: filling the end of a line

2006-04-10 Thread Georg Dahn
Hi!

Do you really need a macro or do you want to insert a
line of '-'s?

If the latter is the case, I do it as follows:

Let's assume I want to insert '-' 50 times. Then I do
the following:

1. insert '-'
2. yank '-' to register a by doing: "ay
3. paste register a 49 times by doing: "a49p

Best wishes,
Georg




--- Hjellvik Vidar <[EMAIL PROTECTED]> wrote:

> Hello,
> 
> how do I create a macro in vim that fills a line
> with '-'s from the end end of the line to e.g.
> position 50 so that 
> 
> Best regards
> Vidar Hjellvik
> Observational Methodology
> Institute of Marine Research
> P.O.Box 1870 Nordnes
> N-5817 Bergen, Norway
> Phone: +47 55 23 86 62
> E-mail: [EMAIL PROTECTED]
> 
> becomes
> 
> Best regards--
> Vidar Hjellvik
> Observational Methodology-
> Institute of Marine Research--
> P.O.Box 1870 Nordnes--
> N-5817 Bergen, Norway-
> Phone: +47 55 23 86 62
> E-mail: [EMAIL PROTECTED]
> 
> 




___ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com


RE: Proposal for a new logo

2006-04-10 Thread Zdenek Sekera
> -Original Message-
> From: Anthony Campbell [mailto:[EMAIL PROTECTED] 
> Sent: 10 April 2006 11:58
> To: vim@vim.org
> Subject: Re: Proposal for a new logo
> 
> On 10 Apr 2006, Yakov Lerner wrote:
> > On 4/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > I personally don't like it. I only agree with the goals 
> that you have;
> > > but this particular logo i don't like.
> > >
> > > The old was very good... it could simply be revamped.
> > 
> > I agree. I like the current(old) logo.
> > 
> > Yakov
> 
> 
> As we seem to be voting informally, I like the current one too.

And so do I.

---Zdenek


Re: Undo is reset when moving between buffers while using minibufexpl.vim

2006-04-10 Thread Yakov Lerner
On 4/10/06, Roth Shahar <[EMAIL PROTECTED]> wrote:
> Hi all,
> I'm using the wonderful mini-buffer explorer
> (http://vim.sourceforge.net/scripts/script.php?script_id=159) which
> displays a small toolbar of the opened buffers and allows easy
> navigation between them.
> The problem is that when I navigate from one buffer to the other the
> undo "queue" is reset. If I go back to a previously used buffer I can't
> undo any changes that I've previously made to that buffer.
> Is this just the behavior of buffers in Vim or the behavior of the mini
> explorer? Can something be made to change this behavior and still be
> able to undo when I go back to a buffer?

Try :set hidden
:help hidden

Yakov


Re: filling the end of a line

2006-04-10 Thread Eric Arnold

Here is a macro that pads a whole line with 50 "-" chars:

imap ,t  0D50gi-0R"A

this pads a word to 10 spaces:

imap ,t  diW10gi 9hR"A



--- Yakov Lerner <[EMAIL PROTECTED]> wrote:

> On 4/10/06, Hjellvik Vidar <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > how do I create a macro in vim that fills a line with '-'s from the end end
> of the line to e.g. position 50
> 
> Put the following into file x.vim:
>   let m="--"
>   let x = m.m.m.m.m
>   map  :%s/$/\=strpart(x,0,50-strlen(getline('.')))/
> 
> The open your text files,
> :so x.vim
> 
> 
> Yakov
> 



Re: Proposal for a new logo

2006-04-10 Thread Daniel Nogradi
> > > The old was very good... it could simply be revamped.
> >
> > I agree. I like the current(old) logo.
>
> As we seem to be voting informally, I like the current one too.
>

Well, I guess that is a resounding 'no' for a new logo, so I'll forget
about the whole subject :)

Thanks for the feedback in any case.


Re: filling the end of a line

2006-04-10 Thread Jürgen Krämer

Hi,

Peter Slizik wrote:
>>   nnoremap  50A-50lD
> 
> I think it should be without the additional bar, ie.
> 
> nnoremap  50A-50D
> 
> Correct me if I'm wrong.

it's a lowercase ell, not a bar. The ell is needed because D also
deletes the character under the cursor thus reducing the line length
to 49.

Regards,
Jürgen

-- 
Jürgen Krämer  Softwareentwicklung
HABEL GmbH & Co. KGmailto:[EMAIL PROTECTED]
Hinteres Öschle 2  Tel: +49 / 74 61 / 93 53 - 15
78604 Rietheim-WeilheimFax: +49 / 74 61 / 93 53 - 99


RE: filling the end of a line

2006-04-10 Thread Hjellvik Vidar
Perfect!
Thanks a lot!
Vidar

-Original Message-
From: Jürgen Krämer [mailto:[EMAIL PROTECTED]
Sent: 10. april 2006 12:19
To: vim mailing list
Subject: Re: filling the end of a line



Hi,

Hjellvik Vidar wrote:
> Thank you! The macro nnoremap  50A-50lD works fine
> except in two cases:
>
> 1) With wrapmargin>0 it splits the line and makes the *second* line 50
> characters long if the length of the original line+50 is is greater
> than 79 so that
>
> Institute of Marine Research
>
> becomes (with 50 replaced by 70 in the macro)
>
> Institute of Marine
> Research--
>
> 2) If the original line is longer than 50 characters, it is truncated
> at 50 characters
>
> I thought may be it was possible to get the position of the end of the
> line and then somehow loop from this position to position 50 (or 70 or
> whatever), but I cannot figure out how to do it.
>

source the following script:

function! Repeat(ch, width)
let result = ''
let i = 0

while i < a:width
let result = result . a:ch
let i = i + 1
endwhile

return result
endfunction

function! Pad(str, ch, width)
let w =  a:width - strlen(a:str)

return a:str . Repeat(a:ch, w)
endfunction

nnoremap  :call setline('.', Pad(getline('.'), '-', 50))

and use  to fill the current line.

With VIM 7.0 (currently in beta stadium) you can delete the Repeat()
function and replace it with the builtin repeat() function (not the
difference in case).

Regards,
Jürgen

-- 
Jürgen Krämer  Softwareentwicklung
HABEL GmbH & Co. KGmailto:[EMAIL PROTECTED]
Hinteres Öschle 2  Tel: +49 / 74 61 / 93 53 - 15
78604 Rietheim-WeilheimFax: +49 / 74 61 / 93 53 - 99


Re: LaTeX syntax highlighting

2006-04-10 Thread Yakov Lerner
On 4/10/06, Marco Kunze <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I often use things like
> (TODO blablabla)
> in my LaTeX documents in order to mark todos. However these are not 
> highlighted
> as usual since they are not within a comment environment. Since LaTeX has no
> comments which can be used within a line (like /* ... */) I don't want to use
> normal comments, it would make me use a whole line for every todo and render 
> the
> text mostly unreadable.
>
> So I wanted to ask if there is a fast and simple hack to make vim highlight
> something like (TODO ...) as a comment environment with the TODO highlighted 
> in
> the TODO style.
>
> Unfortunately I don't have the time to try this by myself, I guess my approach
> would be to write a new LaTeX-highlighting file and include the old one, then
> extending it with the new grammar. But I really don't have the time to try 
> this
> by myself.

Try
syn match ToDo /TODO.*$/
or
syn keyword ToDo /TODO/
or
match ToDo /TODO.*$/

Yakov


Re: new logo

2006-04-10 Thread Georg Dahn
--- Mariusz Stakowski <[EMAIL PROTECTED]> wrote:
>   I like the current  logo too. I would prefer
> to keep it.

The same for me, at least I like it better than all
suggestions until now. A new loge *must* be much
better than the existing one, just to be new is not
enough.

BTW, there is a trend towards more colorful, more
playful icons. I dislike this trend, because most of
those icons are much less legible than the icons
having been replaced. Although there may be possible
improvements, the actual icons of Vim are very
legible, and one has to be very careful not to loose
that quality.

Best wishes,
Georg







___ 
Yahoo! Photos – NEW, now offering a quality print service from just 8p a photo 
http://uk.photos.yahoo.com


Re: filling the end of a line

2006-04-10 Thread Yakov Lerner
On 4/10/06, Hjellvik Vidar <[EMAIL PROTECTED]> wrote:
> Hello,
>
> how do I create a macro in vim that fills a line with '-'s from the end end 
> of the line to e.g. position 50

Put the following into file x.vim:
  let m="--"
  let x = m.m.m.m.m
  map  :%s/$/\=strpart(x,0,50-strlen(getline('.')))/

The open your text files,
:so x.vim


Yakov


Re: filling the end of a line

2006-04-10 Thread Peter Slizik


Dear Vidar,

some time ago I wrote a function to create a nice-looking headers for my 
Python scripts. I hope it'll give you some inspiration. Feel free to copy & 
modify it according to your needs.

What it does: After pressing  (see the mapping below) it asks for the 
header text. When finished typing, it produces a header like this:

# This is my header 

Here comes your function/class definition.

with the length of line adjusted to 78 (a safe value for 80-char-wide 
terminals).


function CreateHeader()
let headerLength = 78

let header = input("Header: ")
if strlen(header) == 0
return
endif

if strlen(header) > headerLength - 6
" Begin with '# ' and end with ' ###'
return
endif

let header = "# " . header . " "
let lenOfHeader = strlen(header)
let i = 0
while i < headerLength - lenOfHeader
let header = header . "#"
let i = i + 1
endwhile
let lineNo = line(".")
call append(lineNo, header)

" Add an empty line and position the cursor
call append(lineNo + 1, "")
call cursor(lineNo + 2, 0)
execute "startinsert"
endfunction

map  :call CreateHeader()
imap  :call CreateHeader()


-- 
There's no trick to being a humorist when you have the whole government 
working for you. --Will Rogers


Re: Omnicomplete 7c

2006-04-10 Thread Mark Woodward

Georg Dahn wrote:

not sure if this is just me or a bug?
C-X C-O presents a list of completions.
I scroll to the one I want and hit .
The first item on the list is always inserted?


By hitting 'enter' the highlighted entry was selected some versions 
ago. However, there were some problems with this.


Thus, either use  or  instead of the cursor keys or use a 
mapping of :


inoremap  =pumvisible() ? "\C-Y>" : "\CR>"

It selects the highlighted entry as before. Until now I have had no 
problems with this mapping.


Best wishes,
Georg


Thanks Georg,

--
Mark


Re: filling the end of a line

2006-04-10 Thread Jürgen Krämer

Hi,

Hjellvik Vidar wrote:
> Thank you! The macro nnoremap  50A-50lD works fine
> except in two cases:
>
> 1) With wrapmargin>0 it splits the line and makes the *second* line 50
> characters long if the length of the original line+50 is is greater
> than 79 so that
>
> Institute of Marine Research
>
> becomes (with 50 replaced by 70 in the macro)
>
> Institute of Marine
> Research--
>
> 2) If the original line is longer than 50 characters, it is truncated
> at 50 characters
>
> I thought may be it was possible to get the position of the end of the
> line and then somehow loop from this position to position 50 (or 70 or
> whatever), but I cannot figure out how to do it.
>

source the following script:

function! Repeat(ch, width)
let result = ''
let i = 0

while i < a:width
let result = result . a:ch
let i = i + 1
endwhile

return result
endfunction

function! Pad(str, ch, width)
let w =  a:width - strlen(a:str)

return a:str . Repeat(a:ch, w)
endfunction

nnoremap  :call setline('.', Pad(getline('.'), '-', 50))

and use  to fill the current line.

With VIM 7.0 (currently in beta stadium) you can delete the Repeat()
function and replace it with the builtin repeat() function (not the
difference in case).

Regards,
Jürgen

-- 
Jürgen Krämer  Softwareentwicklung
HABEL GmbH & Co. KGmailto:[EMAIL PROTECTED]
Hinteres Öschle 2  Tel: +49 / 74 61 / 93 53 - 15
78604 Rietheim-WeilheimFax: +49 / 74 61 / 93 53 - 99


Re: filling the end of a line

2006-04-10 Thread Peter Slizik
>
>   nnoremap  50A-50lD

Dear Jürgen,

I think it should be without the additional bar, ie.

nnoremap  50A-50D

Correct me if I'm wrong.

-- Peter


-- 
There's no trick to being a humorist when you have the whole government 
working for you. --Will Rogers


LaTeX syntax highlighting

2006-04-10 Thread Marco Kunze

Hi,

I often use things like
(TODO blablabla)
in my LaTeX documents in order to mark todos. However these are not highlighted
as usual since they are not within a comment environment. Since LaTeX has no
comments which can be used within a line (like /* ... */) I don't want to use
normal comments, it would make me use a whole line for every todo and render the
text mostly unreadable.

So I wanted to ask if there is a fast and simple hack to make vim highlight
something like (TODO ...) as a comment environment with the TODO highlighted in
the TODO style.

Unfortunately I don't have the time to try this by myself, I guess my approach
would be to write a new LaTeX-highlighting file and include the old one, then
extending it with the new grammar. But I really don't have the time to try this
by myself.

If someone has done something similar before, or if someone has an idea how to
maybe even realize this through .vimrc (that would be awesome!) it would be
really of great help to me.

Regards and thanks in advance,

Marco


RE: filling the end of a line

2006-04-10 Thread Hjellvik Vidar
Thank you! The macro nnoremap  50A-50lD works fine except in two 
cases:

1) With wrapmargin>0 it splits the line and makes the *second* line 50 
characters long if the length of the original line+50 is is greater than 79 so 
that

Institute of Marine Research

becomes (with 50 replaced by 70 in the macro)

Institute of Marine
Research--

2) If the original line is longer than 50 characters, it is truncated at 50 
characters

I thought may be it was possible to get the position of the end of the line and 
then somehow loop from this position to position 50 (or 70 or whatever), but I 
cannot figure out how to do it.

Best regards,
Vidar

-Original Message-
From: Jürgen Krämer [mailto:[EMAIL PROTECTED]
Sent: 10. april 2006 11:19
To: vim mailing list
Subject: Re: filling the end of a line



Hi,

Hjellvik Vidar wrote:
> 
> how do I create a macro in vim that fills a line with '-'s from the end end 
> of the line to e.g. position 50 so that 
> 
> Best regards
> Vidar Hjellvik
> Observational Methodology
> Institute of Marine Research
> P.O.Box 1870 Nordnes
> N-5817 Bergen, Norway
> Phone: +47 55 23 86 62
> E-mail: [EMAIL PROTECTED]
> 
> becomes
> 
> Best regards--
> Vidar Hjellvik
> Observational Methodology-
> Institute of Marine Research--
> P.O.Box 1870 Nordnes--
> N-5817 Bergen, Norway-
> Phone: +47 55 23 86 62
> E-mail: [EMAIL PROTECTED]
> 

  nnoremap  50A-50lD

Regards,
Jürgen

-- 
Jürgen Krämer  Softwareentwicklung
HABEL GmbH & Co. KGmailto:[EMAIL PROTECTED]
Hinteres Öschle 2  Tel: +49 / 74 61 / 93 53 - 15
78604 Rietheim-WeilheimFax: +49 / 74 61 / 93 53 - 99


Re: Proposal for a new logo

2006-04-10 Thread Anthony Campbell
On 10 Apr 2006, Yakov Lerner wrote:
> On 4/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > I personally don't like it. I only agree with the goals that you have;
> > but this particular logo i don't like.
> >
> > The old was very good... it could simply be revamped.
> 
> I agree. I like the current(old) logo.
> 
> Yakov


As we seem to be voting informally, I like the current one too.

Anthony
-- 
Anthony Campbell - [EMAIL PROTECTED] 
Microsoft-free zone - Using Linux Gnu-Debian
http://www.acampbell.org.uk (blog, book reviews, 
on-line books and sceptical articles)



Re: swapping caps lock and escape

2006-04-10 Thread Robert Cussons
Thanks for the suggestions, at the moment I think, I like Gerhard's the 
most. I have created the file, and I'll just have to see tomorrow 
morning as I don't want to close everything and lock out and in again 
just now.

Thanks again for the help,
Rob.

Gerhard Siegesmund wrote:

Hello Robert


but this means that each time I have logged out, I have to remember to 
run xmodmap ~/.speedswapper (the name of the file) otherwise I start 
getting strange effects from running pressing K instead of k for example.



Does just renaming the file to 


.Xmodmap

in your home-directory help? Normally this file is load by default from
xmodmap on login.

If there already is a .Xmodmap-File, just add your lines from
speedswapper to that file.

HTH



--

Robert Cussons
Office SB3 3.163, Theory Group
Gesellschaft für Schwerionenforschung mbH (GSI)
Planckstraße 1
64291 Darmstadt
Germany.

Tel: +49 (0)6159 71 2754
E-mail: [EMAIL PROTECTED]



Re: swapping caps lock and escape

2006-04-10 Thread Gerhard Siegesmund
Hello Robert

> but this means that each time I have logged out, I have to remember to 
> run xmodmap ~/.speedswapper (the name of the file) otherwise I start 
> getting strange effects from running pressing K instead of k for example.

Does just renaming the file to 

.Xmodmap

in your home-directory help? Normally this file is load by default from
xmodmap on login.

If there already is a .Xmodmap-File, just add your lines from
speedswapper to that file.

HTH

-- 
cu
  --== Jerri ==--
Homepage: http://www.jerri.de/   ICQ: 54160208
Public PGP Key: http://www.jerri.de/jerris_public_key.asc


signature.asc
Description: Digital signature


new logo

2006-04-10 Thread Mariusz Stakowski

  I like the current  logo too. I would prefer to keep it.

Best regards

Mariusz Stakowski




Undo is reset when moving between buffers while using minibufexpl.vim

2006-04-10 Thread Roth Shahar

Hi all,
I'm using the wonderful mini-buffer explorer 
(http://vim.sourceforge.net/scripts/script.php?script_id=159) which 
displays a small toolbar of the opened buffers and allows easy 
navigation between them.
The problem is that when I navigate from one buffer to the other the 
undo "queue" is reset. If I go back to a previously used buffer I can't 
undo any changes that I've previously made to that buffer.
Is this just the behavior of buffers in Vim or the behavior of the mini 
explorer? Can something be made to change this behavior and still be 
able to undo when I go back to a buffer?

Thanks,
-Shahar


Re: filling the end of a line

2006-04-10 Thread Jürgen Krämer

Hi,

Hjellvik Vidar wrote:
> 
> how do I create a macro in vim that fills a line with '-'s from the end end 
> of the line to e.g. position 50 so that 
> 
> Best regards
> Vidar Hjellvik
> Observational Methodology
> Institute of Marine Research
> P.O.Box 1870 Nordnes
> N-5817 Bergen, Norway
> Phone: +47 55 23 86 62
> E-mail: [EMAIL PROTECTED]
> 
> becomes
> 
> Best regards--
> Vidar Hjellvik
> Observational Methodology-
> Institute of Marine Research--
> P.O.Box 1870 Nordnes--
> N-5817 Bergen, Norway-
> Phone: +47 55 23 86 62
> E-mail: [EMAIL PROTECTED]
> 

  nnoremap  50A-50lD

Regards,
Jürgen

-- 
Jürgen Krämer  Softwareentwicklung
HABEL GmbH & Co. KGmailto:[EMAIL PROTECTED]
Hinteres Öschle 2  Tel: +49 / 74 61 / 93 53 - 15
78604 Rietheim-WeilheimFax: +49 / 74 61 / 93 53 - 99


filling the end of a line

2006-04-10 Thread Hjellvik Vidar
Hello,

how do I create a macro in vim that fills a line with '-'s from the end end of 
the line to e.g. position 50 so that 

Best regards
Vidar Hjellvik
Observational Methodology
Institute of Marine Research
P.O.Box 1870 Nordnes
N-5817 Bergen, Norway
Phone: +47 55 23 86 62
E-mail: [EMAIL PROTECTED]

becomes

Best regards--
Vidar Hjellvik
Observational Methodology-
Institute of Marine Research--
P.O.Box 1870 Nordnes--
N-5817 Bergen, Norway-
Phone: +47 55 23 86 62
E-mail: [EMAIL PROTECTED]



Re: Proposal for a new logo

2006-04-10 Thread Peter Slizik

> > Following the suggestions of some of you on this list I created a
> > draft for a new logo. It is perhaps very preliminary but illustrates
> > what I have in mind:
> >
> >  * simplicity
> >  * clarity
> >  * scalability
> >  * suitable for png, jpg, ico formats

It should be also suitable for SVG (and other vector graphic formats) as well.

Just a suggestion,

-- Peter


> >  * allows for variations
> >  * no cute animals or such
> >  * easily recognizable as VIM
> >



Re: swapping caps lock and escape

2006-04-10 Thread Eddy Petrişor
On 4/10/06, Robert Cussons <[EMAIL PROTECTED]> wrote:
> remove Lock = Caps_Lock
> keysym Escape = Caps_Lock
> keysym Caps_Lock = Escape
> add Lock = Caps_Lock
>
> but this means that each time I have logged out, I have to remember to
> run xmodmap ~/.speedswapper (the name of the file) otherwise I start

add a line like:

! ~/./.speedswapper

in ~/.vimrc ?

--
Regards,
EddyP
=
"Imagination is more important than knowledge" A.Einstein


Re: Proposal for a new logo

2006-04-10 Thread Yakov Lerner
On 4/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I personally don't like it. I only agree with the goals that you have;
> but this particular logo i don't like.
>
> The old was very good... it could simply be revamped.

I agree. I like the current(old) logo.

Yakov


Re: swapping caps lock and escape

2006-04-10 Thread Yakov Lerner
On 4/10/06, Robert Cussons <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I at the moment have a little file that I got from somewhere, probably
> in the vim tips, that swaps caps lock and escape around this is it:
>
> remove Lock = Caps_Lock
> keysym Escape = Caps_Lock
> keysym Caps_Lock = Escape
> add Lock = Caps_Lock
>
> but this means that each time I have logged out, I have to remember to
> run xmodmap ~/.speedswapper (the name of the file) otherwise I start
> getting strange effects from running pressing K instead of k for example.
> I have tried including this in .bashrc and things to run automatically
> on login but couldn't get it to work, then I just thought this morning,
> it would be much more sensible to have it written into my .vimrc. Only
> trouble being I have no idea how to do this, answers on the back of a
> postcard to this address would be greatly appreciated (e-mail will do).

You can add your xmodmap command to your ~/.xinitrc
This is a file which is executed when X server starts.
If your gui doesn't restart X after logout, you'll want to reconfigure
it to restart X when you log out.

Yakov


Re: Vim Job board?

2006-04-10 Thread panshizhu
Matthew Winn <[EMAIL PROTECTED]> wrote on 2006.04.10 15:19:54:
> On Sun, Apr 09, 2006 at 08:43:35PM +0200, Bertram Scharpf wrote:
> > my boss says that his editor is as least as good as mine and
> > he wants me to give up using Vim.
>
> Have you considered the possibility of replacing him?
>
> (Seriously: he sounds incompetent.  If he thinks you shouldn't be able
> to use whichever editor allows you to do your work as efficiently as
> possible, why is he there?)
>
> > Therefore I like to ask vice versa: Is there anywhere
> > on the web a job board for Vimmers? I'm thinking of
> > something like .
>
> Does it make sense to have jobs for Vimmers?  An editor is just a tool
> used to do a job.  It's not a job in itself.
>
> > Sorry, I'm really bored of working together with developpers
> > who don't even know about regular expressions.
>
> In my opinion any programmer who doesn't understand regular expressions
> and use them on a regular basis is nowhere near as productive as they
> could be, and if they're that unproductive why are they in employment?
>
> --
> Matthew Winn ([EMAIL PROTECTED])

Ah-ha, sounds pretty "cynical", but I do really like and agree what you've
said. ;)

I'd remembered that five years before, my boss told me that her editor "vi"
is much better than mine, and suggest me to learn "vi" when I have time. I
downloaded Vim 5.x and learn to use Vi since then.  now five years
passed and the Vim speeds my work a lot.
--
Sincerely
Pan, Shizhu. ext: 2221



swapping caps lock and escape

2006-04-10 Thread Robert Cussons

Hi everyone,

I at the moment have a little file that I got from somewhere, probably 
in the vim tips, that swaps caps lock and escape around this is it:


remove Lock = Caps_Lock
keysym Escape = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock

but this means that each time I have logged out, I have to remember to 
run xmodmap ~/.speedswapper (the name of the file) otherwise I start 
getting strange effects from running pressing K instead of k for example.
I have tried including this in .bashrc and things to run automatically 
on login but couldn't get it to work, then I just thought this morning, 
it would be much more sensible to have it written into my .vimrc. Only 
trouble being I have no idea how to do this, answers on the back of a 
postcard to this address would be greatly appreciated (e-mail will do).

Many thanks,
Rob.


Re: Proposal for a new logo

2006-04-10 Thread Eddy Petrişor
On 4/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I personally don't like it. I only agree with the goals that you have;
> but this particular logo i don't like.

I agree.

> take a look at the vim logo here: http://www.gentoo.org/dyn/icons/TXT.xml
>
> notice that it's the old logo... but a little "revamped"

These both are really nice; the one with the gears is the one I like best.

--
Regards,
EddyP
=
"Imagination is more important than knowledge" A.Einstein


Re: Vim Job board?

2006-04-10 Thread Matthew Winn
On Sun, Apr 09, 2006 at 08:43:35PM +0200, Bertram Scharpf wrote:
> my boss says that his editor is as least as good as mine and
> he wants me to give up using Vim.

Have you considered the possibility of replacing him?

(Seriously: he sounds incompetent.  If he thinks you shouldn't be able
to use whichever editor allows you to do your work as efficiently as
possible, why is he there?)

> Therefore I like to ask vice versa: Is there anywhere
> on the web a job board for Vimmers? I'm thinking of
> something like .

Does it make sense to have jobs for Vimmers?  An editor is just a tool
used to do a job.  It's not a job in itself.

> Sorry, I'm really bored of working together with developpers
> who don't even know about regular expressions.

In my opinion any programmer who doesn't understand regular expressions
and use them on a regular basis is nowhere near as productive as they
could be, and if they're that unproductive why are they in employment?

-- 
Matthew Winn ([EMAIL PROTECTED])


Re: Vim Job board?

2006-04-10 Thread Eddy Petrişor
On 4/9/06, Stahlman Family <[EMAIL PROTECTED]> wrote:
> > Hi!
> >
> > Oh, at least developers should know about regular expressions.
>
> How about developers who don't know about tags? Most of the developers in my 
> software lab use CodeWright for development, and
> although I'm pretty sure it supports tags, they do multiple greps to descend 
> through multiple levels of function call or macro
> expansion! The company strongly encourages the use of CodeWright by 
> developers, as they have an army of developers in Romania who
> have integrated CodeWright into what they call the "Toolset," a behemoth 
> program or suite of programs, which is supposed to insulate

That is the company policy which the department applies blindly in
fear not to have unreplaceable persons

> the developer from messy things like makefiles, compilers and linkers.

A good tool is always an asset, but a bad tool is not. I'll let you
judge which thinhg are good and which are bad :)

> They also attempt to restrict programmers to a very
> uninteresting subset of the C programming language, in an attempt to decrease 
> the likelihood of programmer error. I find such rules
> extremely restrictive and annoying. I believe the problem is that there are 
> many people whose job description calls for software
> development, who are not really programmers. Thus, the job is dumbed-down to 
> accomodate the least common denominator...

Again the "we can replace anybody" policy at work... believe me.

P.S.: youdidn't said anything about the SCM, which repeatedly is used
badly because not enough time for training is available ;-)

--
Regards,
EddyP
=
"Imagination is more important than knowledge" A.Einstein