Re: Help needed on pt_BR spell checking

2007-02-17 Thread Leonardo Fontenelle

You are right. It seems that gentoo is distributing the source code
without the runtime/spell dir. It took me your e-mail to prompt me to
grab the tarball from the ftp site, because usually the tarballs
gentoo distribute are the same as the original.

I'll play with it and write back when I get something. Thanks for your
assistance!

Leonardo Fontenelle

2007/2/16, Bram Moolenaar [EMAIL PROTECTED]:

You can find the spell *.diff files in the Unix archive and the PC
runtime archive.


Re: vim color for white background

2007-02-17 Thread atstake atstake

On 2/17/07, A.J.Mechelynck [EMAIL PROTECTED] wrote:

Once you find a colorscheme which pleases you (or if you write your own), you
can place the appropriate line in your vimrc.


Thanks.

I tried torte, slate, shine, ron, peachpuff, pablo, murphy, morning,
koehler, evening, elflord, desert, delek, default, blue, darkblue. I
really liked delek but it's not really strong enough. Do you have any
suggestions of something similar to delek?


Vertical regexp

2007-02-17 Thread Meino Christian Cramer
Hi,

 Is there any way to find two specific items of an ascii table of the
 same column  but of two adjacent rows ?
 I am looking for some vimish solution - there is of course a way to 
 specify an highly complex and longish regexp which is very table
 specific...

 Is there a way to say item below this item or item(x,y) and item(
 x,y+1)?

 Thanks for any help in advance!
 Have a nice weekend!
 mcc

  


Re: Vertical regexp

2007-02-17 Thread Tim Chase
  Is there any way to find two specific items of an ascii table of the
  same column  but of two adjacent rows ?

I'm not quite sure what you're trying to do on the data you
described in your 2nd posting, so I'm divining intent as well as
a solution.  Perhaps with your intent as well, a better solution
can be found.

In the past, I've done things like

/^\%(.\{25}\)\(.\).*\n\%(.\{25}\)\1

to find places where character 26 on one line is the same as
character 26 on the next line.  Or, I've used

/^\(\w\+\).*\n\1

to find lines that begin with the same word.  If you're looking
for different characters (A and Z) at a particular offset
(26), you can use

/^\%(.\{25}\)A.*\n\%(.\{25}\)Z

It does require that you know the offset though.

If your lines are fixed length (which it sounds like they might
not be, as they have file-names which can be arbitrary lengths),
you might be able to do something like

/^.\{-}A\_.\{129}Z

assuming there are 128 characters in each of your lines (the
129th is the \n character).  If you right-padded your file so
that it had a consistent length in each line, this solution might
work for you.

Just a few ideas that have worked for me in the past, doing
something somewhat like I understand you to be describing :)

HTH,

-tim






Re: Vertical regexp

2007-02-17 Thread Meino Christian Cramer
From: A.J.Mechelynck [EMAIL PROTECTED]
Subject: Re: Vertical regexp
Date: Sat, 17 Feb 2007 16:10:50 +0100

 Meino Christian Cramer wrote:
  From: A.J.Mechelynck [EMAIL PROTECTED]
  Subject: Re: Vertical regexp
  Date: Sat, 17 Feb 2007 15:46:19 +0100
  
  Meino Christian Cramer wrote:
  Hi,
 
   Is there any way to find two specific items of an ascii table of the
   same column  but of two adjacent rows ?
   I am looking for some vimish solution - there is of course a way to 
   specify an highly complex and longish regexp which is very table
   specific...
 
   Is there a way to say item below this item or item(x,y) and item(
   x,y+1)?
 
   Thanks for any help in advance!
   Have a nice weekend!
   mcc
 

 
  It may depend on the structure of your file: if the item below this item 
  is 
  vertically aligned it will be relatively easy; if they aren't aligned, as 
  in 
  lines of comma- or tab-separated items of widely varying length, it is 
  probably possible, but not in the same way; and it may require a function 
  rather than a regexp.
 
 
  Best regards,
  Tony.
  -- 
  This is your fortune.
  
  Hi Tony,
  
   sorry...I forgot to mention: It is a *very* simple aligned
   ASCII-table, space is used as seperator.
  
   It looks like this one
  
   128 chars of hex-crc2 spacesitem to compare2 spacesfull path/file
  
   where file possibly contains weird characters (at least from the
   point of view of an unixxer) like spaces, braces, commata and so on
   -- everything which makes regexp more complicate and a headache in
   the evening ;)
  
   Keep hacking!
   mcc
  

  
 
 OK, well, check :help pattern-overview, I'm sure you will find what you 
 need. In addition, if you need to concatenate expressions to construct your 
 pattern, you may want to check :help :normal and :help :let-@.
 
 
 Best regards,
 Tony.
 -- 
 For some reason, this fortune reminds everyone of Marvin Zelkowitz.

Hi Tony!

 THANKS A LOT! :O)

 Its always a problem for a non-native English speaker like me to
 first translate a what I want in the name for it and then
 from (in my case) a the name for it (german) in a name for it
 (english) and vim has always some special terminus technicus for
 what I want.

 Previously I would never had thought, that let-@ has something to
 do with my problem... ;)

 kind regards,
 mcc


Re: tips project

2007-02-17 Thread Yakov Lerner

On 2/17/07, Kim Schulz [EMAIL PROTECTED] wrote:

On Fri, 16 Feb 2007 02:37:28 +0100
Bram Moolenaar [EMAIL PROTECTED] wrote:


 Hi all,

 Google code has now added support for a wiki.  This means open source
 projects can have a wiki that's free, fast and reliable
 (hopefully :-).

   http://code.google.com/hosting/

 During my presentation last Tuesday the idea came up (again) to move
 the Vim tips to a wiki.  The big advantage is that instead of having
 to read the notes below the tip to find out about improvements, the
 notes can be added in the right place, or even correct mistakes in
 the tip.

 I would like to ask for volunteers who want to take the current tips
 and notes, write some kind of script to move them to the wiki and set
 it up for use.  If this works well we can delete the tips from the Vim
 website.  They are currently closed for updates anyway, thus this is a
 good time to try it.

 Using the project name VimTips would be good.  Please don't create it
 unless you are going to set up the wiki!


I am not sure that I like the idea of the Tips being on a Wiki. I like
the fact that I know exactly where to find a particular tip and that
chances are it will be there the next time I need it.
That the main problem I encounter with wiki pages.


If the wiki tips pages will be uniformly titled tip1234, tip1235, tip1236,
then this problem is solved. Numbers tend to remain stable over time :-).
That's in contrast to the descriptive titles, which could indeed
change over time.


Another thing is
that we most likely will encounter even more spam than now by moving to
a wiki (spambots are getting through, even when you have captcha and
user login).
just my 5cents


Yakov


Re: Vertical regexp

2007-02-17 Thread Meino Christian Cramer
From: Tim Chase [EMAIL PROTECTED]
Subject: Re: Vertical regexp
Date: Sat, 17 Feb 2007 09:11:36 -0600

   Is there any way to find two specific items of an ascii table of the
   same column  but of two adjacent rows ?
 
 I'm not quite sure what you're trying to do on the data you
 described in your 2nd posting, so I'm divining intent as well as
 a solution.  Perhaps with your intent as well, a better solution
 can be found.
 
 In the past, I've done things like
 
   /^\%(.\{25}\)\(.\).*\n\%(.\{25}\)\1
 
 to find places where character 26 on one line is the same as
 character 26 on the next line.  Or, I've used
 
   /^\(\w\+\).*\n\1
 
 to find lines that begin with the same word.  If you're looking
 for different characters (A and Z) at a particular offset
 (26), you can use
 
   /^\%(.\{25}\)A.*\n\%(.\{25}\)Z
 
 It does require that you know the offset though.
 
 If your lines are fixed length (which it sounds like they might
 not be, as they have file-names which can be arbitrary lengths),
 you might be able to do something like
 
   /^.\{-}A\_.\{129}Z
 
 assuming there are 128 characters in each of your lines (the
 129th is the \n character).  If you right-padded your file so
 that it had a consistent length in each line, this solution might
 work for you.
 
 Just a few ideas that have worked for me in the past, doing
 something somewhat like I understand you to be describing :)
 
 HTH,
 
 -tim
 
 
 

Hi Tim,

 oh yeah! :) Thank you fo rthe regexps!

 Short explanation, what I intent to do:
 I have two directory trees. One is on my hd, the other one on a
 DVD-RAM, both containing lots of files. The directory structure
 is very similiar.

 To proof, that the DVD-RAM has no file, which does not exist on the
 hd I generate a checksum, (whirlpooldeep) of each file on the DVD-RAM
 and on the hd. To make the output useable as input for uniq I
 decided to insert either dvdram or hd after the checksum. Then I
 put both files into one and sort the whole thing - key are the
 characters of the checksum only.

 Then (and this the part of vim): If I find to rows which have the
 word DVD-RAM in their second column I found one file on the
 DVD-RAM, which is not on the hd.

 As you already mentoined: The lengths of the filenames may be very
 different -- the reason why I was searching for a below this
 item-trick.

 Keep hacking!
 mcc

 


Is _every_ command starting with a colon an ex command?

2007-02-17 Thread Larry Alkoff

I know every ex command starts with a colon.

Is the reverse true in every case?
Is _every_ command that starts with a colon an ex command?

Examples
:help   Is this an ex command?
:versionIs this?
:blahblah   This?

Larry

--
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux


Re: Vertical regexp

2007-02-17 Thread Tim Chase
  Short explanation, what I intent to do:
  I have two directory trees. One is on my hd, the other one on a
  DVD-RAM, both containing lots of files. The directory structure
  is very similiar.
 
  To proof, that the DVD-RAM has no file, which does not exist on the
  hd I generate a checksum, (whirlpooldeep) of each file on the DVD-RAM
  and on the hd. To make the output useable as input for uniq I
  decided to insert either dvdram or hd after the checksum. Then I
  put both files into one and sort the whole thing - key are the
  characters of the checksum only.
 
  Then (and this the part of vim): If I find to rows which have the
  word DVD-RAM in their second column I found one file on the
  DVD-RAM, which is not on the hd.

Hmm...this sounds like something I'd do outside of vim, though
I'll try my hand at a vim solution too.  On a *nix system, I'd
use your original source files (hd.txt and dvd.txt) and the
join tool.

bash join -a 1 (sort hd.txt) (sort dvd.txt)  output.txt

If you don't have bash (or the ability to make dynamic FIFOs like
the above syntax), you can rewrite that as

sh sort hd.txt  hd_sorted.txt
sh sort dvd.txt  dvd_sorted.txt
sh join -a 1 hd_sorted.txt dvd_sorted.txt  output.txt
sh rm hd_sorted.txt dvd_sorted.txt

The output of this will be one row for each item in hd.txt in
sorted order.  If there was a matching checksum in
dvd_sorted.txt, it would be appended to the line.  You'd then
likely be interested in lines that don't have dvdram in them
(or only have three fields rather than five fields).  Or, you can
swap the -a 1 for -a 2 to get everything that's in dvd.txt
with extra info from hd.txt.

I've done something like this in pure vim by doing something like

:e dvd.txt
:%s/^\(\S*\)\(.*\)/:%s#\1.*#\ \2!e
:%y
:sp hd.txt
@

It basically converts your dvd.txt into a vim-script that can be
run across hd.txt to append the remainder (dvdram
/path/to/file) to each line in hd.txt.  It then yanks the file
into the scratch register and then executes that register.  In
theory, you could change those last three bits to

:w temp.vim
:sp hd.txt
:so temp.vim

It's a pretty horrible hack, but I tend to use it fairly
regularly.  Swap hd.txt and dvd.txt if you want the other order.
 The script basically turns vim into a glorified SQL LEFT OUTER
JOIN statement.

If you're just interested in checksums that are in hd.txt that
aren't in dvd.txt, you can use something similar:

:e dvd.txt
:%s/^\(\S*\).*/:sil! g#\1#d
:w temp.vim
:sp hd.txt
:so temp.vim

which will nuke all the lines in hd.txt that have checksums in
dvd.txt so that the only thing remaining is files that aren't in
in dvd.txt

While none of the above does what you originally describe
(vertical searching) but seems to provide the information you're
looking for.

Just a few ideas.

-tim















Re: Is _every_ command starting with a colon an ex command?

2007-02-17 Thread Yakov Lerner

On 2/17/07, Larry Alkoff [EMAIL PROTECTED] wrote:

I know every ex command starts with a colon.

Is the reverse true in every case?
Is _every_ command that starts with a colon an ex command?

Examples
:help   Is this an ex command?
:versionIs this?
:blahblah   This?


If you do ':help :help', move 11 lines below, thebn you can see the
sign {not in Vi}.

This means that :help is specific to vim and was not part
of the original ex and vi. Vim added huge number of new commands.
They are labeled as {not in Vi} in the help.

Regarding :blahblah, I doubt it is command that vim added to original vi,
unless you patched your copy of vim sources.

Yakov


Re: Is _every_ command starting with a colon an ex command?

2007-02-17 Thread Tim Chase
 I know every ex command starts with a colon.
 
 Is the reverse true in every case?
 Is _every_ command that starts with a colon an ex command?
 
 Examples
 :help Is this an ex command?
 :version  Is this?
 :blahblah This?

My understanding is that _yes_, typing the colon temporarily
enters ex mode for one command.  To try things out, you can use
Q to enter actual ex mode (use vi to re-enter visual mode).

There may be some caveats, such as in general, one can do

:g/regexp/ex-command

However, while :g is an ex command, it can't be nested within
an outer :g command (as noted in the help).

There may be a distinction between what vim treats as 'ex' mode
and what classic vi/ex supports, but this might be changeable
by the 'cp' option to ensure compatibility with old vi/ex.

Pretty much any command you can use in ex mode, one can also use
in scripts (and vice-versa) which makes for some very powerful
vim-script actions.

With further information about what you're trying to do, it might
shed light on small nuances of difference, but for the most part,
one can assume that if it starts with a colon, it's an ex command.

-tim






Re: Missing configuration commands in vim 7?

2007-02-17 Thread Yakov Lerner

On 2/17/07, Larry Alkoff [EMAIL PROTECTED] wrote:

I'll see about installing the bigger brothers.


Be careful. They will be watching you.

Yakov


The Seven Habits Of Effective Text Editing 2

2007-02-17 Thread Jimmy Mack
Hi Bram, 

I just heard about your recent talk at google, entitled
The Seven Habits Of Effective Text Editing 2.
( 
http://google-code-updates.blogspot.com/2007/02/open-source-developers-google-speaker.html
 )

The original seven habits of effective text editing was fascinating and 
useful.  I am sure that I'm not the only vimmer who would
 be interested in hearing more about this updated version.  However, I can't 
find any links to  either a video or a transcript of this talk.  Are you 
planning to make this available on your website?  Is it available elsewhere?

--Fraser Hanson




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


Re: Is _every_ command starting with a colon an ex command?

2007-02-17 Thread Larry Alkoff

Tim Chase wrote:

I know every ex command starts with a colon.

Is the reverse true in every case?
Is _every_ command that starts with a colon an ex command?

Examples
:help   Is this an ex command?
:versionIs this?
:blahblah   This?


My understanding is that _yes_, typing the colon temporarily
enters ex mode for one command.  To try things out, you can use
Q to enter actual ex mode (use vi to re-enter visual mode).

There may be some caveats, such as in general, one can do

:g/regexp/ex-command

However, while :g is an ex command, it can't be nested within
an outer :g command (as noted in the help).

There may be a distinction between what vim treats as 'ex' mode
and what classic vi/ex supports, but this might be changeable
by the 'cp' option to ensure compatibility with old vi/ex.

Pretty much any command you can use in ex mode, one can also use
in scripts (and vice-versa) which makes for some very powerful
vim-script actions.

With further information about what you're trying to do, it might
shed light on small nuances of difference, but for the most part,
one can assume that if it starts with a colon, it's an ex command.

-tim




Thanks Tim, Yakov and Martin.
I'll just ASSume from now on that, if it starts with a colon,
it may as be an ex command.
Very interesting information on the use of ex.

Larry

--
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux


Re: The Seven Habits Of Effective Text Editing 2

2007-02-17 Thread Jonas Persson

Jimmy Mack skrev:
Hi Bram, 


I just heard about your recent talk at google, entitled
The Seven Habits Of Effective Text Editing 2.
( 
http://google-code-updates.blogspot.com/2007/02/open-source-developers-google-speaker.html
 )

The original seven habits of effective text editing was fascinating and 
useful.  I am sure that I'm not the only vimmer who would
 be interested in hearing more about this updated version.  However, I can't 
find any links to  either a video or a transcript of this talk.  Are you 
planning to make this available on your website?  Is it available elsewhere?

--Fraser Hanson


http://video.google.com/videoplay?docid=2538831956647446078q=engedu+vim



Re: The Seven Habits Of Effective Text Editing 2

2007-02-17 Thread Mikolaj Machowski
On sobota 17 luty 2007, VIM mail list wrote:
 The original seven habits of effective text editing was fascinating
 and useful.  I am sure that I'm not the only vimmer who would be
 interested in hearing more about this updated version.  However, I can't
 find any links to  either a video or a transcript of this talk.  Are you
 planning to make this available on your website?  Is it available
 elsewhere?

http://video.google.com/videoplay?docid=2538831956647446078q=engedu+vim

1h 20m.

m.




Re: The Seven Habits Of Effective Text Editing 2

2007-02-17 Thread Jimmy Mack
Thanks, Mikolaj and Jonas.  That's exactly what I was looking for.

- Original Message 
From: Mikolaj Machowski [EMAIL PROTECTED]
To: vim@vim.org
Sent: Saturday, February 17, 2007 12:25:32 PM
Subject: Re: The Seven Habits Of Effective Text Editing 2

On sobota 17 luty 2007, VIM mail list wrote:
 The original seven habits of effective text editing was fascinating
 and useful.  I am sure that I'm not the only vimmer who would be
 interested in hearing more about this updated version.  However, I can't
 find any links to  either a video or a transcript of this talk.  Are you
 planning to make this available on your website?  Is it available
 elsewhere?

http://video.google.com/videoplay?docid=2538831956647446078q=engedu+vim

1h 20m.

m.






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


indenting and json

2007-02-17 Thread g b

Any way to indent json correctly on vim?

I recall that on 6.4 version we needed an external syntax file for
javascript. Is it still the case?

it's driving me nuts to have weird tabulation put allover the place...

thanks

ps: json sample
Obj = {
  att1: 'val1',
  att2: 'val2',
}

--
Gabriel Barros
cel: +55 11 8107-0351
icq: 46083107
http://www.linkedin.com/in/gabrielbarros


Re: Is _every_ command starting with a colon an ex command?

2007-02-17 Thread Mark Woodward
Hi Yakov,

On Sat, 2007-02-17 at 19:06 +0200, Yakov Lerner wrote:
 On 2/17/07, Larry Alkoff [EMAIL PROTECTED] wrote:
  I know every ex command starts with a colon.
 
  Is the reverse true in every case?
  Is _every_ command that starts with a colon an ex command?
 
  Examples
  :help   Is this an ex command?
  :versionIs this?
  :blahblah   This?
 
 If you do ':help :help', move 11 lines below, thebn you can see the
 sign {not in Vi}.
 
 This means that :help is specific to vim and was not part
 of the original ex and vi. Vim added huge number of new commands.
 They are labeled as {not in Vi} in the help.
 
 Regarding :blahblah, I doubt it is command that vim added to original vi,
 unless you patched your copy of vim sources.
 
 Yakov

'blah' is an English slang term meaning 'anything', 'etc',  'and so on'.
so Larry means 'any other : command'

Larry,
I think ':blahblah' will either be an ex or exim command. If it's not in
original Vi it's the later.


-- 
Mark



Re: tips project

2007-02-17 Thread John Beckett

Bram Moolenaar wrote:

Using the project name VimTips would be good.


Everyone here is used to the name Vim Tips so VimTips sounds good, but on 
a wiki I suggest that the name should be just Vim.


It seems logical to me that a Vim Tips wiki would start with a (brief) page 
outlining what Vim is, then have links to other information. Links would 
include www.vim.org for core information, and a contents page for the wiki 
tips.


To be useful, the existing Vim Tips should be structured into some logical 
order (tips on navigation, search, status line, fonts, tags, etc). Perhaps 
the existing structure of Vim Help could be used.


OTOH the perfect is the enemy of the good, so perhaps you just want to move 
all tips as is, then have people slowly massage them into a coherent set of 
useful tips.


The wiki tips project would only be helpful after some severe editing IMHO. 
Some tips should simply be omitted (or held under a section with a name 
suggesting deprecation, like Old Tips). Other tips should be combined. 
Unfortunately these steps would involve author angst.


One good feature of the current Tips web site is that each tip is clearly 
written by a specific person who is prominently credited. That gives the 
author a good reason to correct errors and make updates. Traditionaly that 
would not be done in a wiki, and there may be some loss.


John



Re: Is _every_ command starting with a colon an ex command?

2007-02-17 Thread A.J.Mechelynck

Larry Alkoff wrote:

Tim Chase wrote:

I know every ex command starts with a colon.

Is the reverse true in every case?
Is _every_ command that starts with a colon an ex command?

Examples
:helpIs this an ex command?
:versionIs this?
:blahblahThis?


My understanding is that _yes_, typing the colon temporarily
enters ex mode for one command.  To try things out, you can use
Q to enter actual ex mode (use vi to re-enter visual mode).

There may be some caveats, such as in general, one can do

:g/regexp/ex-command

However, while :g is an ex command, it can't be nested within
an outer :g command (as noted in the help).

There may be a distinction between what vim treats as 'ex' mode
and what classic vi/ex supports, but this might be changeable
by the 'cp' option to ensure compatibility with old vi/ex.

Pretty much any command you can use in ex mode, one can also use
in scripts (and vice-versa) which makes for some very powerful
vim-script actions.

With further information about what you're trying to do, it might
shed light on small nuances of difference, but for the most part,
one can assume that if it starts with a colon, it's an ex command.

-tim




Thanks Tim, Yakov and Martin.
I'll just ASSume from now on that, if it starts with a colon,
it may as be an ex command.
Very interesting information on the use of ex.

Larry



Vhat Vim calls ex-commands are prefixed by a colon when typed at the 
command-line (the colon is actually used to go from Normal mode to 
Command-line mode). There are more of them than what was originally valid in 
the ex program; and you can even define your own (using the :command command).


In scripts, or after another command like :vertical, :botright, :browse, 
:verbose, :autocommand EventName *, etc., the colon is not necessary: e.g.


:vert split foobar.txt
:bot help pattern-overview
:verbose set guifont?
:browse edit
:au VimLeave * set verbose=0
:if has(gui_running) | set lines= columns= | endif

The commands

split foobar.txt
help pattern-overview
set guifont?
edit
set verbose=0
set lines= columns=
endif

are ex-commands, which don't need a colon because there is something before 
them on the same command-line. (Note that :if and :endif, when typed at 
the command-line, should be on the same line as above)



Best regards,
Tony.
--
Watson's Law:
The reliability of machinery is inversely proportional to the
number and significance of any persons watching it.



Re: Vertical regexp

2007-02-17 Thread David Rock
* Tim Chase [EMAIL PROTECTED] [2007-02-17 10:58]:
 
 Hmm...this sounds like something I'd do outside of vim, though
 I'll try my hand at a vim solution too.  On a *nix system, I'd
 use your original source files (hd.txt and dvd.txt) and the
 join tool.
 
 bash join -a 1 (sort hd.txt) (sort dvd.txt)  output.txt

I was kindof thinking the same thing, but you may also want to look at
the tool, comm.

vim is a great tool, but not necessarily the best for this problem ;-)

-- 
David Rock
[EMAIL PROTECTED]


Make the saved search keyword per file

2007-02-17 Thread Bin Chen

Hi,

VIM will save the last searched keyword and each time we start a new 
edit session, when we just press /, the VIM will search the last 
searched keyword.


But currently this feature is user wide, but not file wide. Suppose I 
open a file a.txt searchd a-key, b.txt then seach b-key, can I configure 
the VIM to search a-key when I open a.txt but b-key when I open b.txt?


Thanks a lot.
ABAI



Re: Is _every_ command starting with a colon an ex command?

2007-02-17 Thread Yegappan Lakshmanan

Hi,

On 2/17/07, A.J.Mechelynck [EMAIL PROTECTED] wrote:

Larry Alkoff wrote:
 Tim Chase wrote:
 I know every ex command starts with a colon.

 Is the reverse true in every case?
 Is _every_ command that starts with a colon an ex command?


 Pretty much any command you can use in ex mode, one can also use
 in scripts (and vice-versa) which makes for some very powerful
 vim-script actions.


Vhat Vim calls ex-commands are prefixed by a colon when typed at the
command-line (the colon is actually used to go from Normal mode to
Command-line mode). There are more of them than what was originally valid in
the ex program; and you can even define your own (using the :command 
command).



For a complete list of ex commands, refer to the following help topic:

  :help ex-cmd-index

- Yegappan


Re: Is _every_ command starting with a colon an ex command?

2007-02-17 Thread Larry Alkoff

A.J.Mechelynck wrote:


Thanks Tim, Yakov and Martin.
I'll just ASSume from now on that, if it starts with a colon,
it may as be an ex command.
Very interesting information on the use of ex.

Larry



Vhat Vim calls ex-commands are prefixed by a colon when typed at the 
command-line (the colon is actually used to go from Normal mode to 
Command-line mode). There are more of them than what was originally 
valid in the ex program; and you can even define your own (using the 
:command command).


In scripts, or after another command like :vertical, :botright, 
:browse, :verbose, :autocommand EventName *, etc., the colon is 
not necessary: e.g.


:vert split foobar.txt
:bot help pattern-overview
:verbose set guifont?
:browse edit
:au VimLeave * set verbose=0
:if has(gui_running) | set lines= columns= | endif

The commands

split foobar.txt
help pattern-overview
set guifont?
edit
set verbose=0
set lines= columns=
endif

are ex-commands, which don't need a colon because there is something 
before them on the same command-line. (Note that :if and :endif, 
when typed at the command-line, should be on the same line as above)



Best regards,
Tony.


Thanks for your (as usual) very good information Tony.

I had thought Normal and Command mode was two names for the same thing.
Are you saying that Command mode is ex mode?

What do you mean by something before them when using the split 
command?  I have always typed ':sp foobar'.  Are you saying that is not 
necessary or (shudder) wrong?


How can I redirect the very long list of ex commands to a file?
:he ex-cmd-index file doesn't work.


Larry
--
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux


Re: The Seven Habits Of Effective Text Editing 2

2007-02-17 Thread Bram Moolenaar

Jimmy -

 I just heard about your recent talk at google, entitled
 The Seven Habits Of Effective Text Editing 2.
 ( 
 http://google-code-updates.blogspot.com/2007/02/open-source-developers-google-speaker.html
  )
 
 The original seven habits of effective text editing was fascinating
 and useful.  I am sure that I'm not the only vimmer who would
  be interested in hearing more about this updated version.  However, I
  can't find any links to  either a video or a transcript of this talk.
  Are you planning to make this available on your website?  Is it
  available elsewhere?

The video has just become available here:
http://video.google.com/videoplay?docid=2538831956647446078

The slides are available here:
http://www.moolenaar.net/habits_2007.pdf

I'll do an announcement soon.  If you spot something wrong in the notes
let me know, I can still fix those.

Enjoy!

- Bram

-- 
There are three kinds of persons: Those who can count and those who can't.

 /// 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: tips project

2007-02-17 Thread Bram Moolenaar

John Beckett wrote:

 Bram Moolenaar wrote:
  Using the project name VimTips would be good.
 
 Everyone here is used to the name Vim Tips so VimTips sounds good, but on 
 a wiki I suggest that the name should be just Vim.

I'm sure we will use the wiki for other things than tips some day.
Therefore just using Vim would be confusing.

 It seems logical to me that a Vim Tips wiki would start with a (brief) page 
 outlining what Vim is, then have links to other information. Links would 
 include www.vim.org for core information, and a contents page for the wiki 
 tips.
 
 To be useful, the existing Vim Tips should be structured into some logical 
 order (tips on navigation, search, status line, fonts, tags, etc). Perhaps 
 the existing structure of Vim Help could be used.
 
 OTOH the perfect is the enemy of the good, so perhaps you just want to move 
 all tips as is, then have people slowly massage them into a coherent set of 
 useful tips.

We can do both.  But we need to start somewhere.  Moving all tips over
is the first step.  We can simply keep the tip number at first.  Making
some kind of index is something that anyone can do once the wiki exists.

 The wiki tips project would only be helpful after some severe editing IMHO. 
 Some tips should simply be omitted (or held under a section with a name 
 suggesting deprecation, like Old Tips). Other tips should be combined. 
 Unfortunately these steps would involve author angst.

It will be useful right away: There are plenty of ways to search.  Just
like what is done now.  Only the scoring mechanism will be lost.
Hopefully we can think of a good way to find the best tips.

 One good feature of the current Tips web site is that each tip is clearly 
 written by a specific person who is prominently credited. That gives the 
 author a good reason to correct errors and make updates. Traditionaly that 
 would not be done in a wiki, and there may be some loss.

As far as I know it's not possible to edit a tip after it has been
submitted. And many authors don't come back later.

As with all wiki's the users must refrain from messing up someone else's
work.  It's a social effort.  I think we can setup some basic rules
for the Vim tips wiki, which as that the original text is separate from
remarks and additions.  But corrections can be made in-place.

-- 
hundred-and-one symptoms of being an internet addict:
136. You decide to stay in a low-paying job teaching just for the
 free Internet access.

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