Re: How can I get rid of this popup?

2007-04-21 Thread cga2000
On Fri, Apr 20, 2007 at 11:06:24PM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:
> >I recently installed vim 7.x and I'm very impressed with all the new
> >features, especially the new tab stuff .. 
> >
> >On the other hand, I'm sorry to say that there is _ONE_ feature that's
> >literally driving me _NUTS_.
> >
> >If I hit the CTRL-P combo by accident .. "p" is very close to "[" ..
> >and I use CTRL-[ a lot .. well, some "popup menu" materializes out of
> >the blue ..  presenting me with a list of "completion" choices ..
> >
> >Thanks, but I am not senile or otherwise mentally challenged  .. I know
> >what I want to type .. and most of the time vim does not ..  and since I
> >can type reasonably well .. I do _NOT_ need this completion "feature".
> >
> >Is there any way I can turn of this completion popup .. ?
> >
> >Since unwanted popups is one of the absolute evils of the web .. I'm
> >unsure why this should have become a default feature of the current
> >version vim and I sincerely hope it will cease to be the default with
> >the next release. 
> >
> >Maybe this might make some sense for GUI users .. but could it be left
> >our of the terminal version?
> >
> >Thanks,
> >cga
> >
> >
> 
>   :imap  
> 
> will make it do nothing. Another possibility (I think) is
> 
>   :set complete=

As it turns out the way to turn this off is

:set completeopt=

I have to read the entire doc, but as far as I can tell this takes care
of reinstating the normal vim behavior where repeating CTRL-P will
toggle the successive completions.

I'll add this to my .vimrc right after this.

So, maybe I over-reacted but after over a month when I must have hit
CTRL-[ hundreds of times (I don't use the  key) .. typing CTRL-P
instead had never happened to me once.

Now, I'm in the middle of something rather involved .. it's the end of
the day .. I'm tired .. hungry .. frustrated .. and suddenly there
appears this huge long rectangle of some bright pink color masking a
sizeable chunk of whatever I am doing .. now what .. have I been
rooted..?  So unexpected that it must have taken me at least ten seconds
before I realized that this artifact was meant to be a popup menu.
Because you see, the text on this menu (non-GUI) is a barely legible
light grey on a pink background.  Even with the default color scheme.

And guess what .. after this rude encounter with progress .. I tried
to continue my editing session .. I was so upset that I kept hitting
CTRL-P instead of CTRL-[ .. must've done it a dozen times ..

I don't believe in using completion any more .. too much overhead to be
worth the trouble .. I'd rather work on my typing skills.  All the same
I'm rather curious as to why this was implemented via a popup menu that
masks part of the contents of the buffer rather than some kind of
mini-window .. 

I'll have to search the archives .. see if there was some kind of
discussion at one point over this implementation choice?

I find it rather hard to believe that I am the only user of vim to
regard this as .. hmm.. I think "wrong" is the word.

In the future I guess I'll have to read the release notes carefully to
avoid such nasty surprises.

> which should (IIUC) disable both Ctrl-N and Ctrl-P except when the popup is 
> _already_ up.
> 
> A third possibility is to disable the +insert_expand feature at 
> compile-time.
> 
> 
> BTW, me too I know what I want to type, but I found out recently that for 
> _long_ words which have already been used in the current session (or in any 
> file still listed in the buffer list) it is often more efficient (and less 
> error-prone) to type the first letter(s) then Ctrl-N, then maybe a few 
> additional Ctrl-N's to select the right entry, than to type the whole 
> shebang by hand again. If there are too many completions, Ctrl-P to get 
> back to what I typed then add letters one by one, will usually narrow the 
> choices to just a few, including the one I want.

Makes sense when you have to work on somebody else's screwy source with
function & variable names long as your arm .. maybe.  I think my main
beef with completion is that even in vim you need to juggle at least
three different mechanisms .. Insert-mode completion as above .. Ex mode
..  and whatever completions your shell allows .. The latter is not vim
sensu stricto .. but since I often escape to a shell from a vim
session, the bottom line is that it adds up to a lot of acrobatics.

So I have decided to live with the typos .. they punish me .. I improve.

> And yes, I use mostly gvim, but I would use it the same way in Console vim.
> 
> 
> As 

How can I get rid of this popup?

2007-04-20 Thread cga2000
I recently installed vim 7.x and I'm very impressed with all the new
features, especially the new tab stuff .. 

On the other hand, I'm sorry to say that there is _ONE_ feature that's
literally driving me _NUTS_.

If I hit the CTRL-P combo by accident .. "p" is very close to "[" ..
and I use CTRL-[ a lot .. well, some "popup menu" materializes out of
the blue ..  presenting me with a list of "completion" choices ..

Thanks, but I am not senile or otherwise mentally challenged  .. I know
what I want to type .. and most of the time vim does not ..  and since I
can type reasonably well .. I do _NOT_ need this completion "feature".

Is there any way I can turn of this completion popup .. ?

Since unwanted popups is one of the absolute evils of the web .. I'm
unsure why this should have become a default feature of the current
version vim and I sincerely hope it will cease to be the default with
the next release. 

Maybe this might make some sense for GUI users .. but could it be left
our of the terminal version?

Thanks,
cga




Re: wish: collaboration of N vim instances editing same file

2007-04-20 Thread cga2000
On Fri, Apr 20, 2007 at 03:55:33PM EDT, Andrew Maykov wrote:
> On 4/20/07, cga2000 <[EMAIL PROTECTED]> wrote:
> >> >   "collaboration of N vim instances editing same file"
> [there was some text]
> >> See the screen(1) man page and search for "multi".
> >Are you (Is he) talking about several users concurrently modifying the
> >same file(s) .. possibly from different geographic locations?
> >I can't think of any valid reason why one lonely user - me for instance
> >- would want to fire up several instances of vim to edit the same file.
> It can be. For example, in LNX user can edit file in text console,
> then switch to X11 and then start editor again to edit the same file,
> forgetting that other instance of VIM already launched. I in this case
> just do "killall  vim"(or "killall -9 vim", depending on mood).

Yeah .. I know .. the recipe for a happy life is good health and a bad
memory .. I have neither .. so accounting for folks who happen to be
forgetful sounds a bit far-fetched to me ..  :-)

And should vim take into account the foibles of different categories of
users in the first place?  

Thanks,
cga




Re: wish: collaboration of N vim instances editing same file

2007-04-19 Thread cga2000
On Thu, Apr 19, 2007 at 03:09:38PM EDT, Gary Johnson wrote:
> On 2007-04-11, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> >  Hello Bram,
> >  Is it possible to add this item to the vim voting list ?:
> > 
> >   "collaboration of N vim instances editing same file"
> >   -- Ability of N instances of vim to absorb, merge and show changes
> >   to the same file made by other running vim instances [ either by reading
> >   other vim's swapfiles, or somehow else ] ?
> > 
> >  Can this be added to SOC ?
> 
> If you want this collaboration to occur in real time, then I would 
> recommend that you use a screen session in multi-user mode.  This 
> solution already exists; it works with applications other than vim; 
> it avoids complicating the vim code.
> 
> See the screen(1) man page and search for "multi".

Are you (Is he) talking about several users concurrently modifying the
same file(s) .. possibly from different geographic locations?

I can't think of any valid reason why one lonely user - me for instance
- would want to fire up several instances of vim to edit the same file.

Or could he be talking about some non-interactive mode .. with possibly
scripts  updating a common file?

Sorry I hooked up to this particular message .. I no longer have the
OP's initial message.

Thanks,
cga


Re: VIM Delete All Except

2007-04-05 Thread cga2000
On Thu, Apr 05, 2007 at 10:10:03AM EDT, jas01 wrote:
> 
> I have a huge file where I need to delete all lines except for a few I need.
> I'm trying to do this in a single command.
> 
> I know that:
> 
> :v/Text/d 
> 
> will delete all lines except for ones containing 'Text.' I have no idea how
> to put multiple strings so the command deletes everything except for 'Text'
> and 'Text2' and 'Text3'.
> 
> Please help!

Maybe you're using the wrong tool to begin with?

If the file is really huge, you may find adopting a different strategy is
preferable.  

If you're on linux or similar you might use a command-line tool such as:

$ grep Text[1-3] huge_file > a_few_lines

What this does is that it finds all the lines that contain at least one
occurrence of Text1, Text2, or Text3 in ./huge_file and copies them to
./a_few.lines.

Thanks,
cga


Re: Question about paragraphs: make lines containing only whitespace characters a paragraph separator

2007-04-03 Thread cga2000
On Tue, Apr 03, 2007 at 02:00:59PM EDT, Thomas wrote:
> Hi,
> 
> This is something that I found annoying quite a time now and I'm
> pretty sure there is a simple solution for this problem.
> 
> Paragraphs are defined as:
> 
> >A paragraph begins after each empty line, and also at each of a set of
> >paragraph macros, specified by the pairs of characters in the 'paragraphs'
> >option.
> 
> I often end up with seemingly blank lines that contain whitespace 
> characters. Is there a way to make vim handle these lines as paragraph 
> boundaries too as ip does?
> 
> One could remap the {} keys but AFAIK these maps would be ignored by
> norm! and noremap commands.
> 
> Does somebody know a way to do this?
> 
> I understand this could also be considered a finesse/feature, but I 
> personally would like to have to choice to treat lines containing only 
> whitespace characters as empty lines.

Maybe I misunderstand the problem but can't you change those lines
with just blanks to empty lines?

If it's just spaces we're talking about .. not tabs or other
unprintables .. maybe something such as:

:%s/^ *$//g

.. would do it.

And map it to something convenient if you use it on a regular basis.

Or do you need to hold on to those spaces for any reason?

Thanks,
cga


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

2007-03-21 Thread cga2000
On Wed, Mar 21, 2007 at 07:16:58PM EST, A.J.Mechelynck wrote:
> cga2000 wrote:
> >On Wed, Mar 21, 2007 at 06:04:46PM EST, A.J.Mechelynck wrote:
> >>Tim Chase wrote:
> >>[...]
> >>>Just my $0.02 adjusted for inflation, minus taxes, social security, and 
> >>>medicare.
> >>>
> >>>-tim
> >>>
> >>>
> >>LOL. Must be at least $20 after adjustment, no?
> >
> >Isn't the other way 'round..?
> >
> >With 0.02 cents left for the list after adjustment?
> >
> >Thanks,
> >cga
> >

> Depends how much you reckon for inflation, and on which basis: two of 
> George Washington's cents, plus inflation, would make a goodly sum 
> nowadays, don't you think?

Yes, but as you no doubt realize, there is such a big difference in
terms of lifestyles between his time and ours that it's practically
impossible to make such comparisons just using the value of money as
your reference.

In a sense it's as bit as if for some reason you decided to move to, say
Guatemala .. where you would need to have access to quite a sizeable
income to keep up with the lifestyle of the average middle-class
Bruxellois .. but on the other hand you would live reasonably well on a
handful of euros a day if you went "native".

Just my two .. 

no that's enough .. I won't say it.

:-)

Thanks,
cga


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

2007-03-21 Thread cga2000
On Wed, Mar 21, 2007 at 06:04:46PM EST, A.J.Mechelynck wrote:
> Tim Chase wrote:
> [...]
> >Just my $0.02 adjusted for inflation, minus taxes, social security, and 
> >medicare.
> >
> >-tim
> >
> >
> 
> LOL. Must be at least $20 after adjustment, no?

Isn't the other way 'round..?

With 0.02 cents left for the list after adjustment?

Thanks,
cga


Re: Consistently exit "message display" with 'q'?

2007-03-20 Thread cga2000
On Mon, Mar 19, 2007 at 11:50:12PM EST, A.J.Mechelynck wrote:

[..]

"more" shows the colors with no problem. In general, I use:
> 
> - less
>   - when there is a long listing which I want to be able to scroll back and 
> forth, or to search with a / command
>   - not when there are interspersed ANSI-like escape sequences as in "ls 
> --color".

[OT] 

You could try "less -R".

Works for me, although a quick look at the man page suggests this might
not work under all circumstances: ".. tries to keep track .." 

In any case I have aliased "b" as in "browse" to "less -R -M" and never
had a problem.

Thanks,
cga


Re: command to indent file

2007-03-09 Thread cga2000
On Sat, Mar 10, 2007 at 01:43:50AM EST, Michael Wookey wrote:
> > In the path I often used command to indent my php file or C# file:
> > gg ... G
> > mean go to the top of file and indent code until the end of file.
> > But Unfortunately I forgot.
> > Could anyone tell me what I forgot?
> 
> :help =
> 
> For example: gg=G

Worked faultlessly on my 1000-lines docbook/xml cheat sheet.

Made my day.

Thanks,
cga


Re: pulling text to the right?

2007-02-27 Thread cga2000
On Mon, Feb 26, 2007 at 07:30:09PM EST, Lev Lvovsky wrote:
> I'm sure there's a fancy word for this, but is there any way to pull  
> text to the right?
> 
> suppose I have the following:
> 
>  COL1  INT,
>  COL2  INT,
>  COL3INT,
> 
> I'd like to get "COL3" aligned to "COL1" and "COL2", but to do that,  
> I need to put the cursor behind "COL3", hit space several times, and  
> then align "INT" with the other "INTs".  Can I put my cursor to the  
> right of "COL3", and pull it over to "INT" on the right?

I have this mapping in my ~/.vimrc that lets me enter spaces while
remaining in "normal" mode:

:nmap  i 

So in the above example I would enter:

G   /* move cursor to last line - COL3 ..*/
3 /* move COL3 three columns to the right  */
e   /* move the cursor to the '3' of COL3*/
l   /* move the cursor to the space after COL3   */
3x  /* delete three spaces to the right of COL3  */

Sounds like a lot of work but all it really adds up to is seven
easy keystrokes and the hands remain positioned on the home row.

Compare with, for instance:


i





.. fifteen keystrokes (and several moves to difficult-to reach keys)

It's obviously not what you were looking for .. but once you get used to
cursor movement commands that go beyond h,j,k,l (or worse .. arrow keys)
it can be done quickly & effortlessly.  

I admit that fluency does require a few months of practice so it's
really for you to decide whether it's worth the trouble.

Thanks,
cga



Re: How do I make the current working directory follow the active document in Gvim?

2007-02-26 Thread cga2000
On Mon, Feb 26, 2007 at 11:39:08PM EST, A.J.Mechelynck wrote:
> cga2000 wrote:
> >On Mon, Feb 26, 2007 at 08:47:00PM EST, A.J.Mechelynck wrote:
[..]
> >
> >Avant donc que d'écrire, apprenez à penser.
> >
> >(Before writing, one must learn to think) .. (rough translation)
> 
> Let's try to recapture the "alexandrine" rhythm:
> 
> Before you start to write, teach yourselves to think.

A marked improvement if I may say so.

> >
> >But I think I know where you're coming from .. and it reminds me of
> >another one of my favorites: 
> >
> >For every problem there is one solution which is simple, neat, and
> >wrong.
> >
> >H.L. Mencken.
> 
> I hark from Brussels, Belgium, if that's what you mean.

"I know where you're coming from" has nothing much to do with geography
these days.  It's more like "I hear you" .. or "I know what you're
saying". It's just one of those expressions you keep hearing.  I try to
avoid them even in informal conversations but somehow it crept into my
prose above.  I have a feeling that when used in the first person by
someone after voicing his opinion on some matter or other such as in,
for instance, "do you understand where I'm coming from? " the said
individual is trying to add more weight to that view of his by
conveying that it evolved as a result of a lengthy and presumably
painful learning experience.  When used in the second person as I did
above it probably adds a touch of empathy .. ie. not only do I
rationally understand what you are saying but I am also aware of what
led you to think thusly and feel pretty much the same myself about it.

Thanks,
cga


Re: vertically split the whole screen

2007-02-26 Thread cga2000
On Mon, Feb 26, 2007 at 06:38:35PM EST, Kamaraju S Kusumanchi wrote:
> Let's say I open a vim session by
> 
> vim -o2 file1 file2
> 
> now when inside file1, If I do
> 
> :vs file3
> 
> I will get
> 
> --
> file1 | file3
> --
> file2
> --
> 
> 
> Instead I want to get
> --
> file1 |
> --- file3
> file2 |
> --
> 
> Is there any easy way?

To switch from the first display to the second on the fly:

CTRL-w L  /* upper case  'L' !! */

Likewise you can use ..

CTRL-w H  /* ibid.  */
CTRL-w J  /* ...*/
CTRL-w K  /* ...*/

.. to rearrange the respective locations of your windows following the
usual lower case mnemonics (H=left, L=right, J=down, K=up)

Now, combined with ..

CTRL-W 

.. to navigate your vim windows and a bit of practice to get the hang of
it, you should be able to switch to just about any configuration that
suits you at any given time without thinking.

Thanks,
cga




Re: How do I make the current working directory follow the active document in Gvim?

2007-02-26 Thread cga2000
On Mon, Feb 26, 2007 at 08:06:12PM EST, A.J.Mechelynck wrote:
> cga2000 wrote:

[..]

> >2. How to use vim's help efficiently 

> here are a few examples; some of them use a fictional "subject":
> 
>   :help
>   gives you very general help. Start scrolling and you will 
>   see a list of all known helpfiles, including those added 
> locally (i.e. not 
> distributed with Vim).
>   :help subject
>   gives you help about some subject, which can be (the list is 
>   not exhaustive):
>   :help :subject
>   an ex-command, for instance the following:
>   :help :help
>   help on getting help
>   :help 'subject'
>   an option
>   :help subject()
>   a function
>   :help -subject
>   a command-line option
>   :help +subject
>   a compile-time feature
>   :help EventName
>   an autocommand event
>   :help abc
>   a normal-mode command
>   :help CTRL-B
>   a control key in Normal mode
>   :help i_abc
>   :help i_CTRL-B
>   the same in Insert mode
>   :help v_abc
>   :help v_CTRL-B
>   the same in Visual mode
>   :help c_abc
>   :help c_CTRL-B
>   the same in Command-line mode
>   :help user-toc.txt
>   table of contents of the User Manuel
>   :help digraphs.txt
>   the top of the helpfile "digraph.txt"
>   similarly ofr any other helpfile
>   :help pattern
>   get a helptag matching /pattern/
> If 'wildmenu' is ON, the last one above will (if there are at least two 
> matches) replace the bottom statusline by a menu. Navigate with  
> , move up or down directory trees with  , accept with 
> , abort with  -- see ":help 'wildmenu'" for details
>   :help pattern
>   see all possible matches at once
>   :helpgrep pattern
>   search the whole text of all helpfiles for the given 
>   pattern. Results are built into a "quickfix error file" and can 
> be viewed 
> with
>   :cn
>   next match
>   :cprev
> or
>   :cN
>   previous match
>   :cfirst
>   :clast
>   first or last match
>   :copen
>   :cclose
>   open/close the quickfix window

This is beginning to make more sense. 

I need to xml-ize the above into a docbook table and add it to my
little cheat sheet.

Thanks for all the details.

> But, like a dictionary or an encyclopedia, the Vim help system also lends 
> itself to "reading by the Montecarlo method" and to "the dictionary game":
> 
> - Montecarlo method: start anywhere and read what you find there. Read on. 
> When bored, open another page at random.
> - the Dictionary Game: Start by the Montecarlo method. When you see a 
> subject name (here anything in dark green) with which you are not familiar, 
> look it up (here: double-click it or hit Ctrl-] on it). Repeat until 
> bedtime.

Or to paraphrase Marguerite Duras .. "Des journées entière dans les livres".

Thanks,
cga


Re: How do I make the current working directory follow the active document in Gvim?

2007-02-26 Thread cga2000
On Mon, Feb 26, 2007 at 08:47:00PM EST, A.J.Mechelynck wrote:
> cga2000 wrote:
> [...]
> >I find the exercise useful since as, I believe, A. Einstein once
> >remarked .. if you can't explain it .. you don't fully understand it ..
> >or something to that effect.
> 
> Some French author of the 17th century I think (Boileau?):
> 
> Ce qui se conçoit bien s'énonce clairement
> Et les mots pour le dire arrivent aisément.
> 
> (What one conceives well is expressed clearly
> And the words to describe it come to mind easily.) I don't 100% agree.

Maybe because you leave out the context.  This is indeed from Nicolas
Boileau's l'Art Poétique .. a treatise on writing .. recommendations
relative to style .. etc. 

As far as I can remember this was mainly in reaction to the appalling
state of French "official" poetry of the time .. you know, all that
artificial stuff with shepherds and shepherdesses ..

Another one he wrote could probably be added to netiquette manuals
without changing a comma:

Avant donc que d'écrire, apprenez à penser.

(Before writing, one must learn to think) .. (rough translation)

But I think I know where you're coming from .. and it reminds me of
another one of my favorites: 

For every problem there is one solution which is simple, neat, and
wrong.

H.L. Mencken.

> [...]
> >I often think that the intrinsic quality of vim@vim.org adds
> >considerable value to an already great piece of software.  What I
> >particularly like about it is that you can come up with a naive or even
> >dumb question and within the hour, somebody will come up with the answer
> >to the question you should have asked.
> 
> Yes, I agree. Sometimes before your mailer comes around to polling the 
> server again, three or four people will have answered with so many 
> different -- and valid -- solutions to your problem.
> 
> -- Pierre Larousse wrote: /A dictionary without examples is a skeleton./ 
> I'll add: The best-coded program won't spread well if it hasn't got good 
> documentation. (Let me rephrase this, since after all there exist some 
> badly-coded and badly-documented programs which do spread well because huge 
> marketing $$$ are spent on them. So let'say: ) Good documentation is a plus 
> for any program; a well-coded and well-documented program will need hardly 
> any marketing effort. The Vim code isn't bad, and it benefits from the 
> Bazaar model, but the Vim documentation is _outstanding_. /Everything/ is 
> in there. It's so complete that at times, it poses sort of a 
> needle-and-haystack problem, 

I tend to consider that vim@vim.org is actually a priceless extension to
the vim documentation system. 

> but even that has been addressed with features 
> like helptag completion, help hyperlinks, and the :helpgrep command. Then 
> these mailing lists carry that a step further: if RTFM doesn't get you what 
> you want, come here and you'll find "real people" who will show you where 
> to look and what to do.

I have had this feeling before that learning vim is a bit like mastering
craft and consider myself a lucky apprentice.

> >I am subscribed to about 25 mailing lists at this point and the only one
> >that comes close is the TeX/LaTeX list.  Interestingly enough there is
> >very little "trolling" on vim@vim.org .. as if the quality of the posts
> >acted as a deterrent.
> >
> >Thanks
> >cga
> 
> The patience and good humor of the old-timers here (first and foremost 
> Bram) certainly acts by virtue of example. Another possibility (but I'm on 
> less firmer ground there): maybe these lists are too confidential to 
> attract a lot of trolls?

And possibly a consensus that if anyone barges in with outrageous
nonsense he will be met with complete silence.  He will feel like the
idiot that he is and go sell his wares elsewhere.

Thanks,
cga


Re: How do I make the current working directory follow the active document in Gvim?

2007-02-26 Thread cga2000
On Mon, Feb 26, 2007 at 12:32:19PM EST, Tim Chase wrote:
> >>- To change (once) to the dir of the current file
> >>
> >>:cd %:p:h
> >
[..]
> 
> If you're impatient, full details can be found at
> 
>   :help filename-modifiers
> 
> >2. How to use vim's help efficiently 
> 
> There are several attacks one can use to get Vim's help to spit 
> out helpful stuff.  In this case, I found it by typing
> 
>   :help :p
> 
> and then hitting control+D instead of  which causes Vim to 
> show auto-completion for what you've typed so far.  This brought 
> back 6 columns of 11 rows each of possibilities, 

Yes, I did that :-)

> but most of them 
> were clearly not what I was looking for (there was something 
> after the ":p").  The one that looked most promising was "::p" 
> which, though somewhat strange-looking, turned out to be what I 
> wanted.

Missed it .. and if I had seen it .. I probabably would have looked it
up just out of curiosity.

:-)

> Another attack might be to use
> 
>   :helpgrep :p
>   :copen

.. and to think that I have this on my own little personal cheat sheet
and never really used it up to now.  The nice thing is that you can then
use "/" to skim the output.  Sometimes the difficulty is not so much
learning the rich vim feature-set but integrating it to your day-to-day
habits.  Thank you so much for the reminder .. I feel guilty now so that
should help me do some :helpgrepping regularly from now on.

> This opens a quickfix window (":help quickfix-window") of all the 
> hits in the help where ":p" appears in the help.  While I get 
> just shy of 400 hits back, there are some obviously good leads 
> and some obviously bogus leads among the chaff.  One of the nice 
> things is that you can use regexps in your search, so you can 
> change it to
> 
>   :helpgrep :p\>

.. even cooler than my uneducated method.

> to winnow that list down to 47 according to the help I have here. 
>A number of the top hits come back in cmdline.txt, all fairly 
> clustered together, so any of them would be a good starting 
> candidate.  Just navigate to a prospective candidate and hit 
>  to jump to that piece of the helpfile.
> 
> These two methods are my usual attack into finding something in 
> the vim-help.  If these don't get you to where you want to go, 
> it's often a matter of finding the right search keyword/pattern. 

added to my cheat sheet .. which I try to write more as a
"task-oriented" document than a mere collection of commands.

I find the exercise useful since as, I believe, A. Einstein once
remarked .. if you can't explain it .. you don't fully understand it ..
or something to that effect.

>  I've been stumped by this before (just this month) and the 
> mailing list is quite friendly about answering questions as well 
> as guiding you in with keywords.  In my case it was finding what 
> turned out to be ":help i_CTRL-G_u" and Yakov was able to dig it 
> up in the help using the phrase "break undo" which I hadn't come 
> up with.
> 
> So dig a bit with the above tools, and if you hit a wall, drop a 
> line on the list with what you want and what you've tried, and 
> I'm sure you'll get all sorts of good answers back.

I often think that the intrinsic quality of vim@vim.org adds
considerable value to an already great piece of software.  What I
particularly like about it is that you can come up with a naive or even
dumb question and within the hour, somebody will come up with the answer
to the question you should have asked.

I am subscribed to about 25 mailing lists at this point and the only one
that comes close is the TeX/LaTeX list.  Interestingly enough there is
very little "trolling" on vim@vim.org .. as if the quality of the posts
acted as a deterrent.

Thanks
cga




Re: How do I make the current working directory follow the active document in Gvim?

2007-02-26 Thread cga2000
On Mon, Feb 26, 2007 at 12:24:33PM EST, Sibin P. Thomas wrote:
> 
> -Original Message-
> From: cga2000 [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 26, 2007 10:28 PM
> To: vim@vim.org
> Subject: Re: How do I make the current working directory follow the active
> document in Gvim?
> 
> On Sun, Feb 25, 2007 at 07:57:39PM EST, A.J.Mechelynck wrote:
> [..]
> > 
> > - To change (once) to the dir of the current file
> > 
> > :cd %:p:h
> 
> Nice. 
> 
> But I'm not going to remember it until I understand it.
> 
> I scoured the :help files but couldn't find and explanation of the
> syntax. 
> 
> :p is short for :print and :h is help.
> 
> So there's two things I don't know:
> 
> 1. The symbolic (?) language you are using - the same that's used when
>scripting vim, I would imagine.
> 
> 2. How to use vim's help efficiently 
> 
> :-)
> 
> Thanks,
> 
> Cga
> 
> 
> 
> 2. How to use vim's help efficiently --> try :help topic.
> If that doesn't give you what you want try -> :helpgrep topic (followed by
> :cwin if needed).
> 
> Try :helpgrep %:p:h  you will find the meaning of %:p:h

Interesting approach.. 

.. a bit like doing a google search on the vim helpfiles in a sense.  

All it brings up in my case is references to the "what's new with vim
6.x as compared with vim 5.x" but with difficult cases, this should give
me enough pointers to search the manuals.

Thanks,
cga


Docbook edit-compile-edit cycle in vim

2007-02-26 Thread cga2000
Too quick posting ...

Sorry,
cga


edit-compile-edit cycle in vim

2007-02-26 Thread cga2000
I'm currently giving docbook a go and was wondering whether there might
be a plugin in vim70 that might help make the experience a little less
painful or more productive.  

I found one called "dbhelper" at vim.org and was wondering if anyone
is using it..  Is it still maintained .. mature .. etc. ??

It also appears to cover the docbook/sgml/openjade toolchain rather
than XSL/XML, which is what I am using and doesn't seem to have been
enhanced recently.

Or is there something more current and more adapted to my needs that I
failed to locate -- entering the "XML" keyword on the script search
screen at vim.org gives me an error message "can't connect to local
MySQL server throught socket '/tmp/mysql.sock'".

Thanks,

cga


Re: How do I make the current working directory follow the active document in Gvim?

2007-02-26 Thread cga2000
On Sun, Feb 25, 2007 at 07:57:39PM EST, A.J.Mechelynck wrote:
[..]
> 
> - To change (once) to the dir of the current file
> 
>   :cd %:p:h

Nice. 

But I'm not going to remember it until I understand it.

I scoured the :help files but couldn't find and explanation of the
syntax. 

:p is short for :print and :h is help.

So there's two things I don't know:

1. The symbolic (?) language you are using - the same that's used when
   scripting vim, I would imagine.

2. How to use vim's help efficiently 

:-)

Thanks,

cga


Re: hlsearch on dark back ground

2007-02-21 Thread cga2000
On Wed, Feb 21, 2007 at 05:25:41PM EST, Kamaraju S Kusumanchi wrote:
> A.J.Mechelynck wrote:
> 
> > 
> > Most console terminals have only 8 background colours, 16 foreground
> > colours. Some have 16 of both. Non-bright yellow (including every
> > "background" yellow) is usually shown as brown. Whether you can or cannot
> > change the terminal's colour palette is outside the realm of Vim.
> > 
> > 
> > Best regards,
> > Tony.
> 
> How can I find out how many colors the konsole is using, how many colors the
> xterm is using? Any idea? I am using Debian Etch.

$ strings $(which xterm) | grep ^color[0-9]

Thanks,
cga


Re: How to directly enter visual mode from insert mode ?

2006-10-03 Thread cga2000
On Tue, Oct 03, 2006 at 05:55:31PM EDT, Dasn wrote:
> On Tue, Oct 03, 2006 at 06:05:30PM +0200, Ivan Vecerina wrote:
> > This is a problem I am occasionally stumbling on:
> > as I am done typing some new next in insert mode, I want
> > to highlight and erase some text ahead of the insert point.
> > 
> > Best case, I can type:   lv
> 
> I prefer using "v" or "v" to switch to Visual mode
> temporarily

Shoot .. this was hidden on the next page and I didn't see it until it
was too late ..

:-( :-( :-(

Oh well .. should convince the OP that this is the way to go.. 

And then it may have the opposite effect...

:-)

Thanks

cga


Re: How to directly enter visual mode from insert mode ?

2006-10-03 Thread cga2000
On Tue, Oct 03, 2006 at 12:05:30PM EDT, Ivan Vecerina wrote:
> This is a problem I am occasionally stumbling on:
> as I am done typing some new next in insert mode, I want
> to highlight and erase some text ahead of the insert point.
> 
> Best case, I can type:   lv
> But if I am at the end of the line, this won't work
>  (the last character I inserted will be selected as well).
> 
> It would be nice if there was a convenient way to go
> directly from insert mode to visual mode, while ensuring
> that the visual selection starts at the current insertion
> point.
> Is there an easy way to do so ?

I do a Ctrl-O and then the lv commands .. May be convenient or er ..
less so .. depending on where you want to start you visual highlighting.
If you need to prefix three of four movement commands by a Ctrl-O to get
there it may be worth your while to escape back to command mode.

YMMV

Thanks

cga


Re: vim backspace

2006-10-02 Thread cga2000
On Mon, Oct 02, 2006 at 04:07:10PM EDT, Charles E Campbell Jr wrote:
> cga2000 wrote:
> 
> >I don't suppose there's any way I can save the current interactively-
> >modified colorscheme to a file?
> >
> 
> Perhaps http://vim.sourceforge.net/scripts/script.php?script_id=1081 
> will be helpful for what
> you want to do.  Interactively adjust the colorscheme using hicolors' 
> colorscheme editor, then save it.

I'll take a look.  It may give me ideas on how to improve the
methodology outlined in my previous message.

Only problem I see is that I don't use a mouse.

Thanks

cga


Re: vim backspace

2006-10-01 Thread cga2000
On Sun, Oct 01, 2006 at 12:29:24PM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:

[..]

> I suppose it's explained under ":help :highlight" and below more than 
> anywhere else (sections 12 and 13 of syntax.txt -- it's rather lengthy); 
> but it's mainly something you have to "learn by doing".

I think I was unclear.

What I'm doing is using an existing colorscheme as a template.  

I proceed to make some changes to it while editing some sample file ..
Could be C code .. email .. python .. latex .. html whatever.  This
gives me instant feedback so I can see with my own eyes whether I have a
pleasant and "readable" shade of grey .. pink .. blue .. etc. 

Heck .. I use a 256-color xterm and well I'm working on it but I haven't
yet managed to memorize all of them .. color113 .. color178 .. I don't
even know if they're reds..  greens .. or blues.

I thought that doing it this way would make it a lot more easier than
coding a colorscheme from scratch and hoping for the best.

But then I went looking for a "save current colorscheme" feature and
didn't find one.  So I had to go through the hassle of figuring out what
I did by retrieving the successive commands that I issued.

Just another case of barking the wrong tree .. just editing the color
scheme in one half of my display .. saving it and loading the modified
version to check the results is just as quick and decidedly better than
issuing :hi commands manually since it ..

1. saves a good deal of typing  .. and .. 

2. once you're satisfied with the result .. you're done.  The last
   version of the colorscheme that you saved corresponds exactly to what
   you are looking at.

Thanks for helping me figure out a more sensible methodology.

cga



Re: first character cutted when v,j,x

2006-10-01 Thread cga2000
On Sun, Oct 01, 2006 at 09:33:37AM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:
> [...]
> >.. sounds fishy .. in a cell terminal how could a character be between
> >characters.. except by being invisible?
> >
> >:-)
> >
> [...]
> 
> Windows, even more than "modern" Unixes (those with X11), is GUI-oriented. 
> On Windows, IIUC, only old Dos hands like me, hackers, and Unix users ever 
> use the Dos Box. Other people use WYSIWYG interfaces like Word, and their 
> cursor is not a character, nor does it cover a character; it is a blinking 
> bar between characters. Gvim imitates that quite well, except that the gvim 
> cursor must always be thought of as being "on" a character, even in Insert 
> mode when it displays as a thin vertical bar on the left edge of the 
> character cell.

Very interesting.

Thanks

cga


Re: vim backspace

2006-10-01 Thread cga2000
On Sun, Oct 01, 2006 at 08:34:50AM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:

[..]

> There are a number of colorschemes in $VIMRUNTIME/colors/ ; I'm adding
> my own rather simple one (attached) as an additional source of
> inspiration.
> 
> To invoke a colorscheme, use the ":colorscheme" command with the
> script name (not including the .vim extension).
> 
> After making changes to your current colorscheme, ":syntax on" will
> reapply it.

This would reload the original colorscheme .. doing a "reset defaults"
or rather original color scheme, if there is one .. so-to-speak ..
right?

I don't suppose there's any way I can save the current interactively-
modified colorscheme to a file?  What I mean is that .. I use a given
colorscheme and make changes to it in a Vim session .. say, I want the
cusor to be easier to see :-) .. or I don't like the reverse-vid effect
that hilights searched/found items .. etc.  

So I play with all this stuff for 10 minutes until I like what I see.
And when I'm done with my changes, I want to save them somewhere .. Now,
I still need to copy the original colorscheme under a different name and
edit it manually to implement my changes one at a time, am I correct?

The way I do this is to split the screen .. so I have the colorscheme in
one half and my sample practice file in the other .. So, I use the 
cursor key to retrieve my ":hi" commands .. gnu/screen to copy/paste
them in the colorscheme in lieu or the original statements .. and save
my changes to colorscheme_custom .. eg.  

Rather messy but safe .. As long as I can figure out which among the
dozens of commands I issued were the "final" ones for a particular :hi
feature, that is ..

I wasn't too sure where I could look for this (keywords?) .. but I didn't
find anything like this either in the tips/scripts or in the help files.

Thanks

cga


Re: first character cutted when v,j,x

2006-10-01 Thread cga2000
On Sat, Sep 30, 2006 at 08:35:04PM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:
 
[..]

> What you highlighted includes the cursor 

Misuse of "v" was the issue and explains why Vim thus behaves.

Since "v" is "per character" visual mode .. vjj does not make much sense
in the first place ..  using the wrong tool .. Either you do a Vjj .. or
vj etc. (or vj$ not very logical but at least is consistent).

Now that you have told me what to look for, I can see that cursor .. and
everything falls into place.

> (move the cursor to the other end 
> with o -- and with selection=inclusive -- to check it). The Unix default is 
> to delete the whole Visual area, including the cursor character. This, 
> IIUC, predates Vim. The Windows default is different: on Windows, in 
> non-Vim programs, the bar cursor is between characters, not on a character, 

.. sounds fishy .. in a cell terminal how could a character be between
characters.. except by being invisible?

:-)

> and the highlighted area (when using shift-right or shift-down, i.e.,
> forward motions) stops left of the cursor. The purpose of the
> confusing "exclusive" behaviour on Windows is to cater to the peculiar
> customs of Windows users. Notice that gvim has a block cursor in
> Visual mode when 'selection' is "inclusive", and a thick bar cursor
> when it is "exclusive".

> Note: to highlight and delete full lines, use linewise visual mode
> (with V not v). Linewise-visual always includes (and highlights) the
> cursor line.

Which is what I did without understanding why .. just worked.

Makes a lot of difference to know why, though .. Since this is general
to all movement/selections it explains a number of other behaviors that
have baffled me in the past. 

As always, thanks for your enlightening comments.

cga


Re: vim backspace

2006-10-01 Thread cga2000
On Sat, Sep 30, 2006 at 03:25:08PM EDT, samitj wrote:

[..]

> 2) I modified my .vimrc file with some color settings. However, now I just
> get a blank screen with my xterm color covering the whole screen - cant see
> any text. HOw do I fix this?

I find that rather than making extensive changes to my .vimrc, a useful
approach is experimenting in Command-line mode .. one color change at a
time .. 

This lets you test your changes interactively before adding them to your
.vimrc.

Thanks

cga



Re: first character cutted when v,j,x

2006-09-30 Thread cga2000
On Sat, Sep 30, 2006 at 06:03:28PM EDT, Dasn wrote:

[..]

> > How to make linux gvim behave like windows vim ("l" not cutted)?

> Take a look at your 'selection', it should be 'exclusive' on your
> windows platform.
> 
> For more info:
> 
> :h :behave
> :h 'selection'

Could you explain further? 

After reading the recommended help files I still don't see the logic of
Vim deleting more characters than what I highlighted in the first place
_and_ making this the default in *nix environments.

What am I missing and what is the purpose of this confusing behavior?

Thanks

cga


Re: first character cutted when v,j,x

2006-09-30 Thread cga2000
On Sat, Sep 30, 2006 at 11:11:02AM EDT, Eddy Zhao wrote:
> Hello all,
> 
> I find a behaviour difference between windows gvim & linux gvim.
> For text like below
> 
> line 1
> line 2
> line 3
> 
> Following the sequence below
> - move focus to first line first character
> - v
> - j
> - j
> - x
> 
> On windows gvim, text remained is "line 3"
> On linux gvim, text remained is "ine 3"
> 
> How to make linux gvim behave like windows vim ("l" not cutted)?

Doesn't have to be "g"vim .. same behavior in plain console vim ..

I have to do a Vjjx (instead of vjjx) so vim doesn't gobble up the "l"
of "line 3".

Wonder why.

Thanks

cga


Re: Paragraph formatting options

2006-08-28 Thread cga2000
On Mon, Aug 28, 2006 at 10:15:00AM EDT, Mikolaj Machowski wrote:
> Dnia sobota, 19 sierpnia 2006 05:36, cga2000 napisa?:
> >
> > Is there any way I can tell Vim that when line 1 starts with a number
> > followed by a dot '.' .. the following lines should be indented so that
> > all the text is aligned.
> >
> > Not simple .. I guess .. since this could move into double digits (or
> > more..) -- there could be more than nine numbered paragraphs and text
> > should start in column 5 (or 6..).
> 
> Vim7 option 'formatlistpat'::
> 
> set formatlistpat=^\\s*\\(\\d\\+\\\|[A-Za-z]\\\|ps\\)[\\]:.)}]\\s\\+
> 
> will format digit and alpha/Alpha lists plus postscripts in mails.
> 
.. and I can't even test it since I'm still running Vim 6.4.

:-(

I'll add it to my .vimrc as a comment so I don't lose it .. and keep you posted
after I upgrade.

Thanks

cga


Re: "The Vim Outliner": \ does not work

2006-08-28 Thread cga2000
On Sun, Aug 27, 2006 at 10:46:01PM EDT, Meino Christian Cramer wrote:

[...]

>  My question: When using the \x (x := [1-9at]) commands from above,
>  they do simply nothing. I check with :map wheter there is anoter
>  maplocalleader defined but it ios not. Furthermore, the commands are
>  listed.

When I first atttempted to use plugins that required typing +
such as the "\x" you mention above .. it did not work either.

What I later found was that I had to type the "\" and the following character(s)
fairly rapidly.  Otherwise the action would time out .. leaving me with just
the character(s). 

But in your particular case this would amount to typing "x", which in command
mode would normally delete the character under the cursor.

So, I'm not sure this will help.

Thanks

cga


Re: Paragraph formatting options

2006-08-27 Thread cga2000
On Sun, Aug 27, 2006 at 02:37:54PM EDT, Gary Johnson wrote:
> On 2006-08-27, cga2000 <[EMAIL PROTECTED]> wrote:

[..]

> > Is there a way I can list current keyboard mappings?
> 
> You can get a list of user-defined mappings by executing
> 
> :map
> 
> and a list of the default bindings here:
> 
> :help index
> 
> See also:
> 
> :help map-listing
> :help map-which-keys
> :help 40.1

This is cool..!

Thanks

cga


Re: Paragraph formatting options

2006-08-27 Thread cga2000
On Sat, Aug 26, 2006 at 05:09:35AM EDT, Gary Johnson wrote:
> On 2006-08-24, cga2000 <[EMAIL PROTECTED]> wrote:
> > On Sat, Aug 19, 2006 at 01:45:32AM EDT, Gary Johnson wrote:
> > > On 2006-08-19, cga2000 <[EMAIL PROTECTED]> wrote:
> > 
> > [..]

>  Each Windows machine, on the other hand, is its own little universe:
>  every application you want to use has to be installed on it and every
>  customization has to be applied to each machine individually.  I
>  can't believe anyone actually thinks the system administration cost
>  of Windows is less than that of Unix, if you include the cost of
>  users doing their own administration.  (Grumble grumble.)

Of course, nobody *really* thinks that .. it's all about the guys on the
top floor no longer feeling nervous about lowly system administrators
doing things that they do not understand.  Next thing you would be the
one running the company ..  

:-)

> > Is there any way I could map a simple toggle to (de)activate fo+=a
> > (auto-format) .. so I can get rid of it quickly when it starts causing
> > problems .. such as editing mail headers in mutt .. eg. ??
> 
> Try this:
> 
> map   :if match(&fo, 'a') != -1  set fo+=a  else 
>  set fo-=a  endif

should be:

 .. if match() == -1 ..

Is there a way I can list current keyboard mappings?

Thanks

cga


Re: Paragraph formatting options

2006-08-25 Thread cga2000
On Fri, Aug 25, 2006 at 07:02:15AM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:

[..]

> >
> >OK. I had tested both data entry syntaxes -- just Ctrl-K or Ctrl-V
> >followed by Ctrl-K.  I did that with the middle dot and I was getting an
> >"invalid character" error message ..
> >
> >But then I was unsure how you were supposed to enter the character and
> >figured that the problem was that I needed to enter a Ctrl-V before the
> >Ctrl-K .. when in fact what probably happened was that I was doing
> >something wrong .. inverting the digraph's two characters, maybe .. who
> >knows.
> >
> >With your explanations above, I gave it another shot and this time
> >everything works as advertised. 
> >
> >My only problem now is that both looks very nice indeed and I'm not sure
> >which one I am going to use.
> 
> Which one you use will of course be your own choice; but if you are 
> undecided, I recommend the currency sign, which is more visible in all 
> fonts (including any fonts you may use in the future): in the Courier 
> font I'm using in this mail client, the middle-dot is a single pixel, 
> not very easy to notice. Or you may want to use a different style of 
> bullets for nested lists (bulleted lists within bulleted lists).
> 
> >
> >Also, first thing I did was a 
> >
> >:set encoding=latin1
> [...]
> 
> If you had something else before (such as cp1252 or cp850), it may have 
> helped.
> 
Well, that was obviously not relevant to my problem but it did surprise
me that ":set enc?" yielded "encoding=".

So it's not set to anything by default. 

Presumably this means that it just picks up the current locale, right?

And Vim's rationale here is to display "nothing" unless I modified the
default.

Thanks

cga


Re: Paragraph formatting options

2006-08-25 Thread cga2000
On Thu, Aug 24, 2006 at 10:40:40PM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:
> >On Sat, Aug 19, 2006 at 01:32:33AM EDT, A.J.Mechelynck wrote:
> >>cga2000 wrote:
> >
> >[..]

> >This is weird .. I'm sure I replied to this and yet there's no trace
> >of my reply anywhere. 
> >
> >>>I'll probably use the dot '.' .. hope it doesn't clash with
> >>>anything..
> >>>
> >>>Or maybe there's a :digraph that would look good and yet not cause
> >>>trouble in email, printouts, .. eg.
> >
> >[..]
> >
> >Thank you for your suggestions.

> >>If you're using Latin1 or UTF-8, you may try:
> >>
> >>- Currency sign (decimal 164, ?, ^KCu)
> >>- Middle dot (decimal 183, ·, ^K.M)

> >I did both:
> >
> >:set com+=fb:Cu
> >:set com+=fb:.M
> >
> >.. entered via a Ctrl-V Ctrl-K followed by the digraph .. and they do

> don't use Ctrl-V before the Ctrl-K. Just Ctrl-K followed by the
> digraph.  In each case you should see one character (a hollow bullet
> with outgrowing teeth on the four diagonals, or a dot at mid-height)
> appear as soon as you type the second character of the digraph. But if
> 'encoding' is neither Latin1 nor UTF-8 these characters may or may not
> exist.

OK. I had tested both data entry syntaxes -- just Ctrl-K or Ctrl-V
followed by Ctrl-K.  I did that with the middle dot and I was getting an
"invalid character" error message ..

But then I was unsure how you were supposed to enter the character and
figured that the problem was that I needed to enter a Ctrl-V before the
Ctrl-K .. when in fact what probably happened was that I was doing
something wrong .. inverting the digraph's two characters, maybe .. who
knows.

With your explanations above, I gave it another shot and this time
everything works as advertised. 

My only problem now is that both looks very nice indeed and I'm not sure
which one I am going to use.

Also, first thing I did was a 

:set encoding=latin1

> >not seem to be recognized.  When I reach the specified textwidth the
> >text entered wraps to column 1.
> >
> >.. I also tried with asterisk '*' and the result is different and
> >rather unexpected:  When I reached the end of the first line, Vim
> >automatically inserts an asterisk and a space in columns 1-2 before
> >carrying over the word I started on the previous line.  The strange
> >thing about this is

> looks like Vim is treating ' *' in columns 1-2 as the middle part of a 
> 3-part comment of this kind:
> /*
>  *
>  *
>  *
>  */
> according to was already set in 'comments' and in particular 
> s1:/*,mb:*,ex:*/
> 
> >that if I do a:
> >
> >:set com=fb:*
> >
> >.. instead of 
> >
> >:set com+=fb:*
> >
> >this problem goes away (line 2 wraps to column 3 as expected).
> 
> Without the + you set the option from scratch; with it you add to what 
> was already set. See ":help 'comments'".
> 
Yes, that's what I meant.  When I use '=' instead of '+=" everything
else in "com" is wiped out .. so that's why I started suspecting that
something else in my default "com" settings was causing this.

I'll see tomorrow if I can figure it out.

BTW .. I had such a mess in "set com?" at one point that I tried a:

set com-=

.. Vim didn't complain .. but didn't do anything either ..

Guess I'll have to play with this a little more to figure it out .. and
read the ":h comments" help file as directed.

Thank you very much .. nifty little tricks like this always make my
day..!!

cga


Re: Paragraph formatting options

2006-08-25 Thread cga2000
On Sat, Aug 19, 2006 at 01:45:32AM EDT, Gary Johnson wrote:
> On 2006-08-19, cga2000 <[EMAIL PROTECTED]> wrote:

[..]

> > I'm three hours behind/ahead of you (EST) .. so it's bedtime for me .. 

> It's getting late here, too, but I just got a new Windows PC and two 
> new flat-panel monitors that I share between the Windows PC and my 
> Linux PC, so I'm trying to get everything configured the way I want.

So .. how did it go..?

By the way, I was pretty sick with the flu (!) when I last posted and I
really could have sworn (same as with Tony M.) that I had replied to
this message. 

> > Main thing that I have to figure out is a simple way to get back to
> > column 1 when starting a new list item.  When I am done entering
> > item #1, I need to type "2." in columns 1 and 2 and if I just hit
> > enter to start a new line, Vim jumps to column 4.  So I escape back
> > to command mode .. Vim moves the cursor to column 1 .. I hit "i" .. 

> Just hit Ctrl-D after the enter that finishes the item.  Actually,
> you can hit Ctrl-D any time while you're typing the next numbered
> line.  That will move the line one shift-width to the left, just as
> '<<' does in normal mode.
> 
Perfect .. 

> > Also, I created a ten-item list and the text in item #10 and items
> > #1 to #9 is not aligned.  So I select the column that has the space
> > that separated 1. .. 2. .. from the text  .. yank it .. and
> > hit "p" causing Vim to indent the text in items 1-9 by an additional
> > column.  Need to check the help files .. see if there's a better
> > way.

> I usually usually use Ctrl-V to select the first column of text, 
> then type 'I' and a space and .  Your method is slightly 
> better, as long as you're not using tabs and a deeply-indented list.
> 
Well .. I have installed a plugin that causes  to do completion in
insert mode (instead of entering a tab ..) .. so I have to do a Ctrl-V
 .. so I don't use tabs very often these days.

I probably need to get rid of the plugin but for the life of me, I
can't rememeber what it's called.

:-)

> > Lastly.. I need to check what happens with fo+=a .. see if this
> > plays well with automatic formatting of paragraphs.  Hopefully Vim
> > will reflow text without losing track of the list indent.

> It seems to work well most of the time, but there are a few cases
> where it doesn't, notably when a sentence ends in a number, such as a
> year or a model number, and that number wraps to the start of the next
> line.  Then vim insists on indenting the line following that number as
> though the number was a list item.  Like this, assuming a narrow
> 'textwidth':

> Columbus sailed the ocean blue in
> 1492.  Then some more text just to 
>fill in the line.

gotcha ..

> Consequently, I never include 'n' and 'aw' in 'fo' at the same time.
> 
Is there any way I could map a simple toggle to (de)activate fo+=a
(auto-format) .. so I can get rid of it quickly when it starts causing
problems .. such as editing mail headers in mutt .. eg. ??

Thanks again. 

cga


Re: Paragraph formatting options

2006-08-24 Thread cga2000
On Sat, Aug 19, 2006 at 01:32:33AM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:

[..]

This is weird .. I'm sure I replied to this and yet there's no trace of
my reply anywhere. 

> >I'll probably use the dot '.' .. hope it doesn't clash with anything..
> >
> >Or maybe there's a :digraph that would look good and yet not cause
> >trouble in email, printouts, .. eg.

[..]

Thank you for your suggestions.

> If you're using Latin1 or UTF-8, you may try:
> 
> - Currency sign (decimal 164, ?, ^KCu)
> - Middle dot (decimal 183, ·, ^K.M)

I did both:

:set com+=fb:Cu
:set com+=fb:.M

.. entered via a Ctrl-V Ctrl-K followed by the digraph .. and they do
not seem to be recognized.  When I reach the specified textwidth the
text entered wraps to column 1.

.. I also tried with asterisk '*' and the result is different and rather
unexpected:  When I reached the end of the first line, Vim automatically
inserts an asterisk and a space in columns 1-2 before carrying over the
word I started on the previous line.  The strange thing about this is
that if I do a:

:set com=fb:*

.. instead of 

:set com+=fb:*

this problem goes away (line 2 wraps to column 3 as expected).

Are there conflicting values in my default ..  

:set com?

> - or even a lowercase o, but in that case you should make sure that it 
> isn't recognised as a bullet unless followed by a space or tab.

Will keep this one in mind in case I can't get either or the above to
work. 

I'm running Vim 6.4 .. in case it matters.

Thanks

cga


Re: Email Text Formatter Plugin

2006-08-21 Thread cga2000
On Mon, Aug 21, 2006 at 11:55:54PM EDT, Pete Johns wrote:
> On Mon, 2006-08-21 at 23:47:56 -0400, cga2000 sent:
> >Someone on the list recently suggested I use "gqip" to reflow
> >paragraphs and I was going to suggest that.  Much to my delight,
> >I later found that it also preserved the ">" characters in
> >e-mail messages, so I was going to recommend using that.
> >
> Indeed. This would work well for a given paragraph.
> 
> >:h gq tells me that the general format is gq{motion} .. but what
> >kind of motion is "ip"..?  "i" should move the cursor up just
> >one line but what about "p"..?
> >
> Close but no cigar. 'k' would move up a line. 'ip' is Inner
> Paragraph. 
> 
> See:
> 
> :he ip
> 
> :he object-motions will help you speed up your Vim usage.
> 
> 
> Best;
> 
> --paj
> 
gotcha .. :-(

and thanks much for your last tip.. or pointing me in the right
direction I should say..!

Thanks

cga


Re: Email Text Formatter Plugin

2006-08-21 Thread cga2000
On Mon, Aug 21, 2006 at 10:08:50PM EDT, Pete Johns wrote:
> On Mon, 2006-08-21 at 20:54:21 -0500, Tom Purl sent:
> >I'm looking for a simple function that will reformat a selected
> >block of text for e-mail messages (80 columns long, preserving
> >">" characters, etc).  Vim Cream can do this very well, but the
> >functionality doesn't easily translate to vanilla Vim from what
> >I can see, and I prefer using Vim instead of Cream.
> >
> >Is there a function that allows me to do this for Vim?
> >
> Have you tried 'gq'? This works perfectly for me with visual
> blocks.

Someone on the list recently suggested I use "gqip" to reflow paragraphs
and I was going to suggest that.  Much to my delight, I later found that
it also preserved the ">" characters in e-mail messages, so I was going
to recommend using that.

I find it quicker than entering visual mode.

This thread made me realize that I do not even understand how gqip
"works"..?

:h gq tells me that the general format is gq{motion} .. but what kind of
motion is "ip"..?  "i" should move the cursor up just one line but what
about "p"..?

Thanks

cga


Re: gvim fullscreen mode on Gnome ?

2006-08-19 Thread cga2000
On Sat, Aug 19, 2006 at 01:01:37PM EDT, A.J.Mechelynck wrote:
> KLEIN Stéphane wrote:
> >2006/8/19, A.J.Mechelynck <[EMAIL PROTECTED]>:
> >>KLEIN Stéphane wrote:
> >>> Hi,
> >>>
> >>> is there gvim full screen mode feature on GNU/Linux Gnome... ?
> >>>
> >>
> >>I don't think there is a full-screen mode as such, but on any
> >>version of gvim you can do:
> >>
> >
> >I speak about fullscreen without window decorator...
> >
> >
> >
> 
> I don't think you can have a (non-minimized) gvim screen without a
> titlebar; but I don't know everything. If by any chance it is
> possible, it would, I suppose, be set by command-line options specific
> to the particular GUI you are using. Such options might be unmentioned
> in the Vim help, in which case you would have to dig into whatever
> documentation there is for your particular flavour of Gnome and/or GTK
> (either Gnome1 and GTK+1 or Gnome2 and GTK+2 IIUC).
> 
In WindowMaker you can remove stuff like the titlebar .. status bar ..
scroll bar(s).. all that useful (?) stuff that bars you from optimal use
of your display's real estate. 

I understand you can use wmaker as gnome's "window manager".

Thanks

cga


Re: Paragraph formatting options

2006-08-18 Thread cga2000
On Sat, Aug 19, 2006 at 12:22:56AM EDT, Gary Johnson wrote:
> On 2006-08-18, Gary Johnson <[EMAIL PROTECTED]> wrote:
> 
> > For bulleted lists using '-',
> > 
> > set com+=fb:-
> > 
> > or '*',
> > 
> > set com+=fb:*
> > 
> > but those should already be part of the default 'comments' option
> > unless you have changed it.
> 
> I just checked again.  "fb:-" is there by default; I added "fb:*" in 
> my .vimrc and ftplugin/mail.vim.
> 
I'll probably use the dot '.' .. hope it doesn't clash with anything..

Or maybe there's a :digraph that would look good and yet not cause
trouble in email, printouts, .. eg.

Thanks again,

cga


Re: Paragraph formatting options

2006-08-18 Thread cga2000
On Sat, Aug 19, 2006 at 12:15:10AM EDT, Gary Johnson wrote:
> On 2006-08-18, cga2000 <[EMAIL PROTECTED]> wrote:
> 
[help creating numbered and bulleted lists in Vim]
> 
> For numbered lists,
> 
> set fo+=n
> 
> For bulleted lists using '-',
> 
> set com+=fb:-
> 
> or '*',
> 
> set com+=fb:*
> 
> but those should already be part of the default 'comments' option
> unless you have changed it.  (Odd that numbered lists and bulleted
> lists use different options.)
> See
> 
> :help 'fo'
> :help 'com'
> 
> I also have '2' as part of my 'formatoptions' string.  I don't think
> it affects lists, but you might try it if those other settings don't
> work as you'd like them to.
> 
Looks very promising. 

I'm three hours behind/ahead of you (EST) .. so it's bedtime for me .. 

Main thing that I have to figure out is a simple way to get back to
column 1 when starting a new list item.  When I am done entering item
#1, I need to type "2." in columns 1 and 2 and if I just hit enter to
start a new line, Vim jumps to column 4.  So I escape back to command
mode .. Vim moves the cursor to column 1 .. I hit "i" .. 

Also, I created a ten-item list and the text in item #10 and items #1
to #9 is not aligned.  So I select the column that has the space that
separated 1. .. 2. .. from the text  .. yank it .. and hit "p"
causing Vim to indent the text in items 1-9 by an additional column.
Need to check the help files .. see if there's a better way.

Lastly.. I need to check what happens with fo+=a .. see if this plays
well with automatic formatting of paragraphs.  Hopefully Vim will
reflow text without losing track of the list indent.

Thank you very much..

cga


Re: Paragraph formatting options

2006-08-18 Thread cga2000
On Fri, Aug 18, 2006 at 08:12:01PM EDT, Alan G Isaac wrote:
> On Fri, 18 Aug 2006, apparently wrote: 
> > but what is this 
> > gwap (or :gwap ..) command? 
> > Seems it is not recognized by Vim 6.3 
> 
> :h gw
> 
guess what .. I was mistyping it ..

.. something like gwa- I guess ..

didn't realize it was gw+[motion] 

:-(

> Enjoy.
> 
Many thanks.. I certainly do..!

I there a way I can enter effortlessly stuff like the following:

1. this is a numbered paragraph several lines long and I would like all
lines aligned with the "this" which starts in column 4.  I don't know if
it's good typography but I use these numbered lists a lot and with the
text aligned I think it looks better.

.. and format it like this:

1. this is a numbered paragraph several lines long and I would like all
   lines aligned with the "this" which starts in column 4.  I don't know 
   if it's good typography but I use these numbered lists a lot and with
   the text aligned I think it looks better.

.. or possibly make Vim indent this automatically when typing..?

I mean that I usually have a textwidth of 72 and Vim automatically wraps
to line 2 after I have written the "all" at the end of line 1 .. but
obviously Vim has no reason to indent and therefore starts line 2 and
the following lines in column 1. 

Is there any way I can tell Vim that when line 1 starts with a number
followed by a dot '.' .. the following lines should be indented so that
all the text is aligned.

Not simple .. I guess .. since this could move into double digits (or
more..) -- there could be more than nine numbered paragraphs and text
should start in column 5 (or 6..).

Or maybe somone has written a script that can convert a bunch of
paragraphs into something like a numbered (or bulleted) list?

Thanks

cga


Re: Paragraph formatting options

2006-08-18 Thread cga2000
On Fri, Aug 18, 2006 at 02:12:19PM EDT, Alan G Isaac wrote:
> Try this:
> set fo+=w and then leave no white space after your 
> outdented header. Then you can gwap to your hearts 
> content.
> 
> Not quite what you asked for ...
> 
I realize that this is not what you asked for either .. but what is this
gwap (or :gwap ..) command?

Seems it is not recognized by Vim 6.3.

Another good reason to upgrade?

Thanks

cga


Re: Color change of :set cul or -V

2006-08-15 Thread cga2000
On Tue, Aug 15, 2006 at 08:49:51PM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:
[..]
> >
> >What's "cul"..?
> >
> 
> It's an option which is new in version 7.
> 
> In version 7 Vim, ":help cul", or, more properly, ":help 'cul'", shows 
> the help for the 'cursorline' option. There is also a 'cursorcolumn' 
> (aka 'cuc') option. These are boolean options; when on, the cursor line 
> and/or the cursor column are highlighted with a different highlight 
> group than the default "Normal" group, helping you to easily find your 
> cursor if the blinking isn't enough for you.
> 
Thanks much for answering. 

Yet another reason why I should be upgrading.

Thanks

cga


Re: Color change of :set cul or -V

2006-08-15 Thread cga2000
On Fri, Aug 11, 2006 at 10:42:31AM EDT, striker wrote:
> I am using colorscheme vo_dark.  When I :set cul or use visual  
> highlighting, the color for the highlight is light gray and makes the  
> highlighted text very difficult to see.
> 
> The first few lines are:
> 
> let g:colors_name="VO Dark"
> hi normal guifg=darkgreen guibg=black ctermfg=darkgreen ctermbg=black
> hi StatusLine guifg=darkgreen guibg=black ctermfg=darkgreen  
> ctermbg=black
> hi StatusLineNC guifg=darkgreen guibg=black   ctermfg=darkgreen  
> ctermbg=black
> hi VertSplit guifg=darkgreen guibg=black  ctermfg=darkgreen 
> ctermbg=black
> hi OL1 guifg=darkgreenctermfg=darkgreen
> hi OL2 guifg=red  ctermfg=red
> hi OL3 guifg=lightbluectermfg=lightblue
> hi OL4 guifg=violet   ctermfg=magenta
> hi OL5 guifg=darkgreenctermfg=darkgreen
> hi OL6 guifg=red  ctermfg=red
> hi OL7 guifg=lightbluectermfg=lightblue
> hi OL8 guifg=violet   ctermfg=magenta
> hi OL9 guifg=darkgreenctermfg=darkgreen
> 
> My question is this:
>   What do I need to look for and change in order to implement a new  
> color for the highlighting?
> 
Sorry I'm behind with my howmework ..

What's "cul"..?

Is it a new feature with Vim 7.0?

Here, :help cul says

E149: Sorry, no help for cul

Thanks

cga


Re: Show/Hide Split Windows

2006-08-10 Thread cga2000
On Thu, Aug 10, 2006 at 03:28:22PM EDT, Charles E Campbell Jr wrote:
> cga2000 wrote:
> 
> >On Thu, Aug 10, 2006 at 02:42:57PM EDT, Rodolfo Borges wrote:
> > 
> >>On 8/10/06, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote:
> >>   
> >>>Type   ctrl-w o  to toggle between maximizing one window and restoring
> >>>to all.   By maximizing, I mean that the current
> >>>window will take over the entire display, not leaving a lot of status
> >>>bars around.
> >>> 
> >>Actually,  Ctrl-w o  will close all other windows.
> >>You can't get back to them using  Ctrl-w o  again
> >>
> >Immediately went to check that.  How stupid of me not to have tried it,
> >I thought.  Well unfortunately all I got was an error - Ye already have
> >only one window.
> 
> Please look at the rest of my email concerning the ZoomWin plugin.  It 
> what makes  ctrl-w o  do the
> trick mentioned above.  And, of course, there's always my website 
> (http://mysite.verizon.net/astronaut/vim)
> where I keep the latest versions (albeit perhaps still alpha/beta-ish) 
> of my plugins.

This is weird .. I got the message you are referring to after I posted
mine .. although the one I was replying to was posted later to the list.

Thanks much for taking the trouble to write this reminder.  The plugin
does exactly what I want.

Thanks,

cga


Re: Show/Hide Split Windows

2006-08-10 Thread cga2000
On Thu, Aug 10, 2006 at 02:42:57PM EDT, Rodolfo Borges wrote:
> On 8/10/06, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote:
> >Type   ctrl-w o  to toggle between maximizing one window and restoring
> >to all.   By maximizing, I mean that the current
> >window will take over the entire display, not leaving a lot of status
> >bars around.
> 
> Actually,  Ctrl-w o  will close all other windows.
> You can't get back to them using  Ctrl-w o  again
> 
Immediately went to check that.  How stupid of me not to have tried it,
I thought.  Well unfortunately all I got was an error - Ye already have
only one window.

Question:

Could this be scripted -- using the error code from the failed C-O
attempt to "restore" the previous layout?

1. When in split mode:

   . Vim saves screen layout -- size, position, etc.
   . Vim hides all buffers save the current one
   . Vim maked the current buffer stretch to occupy entire window

2. When not in split mode:

   . Vim checks whether there's is a "previous" split mode
   . If so, Vim restores the previous layout
   . If not, displays error message

Would be very cool, afaic ..save me having to look for and then memorize
yet another mapping.

:-)

I use :unhide N but it's usually a pain restoring the layout via C-W +
{H/J/K/L} and then having to resize the sub-windows.  But then, I'm no
unhide master.

Thanks,

cga.


Re: fonts for gui menu (gtk)

2006-08-05 Thread cga2000
On Sat, Aug 05, 2006 at 12:11:04PM EDT, Andrei A. Voropaev wrote:
> On Sat, Aug 05, 2006 at 08:47:42AM -0400, cga2000 wrote:
> > On Sat, Aug 05, 2006 at 05:53:56AM EDT, Andrei A. Voropaev wrote:
> > > Hi!
> > > 
> > > Can anyone explain me how the font for menu in GUI is selected? I have 3
> > > computers with the same set of fonts and the same configuration for
> > > fonconfig, the same version of gvim (different GTK though) and on all
> > > 3 machines I get different menu font :) The worse is on the laptop.
> > > There the font is large and in Bold, so it takes quite a big portion of
> > > the fairly small screen :)
> > 
> > Does this affect all gtk apps or just gvim?
> 
> Hm. Firefox is OK. xine has the same problem, but it is not compiled
> with GTK. Aha, gimp has exactly the same menu. So it is problem of GTK. 

This may be a gross misunderstanding on my part but this sounds like
the version of FF you are running is fontconfig-aware while the other
apps ain't.

I sorted out my GUI font problems about eighteen months ago and my
memories are getting a bit shaky now -- especially since I decided some
3-4 months ago to dump the GUI for good.
> 
> > In my case all gtk apps -- such as gimp, mozilla, .. were using the same
> > oversized and rather ugly font.
> > 
> > I solved my global gtk font problems by editing the contents of:
> > 
> > ~/.gtkrc
> > ~/.gtkrc-2.0
> 
> Hm. I didn't have neither of these files and didn't know how
> to create them. 

I found that the safest/quickest way is to: 

1. Download and install gnome
2. Start a gnome session & tweak your fonts
3. Optionally, remove gnome from your HD

Yes, I'm still a little pissed about the whole thing.

:-)

> Googling didn't provide any samples neither. So, I guess
> this is a top secret info :) 

This is precisely the problem I ran into.

> Fortunately I've found gtk-chtheme program
> and using it could set up better alternative.
> 
> Thank you for the tip.

Glad I could help.  

Thanks

cga


Re: fonts for gui menu (gtk)

2006-08-05 Thread cga2000
On Sat, Aug 05, 2006 at 05:53:56AM EDT, Andrei A. Voropaev wrote:
> Hi!
> 
> Can anyone explain me how the font for menu in GUI is selected? I have 3
> computers with the same set of fonts and the same configuration for
> fonconfig, the same version of gvim (different GTK though) and on all
> 3 machines I get different menu font :) The worse is on the laptop.
> There the font is large and in Bold, so it takes quite a big portion of
> the fairly small screen :)

Does this affect all gtk apps or just gvim?

In my case all gtk apps -- such as gimp, mozilla, .. were using the same
oversized and rather ugly font.

If you problem is only with gvim you can probably ignore the following.

I solved my global gtk font problems by editing the contents of:

~/.gtkrc
~/.gtkrc-2.0

..yes, *both* of them *and* on the same system..!!

Other options:

. if you have the gnome desktop installed there is a nice interactive
  option that let's you change gtk menu/dialog fonts (sizes.. styles..)

. if you don't have access to gnome you could try gtk-theme-switch or
  gtk-theme-switch2 that also let you change gtk fonts on the fly.

If would be careful editing the .gtkrc files.. IIRC, there's a comment
in the default files that says something like "automatically gen'd..
don't edit.." so you probably want to save their current contents
somewhere before doing anything. 

Thanks

cga


Re: cterm256?

2006-08-04 Thread cga2000
On Fri, Aug 04, 2006 at 09:12:46AM EDT, Mikolaj Machowski wrote:
> Hello,
> 
> Since Konsole in KDE 3.5.4 supports 256 colors it could be nice if
> Vim could use them. Is any way to convince Vim to use guibg/guifg from
> syntax files in console?
> 
If I understand correctly one problem is to map the 256 available
colors to the 64K or 16M colors available in the gui.

So just changing the keywords in the color scheme is not enough.

Thanks

cga


Re: using vim with GNUscreen

2006-08-03 Thread cga2000
On Thu, Aug 03, 2006 at 01:20:13PM EDT, uber goonz wrote:
> 
> Hi, I am having problem using vim when i invoke it from GNUscreen.
> 
> i have the following vimrc
> 
> set nocompatible
> set showmatch
> set ruler
> set virtualedit=all
> set number
> set title
> set ls=2
> set tabstop=4
> set shiftwidth=4
> 
> syntax on
> set background=dark
> 
> it works from from normal terminal. but  when i start vim in
> GNUscreen, the color is always screwed up.
> 
> :(
> 
I have vim running on a 256-color gnu/screen on a 256-color xterm and
I have not noticed any color-related problems. 

Could you post two screenshots (vim under gnu/screen & native terminal)
that show the differences?

Here's a screenshot of vim running a slightly modified version of the
bluez.vim color scheme that I posted not long ago:

http://www.geocities.com/cga/vim.png

The vim session is running under gnu/screen -- see the status bar at
the bottom of the screen.

As far as I can tell it's perfectly identical to the "native xterm"
version.

Thanks

cga


Re: Problem with (backslash) - Update

2006-08-03 Thread cga2000
On Wed, Aug 02, 2006 at 02:11:36PM EDT, A.J.Mechelynck wrote:
[..]
> see
>   :help 'timeout'
>   :help 'ttimeout'
>   :help 'timeoutlen'
>   :help 'ttimeoutlen'
> 
shame on me..

":h timeout" followed by a  would have gotten me all four of
'em.. 

:-(

> For instance, to time out mappings after 10 seconds but keyboard 
> auto-generated key sequences (for special keys in some terminals) after 
> 0.25 seconds:
> 
>   :set timeout timeoutlen=1 ttimeoutlen=250
> 
> The 'ttimeoutlen' setting should be large enough for your hardware 
> (including the communication line if you're using Vim on a remote 
> machine); 'timeoutlen' should be large enough for your typing speed 
> (including hesitations).
> 
My feeling is that this behavior is not obvious unless (until) you
become a fairly mature user.  I initially posted this a month ago
because I couldn't figure out what was happening and only just realized
that this is just how Vim works in the case of multicharacter commands.

When this didn't work with the latex suite commands a couple of days
ago.. I automatically tried typing faster and only after the fact did I
"rationally" guess what must be going on behind the scenes.

Well.. if anything, this may come in handy when/if another novice runs
into the same problem and googles for a similar problem.

Thanks

cga


Re: ESC key is too far away.

2006-08-02 Thread cga2000
On Wed, Aug 02, 2006 at 07:09:24PM EDT, Brian Dorsey wrote:
> On 8/2/06, cga2000 <[EMAIL PROTECTED]> wrote:
> >On Wed, Aug 02, 2006 at 05:20:05PM EDT, Brian Dorsey wrote:
> >I think that's the one I downloaded once.
> >
> >Only problem I have with it is that when you only bring up Windows
> >occasionally each time you boot you need to bring up the Cpanel >
> >keyboard popup, go to the new tab added by the add-on and then hit
> > to activate it for the duration of your session.
> >
> >You wouldn't happen to know whether there is a way this can be automated
> >so that the remapping is done transparently every time you start
> >Windows, by any chance?
> 
> I think this may be a different application. It is a stand-alone
> application which modifies the registry. The changes I've made on a
> couple of machines have survied reboots every time.
> 
Yeah, you're right.

Right now I am in linux and it was not possible to boot into Windows so
I didn't check.  But I ran a "locate" against the windows filesystem and
the add-on is actually called keyremap.  It's part of a bunch of
"Windows Toys" if that kinda rings a bell. 

It basically adds an extra tab to the standard keyboard popup and lets
you do some keyboard remapping but unless I am unaware of some of its
advanced functions the changes are lost every time you reboot.

Thanks anyway.. I'll check whether there is a Win98 version of the app
you are using.

Thanks

cga


Re: ESC key is too far away.

2006-08-02 Thread cga2000
On Wed, Aug 02, 2006 at 05:20:05PM EDT, Brian Dorsey wrote:
[..]
> 
> I use KeyTweak for my CAPS re-mapping needs (in windows):
> http://webpages.charter.net/krumsick/
> 
I think that's the one I downloaded once.

Only problem I have with it is that when you only bring up Windows
occasionally each time you boot you need to bring up the Cpanel >
keyboard popup, go to the new tab added by the add-on and then hit
 to activate it for the duration of your session. 

You wouldn't happen to know whether there is a way this can be automated
so that the remapping is done transparently every time you start
Windows, by any chance?

Thanks

cga


Re: Problem with (backslash) - Update

2006-08-02 Thread cga2000
On Tue, Jul 04, 2006 at 02:24:35AM EDT, cga2000 wrote:
> I have the vimspell plugin installed and I am able to use the ':'
> commands but the \.. shorcuts are not working the way I expected:
> 
> If I type \sA to start autospell mode for instance I get:
> 
> . a beep for the backslash
> . a switch to insert mode for the s
> . an inserted capital "A"
> 
Apparently, after I type the backslash Vim waits for ensuing
characters.  If none are entered before a timeout expires Vim acts on
the "\".  

Since when I do this I am in "command" mode and "\" by itself is not
mapped to anything .. Vim beeps .. complaining I entered a command he
knows nothing about.

Then Vim processes the "s" -- deleting the character under the cursor
and switching to insert mode .. and since I am now in insert mode..
inserts an "A"

Questions:

1. Is the above interpretation correct?

2. Is there any way I can increase the timeout?

3. If not, what's a good substitute  for the backslash?

Thanks

cga


Re: Visual select / paste behaviour

2006-07-28 Thread cga2000
On Fri, Jul 28, 2006 at 09:48:21AM EDT, Jürgen Krämer wrote:
> 
> [Resending this because I noticed that the original mail had been
> encoded with base64 by either my mail client or a server on the way
> to the mailing list.]
> 
> Hi,
> 
> Roel Vanhout wrote:
> > 
> > Take the following example:
> > 
> > c:\test.txt
> > 
> > When the cursor is on the 'm' of 'myid' and I press 'vw', a word is 
> > selected in visual mode. However, the " at the end of 'myid' is also 
> > selected. How do I change the list of 'word separators'?
> 
> to be exact 'w' in visual word does NOT select a word but it extends the
> current selection to the START of the next "word" (for a definition of
> "word" see ":help word"). So in your case 'viw' would be better. This
> starts visual mode and selects the Inner Word. This works on any letter
> of "myid" and does not select the following quote.
> 
cool.

Thanks

cga


Re: Other European languages on a US keyboard

2006-07-25 Thread cga2000
On Tue, Jul 25, 2006 at 03:09:29AM EDT, A.J.Mechelynck wrote:
[..]
> >
> >>and it can change fonts on-the-fly (change 
> >>the font from Courier to Lucida to whatever, only through Vim keyboard 
> >>commands). 
> >
> >I would never want do that.. but just out of curiosity.. why would that
> >not be possible in an xterm?
> 
> because console Vim has no control over the xterm's fonts.
> 
ok.  a bit more flexible than toggling the xterm's font.
> >
> >>It can do "real" boldface and italics, as well as straight or 
> >>curly underlining. 
> >
> >That would be for highlighting stuff, right? So the same functionality
> >can be achieved with colors.  And in a more pleasing manner IMHO.. the
> >color schemes that I have seen that use italics have not convinced me.
> 
> I do html a lot, and it helps me to see italics, bold italics, 
> bold underlined italics, underlined 
> italics,underlined text all displayed like they should. 

.. meaning you can toggle between the source version and the rendered
version of the document in Vim?

> Of course colours can do it, but console vim has only 16 bg and 16 fg 
> colours: the list is soon over.

.. my mistake.. I never counted them and I thought that console Vim on
a 256-color xterm was capable of displaying 256 colors simultaneoulsy.

[..]
> 
> Note: ":setl fenc=latin9" follows by ":setl fenc?" returns 
> "iso-8859-15". This is normal, they are two names for the same thing.
> 
> >
> >So this should help clarify the issue.

> >>For more details, see
> >>  :help mbyte.txt
> >>  http://vim.sourceforge.net/tips/tip.php?tip_id=246
> >>  section 37 (last) of the Vim FAQ 
> >>http://vimdoc.sourceforge.net/htmldoc/vimfaq.html
> >>  http://www.unicode.org/
> >>  http://www.cl.cam.ac.uk/~mgk25/unicode.html

Thanks

cga


Re: Other European languages on a US keyboard [OT]

2006-07-25 Thread cga2000
On Tue, Jul 25, 2006 at 10:27:58AM EDT, Russell Bateman wrote:
> [more way off topic comments]
> 
[...]
> Phonemes are (very) roughly equivalent to syllables and exist at the 
> oral or phonetic level. French has the peculiarity, more than most other 
> Western languages in my observation, of its end of word phonemes being 
> greatly ambiguous due to the erosion from Latin already mentioned. 
> Hence, it's easier to find rhymes both rich and otherwise in French even 
> across gender boundaries (whereas Italian and Spanish have kept the o/a 
> alternance when French erodes both feminine am and masculine um to 
> silent e). The resulting explosion in "jeux de mots" (puns), so looked 
> down upon or at least smirked at in English, is inexplicably prized in 
> French (where it is so much more common in the first place): "Le  
> _saint_ père, _sain_ de corps et d'esprit, _ceint_ de vertu, couvait le 
> mal dans son _sein_." (The _holy_ father, while _healthy_ in body and 
> spirit, and _girded_ with virtue, nourished evil in his _breast_. All 
> these underlined words are pronounced identically. There's yet another 
> word or two in French pronounced the same way, but it's been too many 
> years and I can't seem to conjure them up at the moment.

"seing" .. as in "blanc-seing"
> 
> If Linguistics paid a decent wage, I probably wouldn't be writing C
> code for a living.
> 
> Is this off-topic or what?
> 
> Russ
> 


Re: Other European languages on a US keyboard

2006-07-24 Thread cga2000
On Mon, Jul 24, 2006 at 11:38:30PM EDT, A.J.Mechelynck wrote:
[..]
> >>
> >.. with all the goings-on in this thread I never had a chance to
> >mention the fact that I do not use gvim. I try to do everything in a
> >terminal (under gnu/screen) because text-mode apps were designed for
> >the keyboard so they work a lot better than gui's for those of us who
> >prefer not to use mice.
> 
> Gvim can use keyboard commands just like console Vim, 

.. that's where I disagree.. either you stick with Vim commands and
":commands" and you don't need the gui.. or you you have to have a
mouse for company and you belong in Notepad hell. :-)

Of course you can use the keyboard to navigate most modern gui's..
kinda works.. But, any routine action will always be not only
considerably slower in a gui than a terminal-based app but *also*
requires a lot more cycles of you own personal cpu, thus distracting you
from what you are doing.  Now why would I put up with that ugly GTK
clutter that I never use when I can use a nice streamlined interface
that does not distract me from what I am doing?

I *much* prefer something simple like the bluez.vim color scheme that I
have slightly modified for my own use.

http://www.geocities.com/cga/vim.png

FYI - it took me more than five years before I began to suspect that
there had to be a better way to interface with the machine.. than the
gui, that is. Sure.. with non-gui stuff there is a learning curve.. but
as soon as you're over the top.. gee.. now I'm in heaven..

> or mice-addicted 
> people can use that too. It has a lot more different coulours (typically 
> 16 million rather than 16) 

good point.  A 256-color terminal is IMHO an absolute necessity. I
don't think more than that is any use in text-mode apps, though. 

> and it can change fonts on-the-fly (change 
> the font from Courier to Lucida to whatever, only through Vim keyboard 
> commands). 

I would never want do that.. but just out of curiosity.. why would that
not be possible in an xterm?

> It can do "real" boldface and italics, as well as straight or 
> curly underlining. 

That would be for highlighting stuff, right? So the same functionality
can be achieved with colors.  And in a more pleasing manner IMHO.. the
color schemes that I have seen that use italics have not convinced me.

> And it can use Unicode: see further down.
> 
> >
> >> :echo has("multi_byte")
> >>
> >>the answer should be 1. If it is zero, your version of gvim cannot
> >>handle UTF-8.
> >>
> >Works fine if I switch my locale to UTF-8.  Vim automatically figures
> >what I want and :dig displays the "o dans l'e" (both the lower and upper
> >case versions) among a gazillon other digraphs. Then I can use the
> >ususal Ctrl-K oe .. save the file.. pass this on to LaTeX and provided I
> >have the correct LaTeX statements to activate UTF-8 (that's what took
> >forever to figure out the other day..) I get my "coeurs", "voeux" and
> >"boeufs" rendered correctly in xdvi/gv .. *and* the the ensuing
> >printout looks great too.
> >
> >The problem with this is that I haven't found a comfortable way to
> >run Vim in UTF-8 mode and the rest of my stuff in 8-bit mode.
> 
> Well, in an xterm (or konsole, or Windows Dos Box), console Vim is 
> dependent on xhatever charset the console is using. If you xterm (or 
> whatever) is in Latin1, you cannot use French oe anymore than you can 
> use Cyrillic or Greek. Gvim, on the other hand, can display anything for 
> which you have a glyph in a font.

hmm.. looks like with terminals you need to be 100% UTF-8.. locale..
font.. terminal.. vim encoding.. for it to work.

http://www.geocities.com/cga/vimgold.png

The silly sample text I wrote while practicing LaTeX clearly has
problems with the "o dans l'e" rendered as a ½ (latin9 encoding).. 

garbled words are "coeur" and "oeufs"..

This is with a latin9 encoding.. If I switch to utf8 all the accented
letters are displayed as  ..  .. etc.  

I'll have to bounce my X session some time tomorrow and switch back my
locale to UTF-8 fire up X and a uxterm and see what happens.

Where would I switch to UTF-8 in gvim..  Couldn't find the option in
the menus..  Maybe it just isn't there because my X session's locale is
set to en_US?

Ah shoot.. I had promised myself I wouldn't let myself be dragged into
another UTF-8 wild goose chase.. it's now past 2 A.M. .. and guess what
I'm doing.. 

:-)

[..]
> 
> 
> So what is Unicode and what is UTF-8.
> 
> Unicode is a system to allow using *together* all writing systems known 
> to man. That's a lot. A "character space" with over 1 billion slots has 
> been set apart for all those characters.
> 
> Unicode is also a number of 'encodings' -- manners to represent that 
> data in memory or on a storage medium. The simplest of these encodings 
> is UTF-32 (aka UCS-4): use 32 bits for each characters, in the 
> endianness of your machine. The most economical is usually UTF-8, which 
> uses between one and four bytes per character; also, it re

Re: Other European languages on a US keyboard

2006-07-24 Thread cga2000
On Mon, Jul 24, 2006 at 08:29:10PM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:
> >On Mon, Jul 24, 2006 at 05:59:42PM EDT, Christian Ebert wrote:
> >>* A.J.Mechelynck on Saturday, July 22, 2006 at 22:40:45 +0200:
> >>>The French oe (o, e-dans-l'o) is not defined in the Latin1 encoding, 
> >>>neither in capitals (as for titles or if the word "oeuf" [egg] is the 
> >>>first of a sentence), nor in lowercase. You need UTF-8 for it,
> >>No. Just latin9 or ISO8859-15 (Look at the header of this mail).
> >>
> >>Mon coeur.
> >>
> >>This is on a Mac with a German keyboard, but using actually an
> >>American keyboard layout. I enter the "oe" with Alt-q (the "Alt"
> >>key on Mac keyboard corresponds to the Modifier key on other
> >>keyboards I believe).
> >
> >Could this be Mac-specific? 
> >
> >I switched to encoding=latin9.
> >
> >When I do a Ctrl-K o e and a Ctrl-K O E this is what I get:
> >
> >½ ¼ 
> >
> >confirmed by the :dig command.
> >
> >I looked carefully at the output of :dig and I couldn't see our elusive
> >"e dans l'o" either.
> >
> >So I switched to the French ISO-08859-15, then the US version of
> >latin9.. still can't find that "o dans l'e".
> >
> >Strange thing is that the font I use on terminals does have these two
> >characters (upper/lower case E dans l'O..) in the exact same spot Vim
> >displays the above fractions.. 
> 
> Try the following (in gvim):
> 
.. with all the goings-on in this thread I never had a chance to
mention the fact that I do not use gvim. I try to do everything in a
terminal (under gnu/screen) because text-mode apps were designed for
the keyboard so they work a lot better than gui's for those of us who
prefer not to use mice.

>  :echo has("multi_byte")
> 
> the answer should be 1. If it is zero, your version of gvim cannot
> handle UTF-8.
> 
Works fine if I switch my locale to UTF-8.  Vim automatically figures
what I want and :dig displays the "o dans l'e" (both the lower and upper
case versions) among a gazillon other digraphs. Then I can use the
ususal Ctrl-K oe .. save the file.. pass this on to LaTeX and provided I
have the correct LaTeX statements to activate UTF-8 (that's what took
forever to figure out the other day..) I get my "coeurs", "voeux" and
"boeufs" rendered correctly in xdvi/gv .. *and* the the ensuing
printout looks great too.

The problem with this is that I haven't found a comfortable way to
run Vim in UTF-8 mode and the rest of my stuff in 8-bit mode.

Over the week-end I found that I can run Vim in a separate "unicode"
xterm but that's not what I want because I lose screen's copy/paste and
more importantly it destroys my attempt at running a fully integrated
"desktop".

Other problems that I have run into is that text files created when in
UTF-8 mode are a mess when browsed in latin1/9 mode.  I also have
problems when I print "unicode" files.. I once created a nice table
with those box-drawing characters that were available in UTF-8 mode and
it was really nice on-screen.. but when I tried to print it, all I got
was rows and columns of questiion marks.

So I switched back to latin1 pending better internationalization support
in some applications (slrn, ELinks.. mutt should workd but it's tricky)
and maybe more importantly until I acquire a better understanding of
running a unicode locale in X/linux and the implications thereof..

>  :if &tenc=="" | let &tenc = &enc | endif | set enc=utf-8 :new
> 
> then i (set Insert mode) and ^Vu0153 (where ^V is Ctrl-V, unless you
> use Ctrl-V to paste, in which case it is Ctrl-Q).
> 
> If you see anything other than the oe digraph, then your 'guifont' is
> plain wrong. See http://vim.sourceforge.net/tips/tip.php?tip_id=632
> about how to choose a better one.
> 
Well.. actually.. I ran some tests in latin-9 earlier.. trying to figure
out this "o dans l'e" business.. that was on a linux console..  and
that's where I realized that I was still running a unicode font.. both
on the linux console and in 'X'.. :-) .. It seems I never switched back
after my brief incursion into unicode territory..  and since I haven't
had any problems displaying and printing text since I switched back.. I
would say that the font is ok..  And that UTF-8 stuff is indeed
backward-compatible?

The font is called "terminus" and I like it a lot because it looks like
a fixed-width version of MS's Verdana, which is my favorite screen font.

see http://.geocities.com/cga/wee.png for an excellent
screenshot.

Thanks

cga


Re: Other European languages on a US keyboard

2006-07-24 Thread cga2000
On Mon, Jul 24, 2006 at 05:59:42PM EDT, Christian Ebert wrote:
> * A.J.Mechelynck on Saturday, July 22, 2006 at 22:40:45 +0200:
> > The French oe (o, e-dans-l'o) is not defined in the Latin1 encoding, 
> > neither in capitals (as for titles or if the word "oeuf" [egg] is the 
> > first of a sentence), nor in lowercase. You need UTF-8 for it,
> 
> No. Just latin9 or ISO8859-15 (Look at the header of this mail).
> 
> Mon coeur.
> 
> This is on a Mac with a German keyboard, but using actually an
> American keyboard layout. I enter the "oe" with Alt-q (the "Alt"
> key on Mac keyboard corresponds to the Modifier key on other
> keyboards I believe).

Could this be Mac-specific? 

I switched to encoding=latin9.

When I do a Ctrl-K o e and a Ctrl-K O E this is what I get:

½ ¼ 

confirmed by the :dig command.

I looked carefully at the output of :dig and I couldn't see our elusive
"e dans l'o" either.

So I switched to the French ISO-08859-15, then the US version of
latin9.. still can't find that "o dans l'e".

Strange thing is that the font I use on terminals does have these two
characters (upper/lower case E dans l'O..) in the exact same spot Vim
displays the above fractions.. 

I'm lost.
> 
> $ echo $LANG
> en_US.ISO8859-15
> 
> Alain Bench @ mutt-users pointed me to this site:
> 
> 
> 
> where you can get also a little utility at
> 
> 
> 
> It gives the following output here:
> 
> 
> [Latin1/9] If there's no real copyrightsymbol at the end of this sentence,
> then your terminal/terminalemulator/font is not ISO8859-1/15 ready: ©
> 
> - Current environment settings:
>   LANG= "en_US.ISO8859-15"
> 
> - Implicitly setting all locale categories with LANG succeeded.
> 
>   Testing LC_CTYPE with isprint():
>   # # # # # # # # # # # # # # # # 
>   # # # # # # # # # # # # # # # # 
> ! " # $ % & ' ( ) * + , - . / 
>   0 1 2 3 4 5 6 7 8 9 : ; < = > ? 
>   @ A B C D E F G H I J K L M N O 
>   P Q R S T U V W X Y Z [ \ ] ^ _ 
>   ` a b c d e f g h i j k l m n o 
>   p q r s t u v w x y z { | } ~ # 
>   # # # # # # # # # # # # # # # # 
>   # # # # # # # # # # # # # # # # 
>     ¡ ¢ £ EUR ¥ ? § ? © ª « ¬ ­ ® ¯ 
>   ° ± ² ³ ? µ ¶ · ? ¹ º » OE oe ? ¿ 
>   À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï 
>   Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß 
>   à á â ã ä å æ ç è é ê ë ì í î ï 
>   ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ 
>   
> - Testing LC_MESSAGES with perror(), but it's a libc message.
> 
> - Implicitly setting LC_CTYPE by LANG succeeded.
> - Implicitly setting   LC_NUMERIC by LANG succeeded.
> - Implicitly setting  LC_TIME by LANG succeeded.
> - Implicitly setting   LC_COLLATE by LANG succeeded.
> - Implicitly setting  LC_MONETARY by LANG succeeded.
> - Implicitly setting  LC_MESSAGES by LANG succeeded.
> 
> 
> Mind you, what you will actually see might depend eventual broken
> mailer settings, missing characters in fonts etc.
> 
> But I can write cedille, ae, oe, a-ring, several vowels with
> trema and even EUR EURO.
> 
Thanks

cga


Re: Other European languages on a US keyboard

2006-07-24 Thread cga2000
On Mon, Jul 24, 2006 at 12:05:02PM EDT, Charles E Campbell Jr wrote:
> cga2000 wrote:
> 
> >I sometimes need to write text in other languages such as French,
> >Spanish and occasionally German or Italian. ..snip..
> >
> >I would like to do this in Vim.
> >
> >Unfortunately I only have a US keyboard.
> > 
> >
> 
> Have you considered EasyAccents.vim?
> 
>  http://vim.sourceforge.net/scripts/script.php?script_id=451

That's exactly the sort of thing I initially had in mind but since I've
already spent some time getting familiar with the standard (?) Vim
solution (:set keymap=) and it's a breeze to customize I'll probably
stick with that.  

What I like abut the ":set keymap" solution is that if you wait a
fraction of a second between "'" and "e" for instance Vim realizes that
you want an apostrophe followed by an "e".. not an "e" with acute accent
and moves the cusor to the next position..  Another way to achieve this
is to map two apostrophes to the (single) apostrophe in your keymap
description.. so you type two "'"'s in quick succession when you want an
apostrophe rather than an accented letter..  But I find the former
method more natural.

Thanks all the same. Appreciate your help.
> 
> It doesn't use the spelling checker in vim 7.0, but it accepts
> a'
> a`
> a^
> a:
> etc to generate accented characters.  Easy to turn on and off, too: \eza 
> toggles.
> 
For some bizarre reason .. something in my Vim setup .. I've never
managed to get this '\' leader escape character to work.  So for the
vimspell plugin for instance I have to type the :* commands.

> Regards,
> Chip Campbell


Re: Other European languages on a US keyboard

2006-07-24 Thread cga2000
On Mon, Jul 24, 2006 at 08:37:47AM EDT, A.J.Mechelynck wrote:
> Warning: off-topic post. Read at your own risk.
> 
[..]
> Before computers, I used a "French" typewriter keyboard (AZERTY type). 
> Nowadays I use a "Belgian" computer keyboard (also AZERTY but with 
> special characters arranged differently). My father has an old 
> typewriter he bought in Switzerland when he was a student, and it uses a 
> QWERTZ layout. (Switzerland has four official languages, viz. German, 
> French, Italian and Romanche; and I don't know how many different 
> keyboards they use.)
> 
> On a mechanical typewriter, it was possible to use "half-spacing" by 
> holding the space bar down. So, if one wanted to produce the oe digraph 
> on a French typewriter (not an electric one though), it was possible -- 
> for a perfectionist. Let's say I wanted to type "boeuf" (= beef/ox):
> 
> 1. press and hold spacebar. This advances the carriage by one half space
> 2. hit b. This prints b without moving the carriage.
> 3. release, press and hold spacebar.
> 4. hit o
> 5. release spacebar. The carriage is now over the right half of the o.
> 6. hit e u f in succession.
> 
.. makes my mouth water.. I should try Ebay .. see if I can find an
affordable high-end typewriter that does such fancy stuff.

> The oe digraph is called "o, e dans l'o" and the ae digraph is called in 
> French "a, e dans l'a". The latter as in Serge Gainsbourg's song 
> "elaeudanla téitéia" (which spells the name "Laetitia").

phew.. this one took me a couple of minutes to figure out.. !!
> 
> French typewriters indeed seldom had the digits one and zero: small-ell 
> and big-oh were used insted. But it even carried over to computers: 
> Several decades ago (before the merger with Honeywell), the (French) 
> Bull computer company used on its computers a charset where the same 
> character could mean either zero or O-for-Oscar depending on context -- 
> and another one, I think, could mean one or I-for-India. (Few computers 
> had lowercase in those days.) This, of course, caused headaches without 
> end when trying to convert those computers' magnetic tapes to IBM's BCD 
> and EBCDIC standards or to (whose? PDP? CDC? other?) ASCII.

Hehe.. maybe a bit of "OT" at one point in the designers' career
wouldn't have hurt.. Sounds like the year 2000 business.. but worse..

What did they do?  Hired a few thousand data entry folks to do the
conversion..  Not sure regex's had been invented at the time.

.. anyway .. as I always say we should all go back to writing in Latin &
Roman numerals..
> 
> I'm not sure non-English non-French non-German speaking countries all
> use a US-derived keyboard, even if we limit ourselves to those that
> use variants of the Latin alphabet. Typewriters, after all, date back
> to (I think) before World War I, a time when English was much less
> dominant internationally than it is now. At the courts of
> St-Petersburg and Potsdam, French was spoken; Germany and Austria
> together covered (or had recently covered) a territory that went from
> Alsace to Silesia and from Schleswig-Holstein to the plain of the Po.
> I suspect that most of Central Europe would have adopted a
> German-derived (or maybe French-derived) keyboard regardless of
> whether the majority language was Czech, Slovak, Italian, Hungarian,
> Croatian...

quick googling for "keyboard layout" shows that you are correct. 

I don't trust Wiki's 100% but this page has some useful keyboard
layouts:

http://en.wikipedia.org/wiki/Keyboard_layout
> 
> I agree that the lack of oe OE digraphs in the Latin charsets is 
> probably due to their absence on French typewriter keyboards. (AE ae 
> were kept because they are used in Danish.) There is more than a 
> single-letter difference with English though: not only the layout is 
> different but there are several accented letters. The French (and 
> Belgian) 

.. somewhat to my surprise the Belgian keyboard uses the AZERTY layout
while the Netherlands use QWERTY.  But then this would make sense since
as far as I recall Dutch/Flemish is pretty limited to the ASCII charset
and that's obviously available on AZERTY keyboards. So they only needed
to accomodate the French-speaking community. But doesn't Belgium also
have a German-speaking community?  Ah.. maybe it was just that most
businesses were owned by French-speaking Belgians at the time the layout
was adopted.. 

> keyboards have a dead key for circumflex and trema/diaeresis/umlaut,
> but à ç é è ù and sometimes uppercase-C-cedilla each have their own
> glyphs. (In French, uppercase letters with the exception of C-cedilla
> and sometimes E-acute were usually left unaccented. I believe
> computers are slowly pushing back the trend.)
> 
Actually I found that there is such a thing as a US International
Keyboard and maybe I could acquire one of those since it all the fancy
characters that I would want..   
> 
> Best regards, Tony.

Thanks much for all this pre-computer days lore..!

Doesn't hurt to know a

Re: Other European languages on a US keyboard

2006-07-24 Thread cga2000
On Mon, Jul 24, 2006 at 09:02:34AM EDT, Russell Bateman wrote:
> As you say, warning: off-topic post. Read at your own risk.

.. don't see this as OT.. Being lazy I skipped the ".. in Vim" in the
subject.. 
> 
> This discussion underlines all the more strongly why I don't attempt to 
> produce final documents using vim: I sometimes use an actual word 
> processor like Open Office Writer, but mostly I write in HTML and, of 
> course, the best HTML editor on the planet is...

Maybe I should dump LaTeX and use HTML.. I printed some of the
TeX-gen'd stuff and it just looks too "beautiful".. I end up with
correspondence that looks more like pages torn out of an expensive
book..  
> 
> ...vim!
> 
agreed.. natch'..

> Russ
> 
> P.S. Yes, typing é , œ and ü is painful, but I'm one 
> of those perfectionists who would have used half-spacing back in the old 
> days if I had been in need of such things. My father used a non-electric 
> typewriter, but I was 19 before I moved to France from the US and needed 
> what wasn't on the keyboard. After coming back at 25 (some 26+ years ago 
> now), I never lost the need to communicate and product documents of with 
> accents, digraphs, etc. 

yes.. have a feeling only the folks at the  "Académie Française" and
enlightened foreigners are really concerned about this these days.. I'm
sure the French don't take notice or give a damn whether you write
"laetitia" or "lætitia".. 

Hope you get my accents.. cedillas.. and "e dans l'a" above..

> in fact, I added the need to compose classical 
> Greek texts while in France, but that's a whole other mess.
> 
[..]

Thanks

cga


Re: Other European languages on a US keyboard

2006-07-24 Thread cga2000
On Mon, Jul 24, 2006 at 10:50:33AM EDT, Gene Kwiecinski wrote:
> >Rare enough .. but besides "oeuf" is also occurs in such very common
> >words as "voeu" [wish] and "coeur" [heart] and it really bothers me
> when
> >I see them incorrectly spelled in web pages for instance.  I spot it
> and
> >after that I tend to lose focus and not be able to take in what I'm
> >reading for a short while.
> 
> How're they misspelled?
> 
well .. can't give you a sample of the "correct" spelling - ie. the
single "oe" character instead of the "o" .. a space and the "e".. -
since I am not running with an UTF8 locale.. and even that might not
work if you are running latin1 for instance.

so to get my meaning you need to go to 

www.wordreference.com

.. enter "egg" in the "Enter Word" field and check the "English to
French" radio button..  .. and a few lines down you should see
a bunch of "oeuf" correctly spelled .. "bad egg" -> "oeuf pourri", for
example.. provided your browser is set up to display UTF8, naturally..

otherwise.. I'll have to put up a screenshot some place..
> 
[...]

> >In order to set up my foreign language keymap correctly I would really
> >need tables of all the characters that occur in these languages, decide
> >which ones are common enough to be worth adding to the keymap, and make
> >sure I build a scheme that's coherent before I get my fingers to
> >memorize it.  I'll scour the Wiki's later today.. see if I can find
> >anything useful.
> 
> If you wouldn't mind, definitely keep me in the loop on this one, as
> I've got something of an interest.

Not much joy where finding tables of all characters used in typesetting
for different languages, I'm afraid.

I did find this regarding keyboard layouts though:

http://www-306.ibm.com/software/globalization/topics/keyboards/registry_index.jsp

.. as usual I had a very simplified vision of the problem.
> 
> Offhand, some contributions and questions:
> 
> beta-looking SS (German)

.. used to know this as an s-tset (phonetic rendering..)

> slashed 'l' (Polish)

no knowledge of slavonic languages here.. sorry.

looks like Poland has somewhat switched to a US-derived keyboard where
computers are concerned.  And Tony was right assuming that most central
European countries - Czech.. Slovak.. Slovenian/Croatian.. Moldovan..
Hungarian.. even Rumanian have keyboards that are derived from the
German layout.

> slashed 'o' (Scandinavian or thereabouts, not sure if Dutch or other)

don't think Dutch has this.

> AElig/aelig/OElig/oelig (Latin, etc.)

Danes & Norwegians have a key for AElig right on the keyboard.

> ccedil/Ccedil (how done, ",C"?)

Some keyboards - French.. Italian.. Portuguese.. have a ccedil key

> ecedil(?) (also Polish, possibly other vowels, 'though don't recall
> offhand)
> 
Doesn't appear to be one on the Polish keyboard as pictured at the IBM
site.

> Oh, someone on the list is native Polish, so might ask him.  Was it
> Mikolaj?
> 
> Dunno anyone Dutch who'd recall the slashed-'o'.
> 
Can't think a town in Holland that has this .. so I would assume it's
not indigenous (?)

> How to enter Aring (eg, Ångstrom)?  "oA"??  Synonymous with "aa"
> (eg, "Haas" == "Hås"?)
> 
> 
> Oh, well...

Yes, I could say I agree with that last remark..

Vast subject.. but quite fascinating.. :-)

Real glad I started this thread.. Learned some useful stuff here..

Thanks

cga


Re: Other European languages on a US keyboard

2006-07-24 Thread cga2000
On Mon, Jul 24, 2006 at 03:36:54AM EDT, Matthew Winn wrote:
> On Sun, Jul 23, 2006 at 06:41:09PM -0400, cga2000 wrote:
> > Avoid words such as "coeur".. "boeuf".. etc.  Rather amazing that the
> > French who are so picky about anything that concerns their language
> > never came up with a codepage.. or whatever it's called that features
> > this particular character.  
> 
> I think it dates from the days when typewriters were popular.  The US
> dominance of the market for office equipment prompted many European
> languages to manage without combinations like oe, ae and ij where the
> characters can be approximated by typing separate letters.  It's easier
> to change typing habits than to manufacture a new range of typewriters
> just to deal with one special letter.

.. hmm.. as far as I know only France and Germany went to the trouble of
designing their own typewriter keyboard layouts separate from the QWERTY
model.  I think Polish keyboards are derived from the German layout..  I
would assume variations of the French layout are used in other
French-speaking countries and some African countries..  As to other
European countries - ie. the ones that speak neither French nor German -
I believe that you are correct and that they use derivatives of the US
keyboard.  

Therefore, since the French went so far as building keyboards that have
the basic letters arranged differently (AZERTY instead of QWERTY) it
would not have been such a major enhancement to provide an "oe" some
place on that keyboard..? 

I have a feeling it is more a question of whoever designed the original
French typewriter keyboard just did not think it worth bothering with
such typographic niceties as providing an "o dans l'e" (or is it the
other way round?) when the end result with fixed-width characters was
going to be light-years removed from the refinements of traditional
typesetting anyway..

But I would agree that the absence of the "oe" on French keyboards
(typewriters and computers alike) probably accounts for the fact that
you can't find it anywhere in the latin* charsets.
> 
> Prior to computers many keyboards didn't even have separate keys for
> the digits 1 and 0, typists using the letters l and O instead.

I was aware of the l/1 thing.. sometimes use it when I feel lazy.

Thanks

cga


Re: Other European languages on a US keyboard

2006-07-23 Thread cga2000
On Sun, Jul 23, 2006 at 07:36:22PM EDT, A.J.Mechelynck wrote:
[...]
> and what is 'textwidth' set to? (Mentioning 'textmode' was a typo on my 
> part.)
> 
  textwidth=80
Last set from modeline
> >
> >Interestingly with the cursor in a LaTeX window ":set verbose
> >formatoptions" does not tell me where the formatoptions are set.. and I
> >also get a verbose=0 and no clue as to where they are set.

.. messed up.. command history tells me I was issuing a:

   :set verbose formatoptions?

(as mentioned above..) 

instead of the requested:

   :verbose set formatoptions?
> 
> To know where options are set, you need 'verbose' >= 1, which can be 
> done temporarily by prefixing a command with ":verbose". If ":verbose 
> set textwidth?" doesn't tell you where 'textwidth' was set, then either 
> you set it manually or it was left at its default.
> 
.. yet another useful Vim option that I need to memorize..
> >
> >But what's a lot more interesting - to me at least - is that I am now
> >unable to reproduce the problem.  But then, please keep in mind that I
> >was struggling with Vim keymaps (that wasn't too hard) but also
> >non-ASCII rendering in LaTeX.. (and that was an absolute b*tch..) at the
> >time.. so serendipity allowing - and my ingenuity.. while I was going
> >through this lenghty trial and error process.. I may have done some very
> >strange things that I do not remember and that I do not remember. 
> >
> >So I think I have already used up enough of your time for what is
> >either some subtle - or not so subtle - "feature" of the Vim/LaTeX
> >add-on stuff and should just keep an eye open for possible
> >reoccurrences.  If I find something useful, I will update the thread..
> >or start a new one..  maybe to find out that this was a known bug
> >with this older release and has long since been fixed.  
> >
> >:-(
> 
> Well, if the problem has spontaneouly disappeared, then so much the 
> better. If it ever reappears, maybe you'll be better armed to track it down.

I suspect that something else that I did set textwidth to zero.. or did
away with wrap mode.. 

Since I was doing some copying/pasting via gnu/screen I would suspect I
did a ":set paste" at one point and didn't notice that the "INSERT" at
the bottom of the screen was saying "-- INSERT (lang) (paste) --"
instead of just "-- INSERT (lang) --" .. By then I was getting really
frustrated with LaTeX's lack of short howto type of docs - especially
regarding language packages.. so I may very well have missed that. 

I have a feeling it was just a user error and won't occur again.. and if
it does I'll be better equipped .. and in a more relaxed mood.. so I
should be able to address it.
> 
> [...]
> >>If your other applications don't support UTF-8 you will have to do
> >>without the OE and oe digraphs.
> >>
> >Avoid words such as "coeur".. "boeuf".. etc.  Rather amazing that the
> >French who are so picky about anything that concerns their language
> >never came up with a codepage.. or whatever it's called that features
> >this particular character.  
> >
[..] 
> In HTML you can use Œ and œ -- and, with newer browsers,
> also Œ and œ . I don't know if TeX can do the equivalent
> (print characters not found in the current charset) or how.
> 
I saw in passing that there are indeed symbolics that you can use in
LaTeX to request a character that's missing from the ASCII charset..

> Otherwise, if the digraphs are not available, you can write them as two 
> letters (as you did above).
> 
> 
> Best regards,
> Tony.

Thanks

cga


Re: Other European languages on a US keyboard

2006-07-23 Thread cga2000
On Sun, Jul 23, 2006 at 01:12:28PM EDT, A.J.Mechelynck wrote:
[...]
> >textmode
> >  wrapmargin=0
> >  formatoptions=tcql
> >Last set from /usr/share/vim/vim63/ftplugin/mail.vim
> >  wrap
> >  nolinebreak
> >  breakat= [EMAIL PROTECTED];:,./?
> 
> and (seeing what you write below) do it with with the active cursor in a 
> Latex file. Maybe the Latex ftplugin changes textwidth? (A value of zero 
> means no auto-reformatting.)
> 
notextmode
  wrapmargin=0
  verbose=0
  formatoptions=tcq
nolinebreak
  wrap
  breakat= [EMAIL PROTECTED];:,./?

Interestingly with the cursor in a LaTeX window ":set verbose
formatoptions" does not tell me where the formatoptions are set.. and I
also get a verbose=0 and no clue as to where they are set.

But what's a lot more interesting - to me at least - is that I am now
unable to reproduce the problem.  But then, please keep in mind that I
was struggling with Vim keymaps (that wasn't too hard) but also
non-ASCII rendering in LaTeX.. (and that was an absolute b*tch..) at the
time.. so serendipity allowing - and my ingenuity.. while I was going
through this lenghty trial and error process.. I may have done some very
strange things that I do not remember and that I do not remember. 

So I think I have already used up enough of your time for what is
either some subtle - or not so subtle - "feature" of the Vim/LaTeX
add-on stuff and should just keep an eye open for possible
reoccurrences.  If I find something useful, I will update the thread..
or start a new one..  maybe to find out that this was a known bug
with this older release and has long since been fixed.  

:-(

> >Since this non-wrapping behavior only occurs after I issue the
> >":setlocal keymap=accents" command, I ran these commands both before
> >and after but the output was strictly identical.
> >
> >As to to he E518: error message, I run Vim 6.3 - that's the version
> >available on debian stable, so I assume that this option was
> >implemented in later versions.
> 
> 'formatexpr' is new in version 7. BTW, you can get both 6.4 and 7.0
> from the Vim FTP site. The "current" version is 7.0.039. Compiling Vim
> is not really hard -- see my
> http://users.skynet.be/antoine.mechelynck/vim/compunix.htm for
> details.
> 
Thanks.  As it happens, Vim is just about the only application I have
left on this system that was not compiled from source.  I absolutely
needed features that were not built into the packages available for
debian stable and I was never able to figure out how to build .deb's
from source.

As long as I don't have to upgrade libraries, I guess I should give Vim
7.0 a try at some point.

[..]
> 
> If your other applications don't support UTF-8 you will have to do
> without the OE and oe digraphs.
> 
Avoid words such as "coeur".. "boeuf".. etc.  Rather amazing that the
French who are so picky about anything that concerns their language
never came up with a codepage.. or whatever it's called that features
this particular character.  

Thanks

cga




Re: Other European languages on a US keyboard

2006-07-23 Thread cga2000
On Sat, Jul 22, 2006 at 04:40:45PM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:
> >On Fri, Jul 21, 2006 at 03:19:25PM EDT, A.J.Mechelynck wrote:
> [...]
> >Only minor glitch seems to be that text doesn't wrap when in "INSERT
> >(lang)" mode.. haven't figured out why yet.. so I just escape out of
> >insert mode and do a "gqip" once in a while.  Could be unrelated
> >though..
> 
> Check your options:
> 
>   " for auto-insert of linebreaks
>   :verbose set textmode? wrapmargin?
>   :verbose set formatoptions? formatexpr?
> 
>   " about display of long lines
>   :verbose set wrap? linebreak? breakat?
> 
:verbose set textmode? wrapmargin?

textmode
  wrapmargin=0
  
:verbose set formatoptions? formatexpr?

  formatoptions=tcql
Last set from /usr/share/vim/vim63/ftplugin/mail.vim
E518: Unknown option: formatexpr?

:verbose set wrap? linebreak? breakat?

  wrap
nolinebreak
  breakat= [EMAIL PROTECTED];:,./?

Since this non-wrapping behavior only occurs after I issue the
":setlocal keymap=accents" command, I ran these commands both before
and after but the output was strictly identical.

As to to he E518: error message, I run Vim 6.3 - that's the version
available on debian stable, so I assume that this option was
implemented in later versions.

But I am writing this message in Vim and I set the keymap to "accents"
and right now everything is wrapping correctly.  Don't know if this
makes sense but I would appear that the problem only occurs when working
on a .tex file?  So maybe this is a bug/feature that's related to syntax
checking or highlighting?  I need to run another test and try to figure
out what I was doing.  Issue the same above commands while editing latex
stuff and see if it makes a difference.  I will update the thread if I
find something interesting.

> > 
> >>Or, if none of the distributed keymaps is exactly what you want, you can 
> >>write your own. It isn't hard. See ":help :loadkeymap" for the theory, 
> >>and look at the contents of Bram's $VIMRUNTIME/keymap/accents.vim and my 
> >>$VIMRUNTIME/keymap/esperanto_utf8.vim for a couple of simple examples. 

> >>You might want to write something more extensive but this will show you 
> >>how to do it.

Already started on this:  copied accents.vim to ~/.vim/keymap/ ..
renamed it to foreign.vim and added the Spanish inverted question /
exclamation marks - an for now I have mapped to "!!" and "??". 

> >>
> >Doesn't look like much is missing.. Maybe the French o+e .. but then my
> >screen font doesn't have it either.. 
> 
> The French oe (o, e-dans-l'o) is not defined in the Latin1 encoding, 
> neither in capitals (as for titles or if the word "oeuf" [egg] is the 
> first of a sentence), nor in lowercase. You need UTF-8 for it, and for 
> this relatively rare character you can still use Ctrl-K o e ; or else 

Rare enough .. but besides "oeuf" is also occurs in such very common
words as "voeu" [wish] and "coeur" [heart] and it really bothers me when
I see them incorrectly spelled in web pages for instance.  I spot it and
after that I tend to lose focus and not be able to take in what I'm
reading for a short while. 

I'm pretty sure there is also a similar a+e / A+E in French as well,
though I could not think of one common word that has this.  I'm pretty
sure that it's the correct spelling for names such as "Aegisthe" or
"Laetitia" but I don't have any printed material where I could check
that for sure.  Only words I can think of right now are "caecum" and
"caetera" (as in  "et caetera") but there's bound to be others.

> you can add the following to your vimrc (after setting 'encoding' to
> UTF-8):
> 
>   lmap OE  lmap oe 
> 
The problem with switching to UTF8 is that practically all the other
applications that I use on a daily basis do not support it correctly -
mutt, slrn, ELinks.. at least not the versions that I am running. I had
a go at it a couple of months back but I ran into so many problems that
I had to switch back to latin1.  Naturally, I could try to run Vim in a
UTF8-capable terminal like uxterm while staying with a latin1 locale - I
understand that this might work - but now that I have gotten used to the
convenience of running all these apps under gnu/screen under a single
xterm I don't think I would want to fire up Vim in a separate xterm on a
regular basis. 

Printing was another area where I ran into problems.

So, due to my ignorance of such matters and lack of time I'll have to
keep this on the back burner until either the apps are more mature 

Re: Other European languages on a US keyboard

2006-07-22 Thread cga2000
On Fri, Jul 21, 2006 at 02:50:46PM EDT, Gene Kwiecinski wrote:
> >Unfortunately I am only able to type the US keyboard, so remapping
> >the keyboard might be a better solution than entering digraphs in the
> >long run but will not be painless..  And since I do not do this on a
> >regular basis, I am unsure whether it's really worth going to all the
> >trouble.
> 
> Would it be impractical to map, eg, <^> to whatever the code is for
> 'ê', ie, use prefix notation of [^'`~,], etc., as a prefix for
> [aeioucnAEIOUCN] as needed?  Wouldn't be *all* those combinations,
> but, eg, would only need <,> for Ç, <~> for Ñ (and
> their lowercase counterparts, natch), but the rest would just be
> whatever accented chars you normally use, for grave, acute,
> circumflex, etc.
> 
Unless I'm mistaken you have actually reinvented the loadkeymap solution
discussed by Tony..?  

Don't take me wrong.. I am *not* being ironical..  

Quite the contrary.

> I'm not sure how a non-US keyboard does such things, so I can't
> suggest a more "transparent" way of doing it.
> 
> One other possibility would be the way my phone does multiple chars
> per key, eg, you'd hit '1' to get the generic '.', then '*' would
> cycle through different punctuation, and so on, 'til it'd get back to
> '.' again.  Maybe hitting alt-A would get you an 'a' and put you into
> a loop, then multiple hits of an F-key would cycle through the 3-4
> other chars and then back.  Any other key would "escape" the loop.
> Arrange them in the order you expect their occurrence, most
> commonly-used ones first.
> 
That, I had thought of but I discarded it as impractical.  That's also
the method that's commonly used to input languages that have too many
characters to fit on a reasonably-sized keyboard.. Chinese, eg.

Entering the accent, tilde, cedilla.. etc. followed by the letter is a
lot more in keeping with the wiring of my cortex..

> Eg, if you arrange them in the order acute/grave/circumflex/ring,
> simply hitting  would get you á.  Hit F2, and it gets you
> à.  Hit F2 again, circumflex.  Again, ring.  Again, acute.
> Lather, rinse, repeat.
> 
> *Implementing* this would for now be beyond my ken, or my barbie, but
> I'm sure someone might have some ideas how to best do it.  No?

Thanks

cga


Re: Other European languages on a US keyboard

2006-07-22 Thread cga2000
On Fri, Jul 21, 2006 at 05:19:33PM EDT, Yakov Lerner wrote:
> On 7/21/06, cga2000 <[EMAIL PROTECTED]> wrote:
[..]
> 
> I think the easiest apporach is to craete mappings.
> You could use ctrl-(a-z), ctrl-shift(a-z), ctrl-alt-(a-z),
> then f1-f12 + ctrl/alt/del combinations.
> 
Thanks, but not for me.. I touch type and as a result Tony's solution
is much preferable than key combos.

> Linux has a keyboard mode where ' is used to
> modify letters to create diactitics. This works for
> all X applications, not just vim.

I have used the Compose key in the past - usually mapped to menu.. I
think I remapped it to the Windows key on this laptop at one point but
I wasn't aware of this X keyboard mode.

Thanks

cga


Re: Other European languages on a US keyboard

2006-07-22 Thread cga2000
On Fri, Jul 21, 2006 at 03:19:25PM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:
> >I sometimes need to write text in other languages such as French,
> >Spanish and occasionally German or Italian.
> >
> >I would like to do this in Vim.
> >
> >Unfortunately I only have a US keyboard.
> >
[..]
> I.
> 
> Since you've already used digraphs, and they're too cumbersome for you, 
> you could try a keymap.
> 
> There are some keymaps in $VIMRUNTIME/keymap which you can apply by just 
> doing ":setlocal keymap=" (where  is the 
> filename without the encoding and .vim endings) or by using the "Edit -> 
> Keymap" menu. Then you can toggle between "US-QWERTY" mode and "keymap" 
> mode by hitting Ctrl-^ in Insert mode, or by toggling 'iminsert' between 
> zero and 1 in any mode. Basically, what a keymap does is establish a set 
> of language-mappings, i.e., insert-mode mappings which can be turned on 
> an off. Try the "accents" keymap, it might be just what you want.
> 
This works great..! I tried that on a short text in French and within a
couple of minutes I was almost as comfortable as I am when typing in
English.  The accents are all perfectly intuitive - ` ' ^ etc. so I
didn't even need to look at the keymap.  Just need to be a little
patient when entering an apostrophe.

Only minor glitch seems to be that text doesn't wrap when in "INSERT
(lang)" mode.. haven't figured out why yet.. so I just escape out of
insert mode and do a "gqip" once in a while.  Could be unrelated
though..

> Or, if none of the distributed keymaps is exactly what you want, you can 
> write your own. It isn't hard. See ":help :loadkeymap" for the theory, 
> and look at the contents of Bram's $VIMRUNTIME/keymap/accents.vim and my 
> $VIMRUNTIME/keymap/esperanto_utf8.vim for a couple of simple examples. 
> You might want to write something more extensive but this will show you 
> how to do it.
> 
Doesn't look like much is missing.. Maybe the French o+e .. but then my
screen font doesn't have it either.. 

> If and when you write your own keymap, place it in the keymap/
> subdirectory of a directory listed early in 'runtimepath' but not in
> $VIMRUNTIME/keymap itself because any upgrade can silently change
> anything there.
> 
> 
> 
> II. What you are suggesting looks like setting 'spelllang' (with three
> ells) to whatever means "French" and then spellchecking your
> US-ASCII-only text. But beware: the Vim spellchecker (which I don't
> use because of my good innate spelling) might not be clever enough to
> mark words which have accented homographs, such as "a" ("has") vs. "à"
> ("at"), "de" ("of") vs. "dé" ("thimble"), "du" ("of the") vs. "dû"
> ("owed"), "cru" ("believed" or "raw") vs. "crû" ("grown") etc.: so the
> cure might be worse than the ill, owing to the necessity of looking
> for unmarked spelling mistakes even after running the spell checker.
> 
I think you're right.  Considering how effective the keymap solution is
there's just no point.  Anyway, I don't even have an active spellchecker
at this point. aspell segfaults for some reason and I haven't had time
to research that yet.

Just need to figure out how I can get latex to handle these non-ASCII
characters. They disappear from the .dvi file.

In case I can't figure it out, there's probably a latex user list
somewhere.

Great Tip..!

Thanks

cga


Other European languages on a US keyboard

2006-07-21 Thread cga2000
I sometimes need to write text in other languages such as French,
Spanish and occasionally German or Italian.

I would like to do this in Vim.

Unfortunately I only have a US keyboard.

Using Ctrl-K to enter the various digraphs becomes somewhat cumbersome
for anything larger than a short paragraph.

Unfortunately I am only able to type the US keyboard, so remapping the
keyboard might be a better solution than entering digraphs in the long
run but will not be painless..  And since I do not do this on a regular
basis, I am unsure whether it's really worth going to all the trouble.

I was thinking of writing the text without accents, tildes, cedillas,
etc. using the letters on the US keyboard and then feeding the result to
some advanced functionality of a spellchecker that would replace all the
words that can only be spelled one way by their correctly spelled
version - say French 'épeler" (to spell) can only be spelled this way..
there is  no 'epeler' or 'èpeler' or 'êpeler'.

On the other hand, for those words where the accent differs depending
on the semantics such as French 'a' vs. 'à', the script/plugin would
leave them untouched and  - ideally - highlight them, thus leaving me
with only a handful of manual corrections.

Is there anything in Vim that does something like this?

Or is there any other 'smart' way to achieve something like the above?

Thanks

cga


Problem with (backslash)

2006-07-03 Thread cga2000
I have the vimspell plugin installed and I am able to use the ':'
commands but the \.. shorcuts are not working the way I expected:

If I type \sA to start autospell mode for instance I get:

. a beep for the backslash
. a switch to insert mode for the s
. an inserted capital "A"

I checked via a:

:let mapleader

that the leader is set to the default backslash and I'm not sure where
to look.

Maybe I'll try remapping  to something else .. see if it makes
any difference?

Thanks

cga


Re: display tweaks - tilde lines, statusline..

2006-06-07 Thread cga2000
On Mon, Jun 05, 2006 at 08:27:17AM EDT, James Vega wrote:
> On Mon, Jun 05, 2006 at 01:09:41AM -0400, cga2000 wrote:
> > I think I should stick these doubtful customizations of mine in some
> > separate file rather than modifying individual colorschemes. I've just
> > tested: 
> > 
> > :set FoldColumn=2
> > :hi  Foldcolumn ctermbg=black
> > 
> > .. and it adds a 2-column margin to the left of my display and thought
> > I could add these to my .vimrc but then this will be lost whenever I
> > change colorscheme on the fly.
> 
> As Tony mentioned, setting 'foldcolumn' can be done in your vimrc.  The
> highlighting can also be done there by taking advantage of autocommands.
> 
>   :au ColorScheme * hi FoldColumn ctermbg=black
> 
> This only works in vim7 though since that's when the ColorScheme event
> was introduced.  It may also be better to set ctermbg=NONE in case you
> change which colorscheme you use in the future to one that does not have
> a black background.
> 
.. yet another thing I need to worry about.. not introducing doubtful
customization that will break when I upgrade.

Thanks

cga


Re: display tweaks - tilde lines, statusline..

2006-06-07 Thread cga2000
On Mon, Jun 05, 2006 at 03:02:26AM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:
> >On Sun, Jun 04, 2006 at 08:50:18PM EDT, A.J.Mechelynck wrote:
> >  
> >>cga2000 wrote:
> >>
> >>>On Sun, Jun 04, 2006 at 03:11:10PM EDT, A.J.Mechelynck wrote:
> >>> 
> >>>[...]
> >>> 
> >>>  
> >>>>Note that the same highlight group also governs the @ or @@@ for a 
> >>>>partial line at the end of a window, and possibly other things too.
> >>>>   
> >>>>
> >>>I had thought of that while experimenting - although I have no idea
> >>>what the "@" and "@@@" are .. or the "partial lines".
> >>> 
> >>>  
> >>When using 'wrap', one "file line" can be wrapped onto several "screen 
> >>lines". When the last "file line" in a buffer window overflows below the 
> >>bottom of the window, then one of two things can happen:
> >>
> >>- if 'display' includes "lastline", the bottom three characters at lower 
> >>right of the window are replaced by @@@, the rest of that "file line" is 
> >>displayed, or as much of it as fits into the window.
> >>- Otherwise (the default) the last "file line" in the window is replaced 
> >>by as many "screen lines" as necessary consisting of @ at left, the rest 
> >>empty.
> >>
> >>
> >Thanks. Great explanation.
> >
> >  
> >>>Is there any way I can query vim to find out what a group (?) like
> >>>NonText actually covers?
> >>> 
> >>>  
> >>:help NonText
> >>
> >>
> >Looks like setting it to "invisible" the way you recommend is fairly
> >harmless. Hope it doesn't come back and bite me when I've forgotten all
> >about it.
> >
> >I think I should stick these doubtful customizations of mine in some
> >separate file rather than modifying individual colorschemes. I've just
> >tested: 
> >
> >:set FoldColumn=2
> >:hi  Foldcolumn ctermbg=black
> >
> >.. and it adds a 2-column margin to the left of my display and thought
> >I could add these to my .vimrc but then this will be lost whenever I
> >change colorscheme on the fly.
> >  
> 
> About 'foldcolumn', you can keep that in your vimrc, or, if you want it 
> for some particular filetype only, create a filetype-plugin (for 
> instance for HTML, in $HOME/vimfiles/after/ftplugin/html.vim for 
> Windows, $HOME/.vim/after/ftplugin/html.vim for Unix). An "after-plugin" 
> means it runs after the standard plugin, which you can let run its course.

so much stuff in vim. I'll make sure I remember the general idea at
least.
> 
> About :hi statements, you can set up your own colorscheme: copy some 
> existing colorscheme (for the default colors, 
> $VIMRUNTIME/colors/default.vim) to your "colors" directory under another 
> name (for instance $HOME/vimfiles/colors/cga2000.vim for Windows, 
> $HOME/.vim/colors/cga2000.vim for Unix), modify it there, and add 
> "colorscheme cga2000" to your vimrc. You can set colors for all three 
> modes (B&W console, color console, GUI) in a single colorscheme by using 
> the appropriate term= cterm= ctermfg= ctermbg= gui= guifg= guibg= 
> arguments. Normally you will stick to a single colorscheme which "fits 
> you best" so this shouldn't be a problem.
> 
> Note that anything in or under $VIMRUNTIME can be added, deleted or 
> modified silently by any upgrade, so it is best not to change anything 
> there -- any changes you make could disappear without warning at an 
> unspecified future time.

.. isn't there a way one could add the customization - once it's duly
tested - to a system-wide tree so other users of the system could
benefit by it? Some sort of $VIMRUNTIME/local so-to-speak..?
> 
> >  
> >>>[...]
> >>>  
> >awful thing about vim is that the more you learn the more you realize
> >how complex it is and how much more there is to learn.. But thanks to
> >all the help I am getting on this list I am now a bit more able to find
> >my own answers. The help files are great but it's really a maze.. You
> >could spend hours and hours just following these tags.. Sometimes it
> >gets to the point where I can't remember what I was looking for in the
> >first place.  
> >
> >:-)
> >  
> >>Best regards,
> >>Tony.
> >>
>

Re: Upgrading to Vim 7.0 in Debian (was Re: :ha printouts - fontsize)

2006-06-07 Thread cga2000
On Wed, Jun 07, 2006 at 09:10:21PM EDT, William O'Higgins Witteman wrote:
> On Wed, Jun 07, 2006 at 08:36:08PM -0400, cga2000 wrote:
> >Just for the record: I tried installing "etch" about three months ago
> >but the installer was unable to detect my PC card. I fooled him by going
> 
> Ah, I can see where that might be a problem.  I've never installed in
> that manner - I install into stable, as you did, and once I'm up and
> running with a minimal system I edit my /etc/apt/sources.list to testing
> and do "apt-get update; apt-get dist-upgrade" which moves my whole
> system up to testing.  Once Debian is installed there is never (in my
> experience) a reason to reinstall.
> -- 
> 
Sounds like something I could try. The reason I tried to install
testing directly is that I used to run RedHat. I freed up a 4G
partition on my HD and did a chroot install of sarge - testing at the
time.. so I could take my time evaluating debian while keeping my
'live' system (and switching from RH to debian and back via a swift
Ctrl+Alt+F7/F8..)

Now 18 months later the RH system is long gone and I'm a pretty
satisfied user of debian. 

The reason I tried doing a new install instead of upgrading my current
system was mainly that I wanted more space - the space freed up by
former RH system - about 10G - and that I prefer to keep stuff like
/var.. /tmp in separate partitions.

So the current situation is that I have about 2/3 of my hard drive
dedicated to a system that's half installed - the only useful part of
it is the grub conf file :-) - and no time at all right now to revive
this install.

But thanks much for the reminder. I had read about this approach being
the "debian way" of upgrading and I will keep it in mind. When I have
the time I will try installing etch - see if they have fixed the
installer - and if not try to install sarge and upgrade.

Thanks,

cga

PS. Apologies to the list for the [OT].


Re: Upgrading to Vim 7.0 in Debian (was Re: :ha printouts - fontsize)

2006-06-07 Thread cga2000
On Wed, Jun 07, 2006 at 10:20:56AM EDT, William O'Higgins Witteman wrote:
> On Tue, Jun 06, 2006 at 09:51:48PM -0400, cga2000 wrote:
> 
> >> I will assume that you, as a relatively new Debian user, are running
> >> stable (sarge).  
> >
> >Yes. But the main reason is that I am a new Debian user on a laptop :-(
> 
> I have taken the middle path with Debian, and use testing.  This gives
> me newer software with security updates, without the rapid change and
> general wobbliness of unstable.
> 
> I wanted vim 7.0 though, and I got it from unstable - it works fine, and
> I have been doing this for new software for 5 years without anything
> upsetting happening.  Here's what I did to get vim 7.0:
> 
> # vim /etc/apt/sources.list
> :%s/testing/unstable/g
> :wq
> # apt-get update
> # apt-get install vim-full
> # vim /etc/apt/sources.list
> :%s/unstable/testing/g
> :wq
> # apt-get update
> 
> I don't mess with pinning or anything tricky - I just let some packages
> get a head start.  Eventually they are included and upgraded in testing,
> and then my regular updates pick them up and move them forward.
> 
> Something to note with this approach is that it will overwrite your vim
> 6.4 installation.  That was the result I wanted, and so I am
> unconcerned - I know that I can simply do an "apt-get remove
> vim-full;apt-get install vim-full" with my usual setup (with testing as
> my version) and I'll be back at 6.4 in a trice, with all of my configs
> where I expect them.
> 
> Now, to be clear, this doesn't work if you are tracking stable for
> getting vim 7.0 - it is a bit too far behind unstable.  For a laptop
> (for my laptop, actually) I recommend running testing, because you can 
> keep more up to date but you are not working your expensive machine too
> much with custom compiling or package churn.
> 
> I understand your reticence about doing things you don't understand, and I
> am not trying to pressure you into upgrading your OS :-)  I just want
> you (and others who may read the archives or lurk) to know how I
> overcame my conflict between a stable system and the latest and
> greatest vim.
> -- 
> 
> yours,
> 
> William

Thanks. 

Just for the record: I tried installing "etch" about three months ago
but the installer was unable to detect my PC card. I fooled him by going
back and forth in the menus, loading the relevant module manually and
the first part of the installation completed successfully. But when I
rebooted into the base system to complete the install - the second phase
where you download whatever applications you plan to use - etch
stubbornly refused to connect me. There was apparently a problem with
DHCP - I was never able to obtain a lease. I spent about a month trying
to get this to work and eventually abandoned the install. I just could
not afford to spend more time with this. So I'll stick with stable for
the foreseeable future.. maybe give it another shot some time later this
year - see if the pcmcia-related problems have been fixed.

Thanks,

cga


Re: Upgrading to Vim 7.0 in Debian (was Re: :ha printouts - fontsize)

2006-06-06 Thread cga2000
On Mon, Jun 05, 2006 at 05:22:44PM EDT, Marvin Renich wrote:
> * A.J.Mechelynck <[EMAIL PROTECTED]> [060605 03:04]:
> > cga2000 wrote:

[..]
> 
> Compiling is not hard, but there are already Debian packages with Vim
> 7.0, so you can simply install them (they may not be quite as up-to-date
> as the svn repo, but they should be very close ATM).
> 
The default debian vim package is probably quite suitable. I encountered
problems when I decided I couldn't live without a 256-color terminal.

And I couldn't find a 256-color terminals available as a debian binary.

> I will assume that you, as a relatively new Debian user, are running
> stable (sarge).  

Yes. But the main reason is that I am a new Debian user on a laptop :-(

I spent a couple of months trying to convince that I have a NIC - some
3Com PC card that's pretty much standard on 5-year old laptops and that
sarge has no problems with.. I gave up..

> The vim 7.0 packages are in unstable, and were compiled
> against a libc6 which is in testing, which complicates things just a
> bit.
> 
> There are two ways to attack this problem.  The first is to download the
> .deb files manually (from a web browser), and then install them with
> dpkg.  The second is to adjust your /etc/apt/sources.list to include
> testing and unstable, then just use aptitude to do the work for you.
> 
> First, the dpkg way:
> 
> 1.  Download the .deb file for vim (or vim-gtk, vim-perl, or whichever 
> variant you want).
> 
> a.  Browse to http://package.debian.org/vim  (or vim-gtk...).  This
> will show the versions available in oldstable, stable, testing,
> and unstable.
> b.  Click on unstable, which will take you to the page for that
> version of vim.
> c.  Halfway down the page it says "Download vim" and has a table
> with the different architectures.  Click on your architecture
> (perhaps i386 or amd64?).
> d.  This will bring you to a page with a list of mirrors.  Click on
> the mirror of your choice to download the .deb file.
> 
> 2.  Repeat step 1 for vim-common, vim-runtime, libc6, and libncurses5,
> downloading all of the .deb files into the same directory.  You can
> use the version in testing for libc6 and libncurses5, I believe.
> 
> 3.  Type  "dpkg -i"  followed by the filenames of all of the downloaded
> .deb files (all on one line).  If I have not made any mistakes in
> manually following dependencies, this will give you Vim 7.0.  ;-)

Very clear explanation. What I am worried about when doing this sort of
thing is that since I don't know the debian packaging system this may
have side-effects that will bite me at some point in the future. In
other words I do not understand the implications. Such as what happens
to my current vim 6.4 install? Obviously you would know how to handle
any problem that might crop up at some point in the future.. I wouldn't.
> 
> If you occasionally want newer versions of some packages, but want to
> keep most packages from stable, you can add testing and unstable to
> your sources.list file, but identify stable as your preferred
> distribution:
> 
> 1.  Edit /etc/apt/apt.conf (this file may not yet exist).  Add the
> following line:
> 
> APT::Default-Release "stable";
> 
> It is important to use stable rather than sarge, due to how apt
> identifies which release a package is from.  Also note the
> semicolon at the end.
> 
> 2.  Edit /etc/apt/preferences (this file probably will not yet exist).
> Add the following three lines (if there are already other entries, I
> think you need a blank line between this group of three lines and any
> other group of lines):
> 
> Package: * Pin: release a=testing Pin-Priority: 700
> 
> The purpose of this entry in preferences is to make sure that if
> you select a package from testing, it doesn't try to automatically
> upgrade it to unstable the next time you run aptitude.
> 
> 3.  Edit /etc/apt/sources.list.  Add the following lines, substituting
> your favorite mirror for ftp.debian.org:
> 
> deb http://ftp.debian.org/debian etch main contrib non-free deb
> http://ftp.debian.org/security etch/updates main contrib non-free
> 
> deb http://ftp.debian.org/debian unstable main contrib non-free
> 
> You can omit contrib and non-free if you wish.  If you want to use
> apt or aptitude to download source, duplicate each line, replacing
> deb with deb-src.
> 
> 4.  Now run apt-get update or aptitude update or just run aptitude and
> type u for update.  It will download a whole bunch of new Packages
> files.
> 
> 5.  Run aptitude (if you are not already there!) and navigate to vi

Re: :ha printouts - fontsize

2006-06-06 Thread cga2000
On Mon, Jun 05, 2006 at 03:11:08AM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:

[..]
> 
> Well, here I am a "comparatively new" user of SuSE Linux, and I found it 
> remarkably easy to compile Vim 7 on it. If you decide you want to try 
> your hand at it, 

I was contemplating switching to gentoo at some point in the future. My
understanding is that it is a source-packaged distro .. should make it
easier to deal with compile-time customization. I've used SuSE (briefly)
in the past and found it rather confusing - at the time. Among other
things I had problems with the doc. It looked very nice at first glance
but reading it was rather painful. Seems that rather than writing doc
from scratch in English some non-native speakers had translated it from
the original German doc.. Not sure.. I also found the curses config
tools difficult to figure out. But then I prefer to do most
configuration tasks by editing config files (things like fonts..
colors.. etc. are the exception because it's a trial and error process
and some form of instant feedback is invaluable..)

> subscribe to the vim-dev list and ask advice there, 
> I'll answer if no one else jumps in before me. Also, some day I should 
> write a HowTo page for Vim on Unix, similar to the one I already have 
> for Vim on Windows, and post it on my "Vim" site 
> http://users.skynet.be/antoine.mechelynck/vim/
> 
That would be very useful. The Vim book doesn't say much about these
aspects and learning by just reading the Vim help is not very
efficient.. for one you run into so much good stuff that you get
sidetracked and forget what you were initially looking for.

:-)

Thanks Tony, I really appreciate all your help..

cga


Re: :ha printouts - fontsize

2006-06-04 Thread cga2000
On Sun, Jun 04, 2006 at 09:07:47PM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:
> >On Sun, Jun 04, 2006 at 02:57:56PM EDT, A.J.Mechelynck wrote:
> >  
> >>cga2000 wrote:
> >>
> >>>I occasionally need a quick printout of what I am currently editing and
> >>>use the :ha command. I was wondering whether there was any way I could
> >>>switch to a different printer font or choose a smaller font size.
> >>>
> >>>I doubt this is relevant but just in case I'll mention that I use vim on
> >>>an xterm and cups for print jobs. As to the printer it is an HP Laserjet
> >>>with embedded postscript.
> >>>
> >>>Thanks,
> >>>
> >>>cga
> >>>
> >>>
> >>> 
> >>>  
> >>The Vim documentation's well-known needle-and-haystack problem again.
> >>
> >
> >very frustrating this particular time.. I only had to page up once from
> >where I was (*printoptions*) to find it.. 
> >
> >  
> >>See
> >>   :help 'printfont'
> >>   :help pfn-option
> >>
> >
> >This last one does not work in my version of vim. :help pfn does..
> >  
> [...]
> 
> ":help pfn-option" is defined in print.txt (for Vim version 7.0, Last 
> change: 2006 Apr 30) and there is a link to it under ":help 'printfont'" 
> in options.txt (for Vim version 7.0, Last change: 2006 May 04). I 
> downloaded them as part of 
> http://ftp.vim.org/pub/vim/unix/vim-7.0.tar.bz2 dated 7 may 2006, which 
> is one of the three archives containing the full Vim sources for the 
> unpatched version 7.0. (Then there are 17 patches -bugfixes- to this day.)
> 
.. as I suspected. Some of the stuff I've read about v7.0 on this list
rather made my mouth water.. but as a comparatively new user of debian
upgrading vim is something I'm not prepared to do just now.. 

Thanks,

cga


Re: display tweaks - tilde lines, statusline..

2006-06-04 Thread cga2000
On Sun, Jun 04, 2006 at 08:50:18PM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:
> >On Sun, Jun 04, 2006 at 03:11:10PM EDT, A.J.Mechelynck wrote:
> >  
> >[...]
> >  
> >>Note that the same highlight group also governs the @ or @@@ for a 
> >>partial line at the end of a window, and possibly other things too.
> >>
> >
> >I had thought of that while experimenting - although I have no idea
> >what the "@" and "@@@" are .. or the "partial lines".
> >  
> 
> When using 'wrap', one "file line" can be wrapped onto several "screen 
> lines". When the last "file line" in a buffer window overflows below the 
> bottom of the window, then one of two things can happen:
> 
> - if 'display' includes "lastline", the bottom three characters at lower 
> right of the window are replaced by @@@, the rest of that "file line" is 
> displayed, or as much of it as fits into the window.
> - Otherwise (the default) the last "file line" in the window is replaced 
> by as many "screen lines" as necessary consisting of @ at left, the rest 
> empty.
> 
Thanks. Great explanation.

> >Is there any way I can query vim to find out what a group (?) like
> >NonText actually covers?
> >  
> 
> :help NonText
> 
Looks like setting it to "invisible" the way you recommend is fairly
harmless. Hope it doesn't come back and bite me when I've forgotten all
about it.

I think I should stick these doubtful customizations of mine in some
separate file rather than modifying individual colorschemes. I've just
tested: 

:set FoldColumn=2
:hi  Foldcolumn ctermbg=black

.. and it adds a 2-column margin to the left of my display and thought
I could add these to my .vimrc but then this will be lost whenever I
change colorscheme on the fly.

> > [...]
> 
awful thing about vim is that the more you learn the more you realize
how complex it is and how much more there is to learn.. But thanks to
all the help I am getting on this list I am now a bit more able to find
my own answers. The help files are great but it's really a maze.. You
could spend hours and hours just following these tags.. Sometimes it
gets to the point where I can't remember what I was looking for in the
first place.  

:-)
> 
> Best regards,
> Tony.

Thanks,

cga


Re: :ha printouts - fontsize

2006-06-04 Thread cga2000
On Sun, Jun 04, 2006 at 02:57:56PM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:
> >I occasionally need a quick printout of what I am currently editing and
> >use the :ha command. I was wondering whether there was any way I could
> >switch to a different printer font or choose a smaller font size.
> >
> >I doubt this is relevant but just in case I'll mention that I use vim on
> >an xterm and cups for print jobs. As to the printer it is an HP Laserjet
> >with embedded postscript.
> >
> >Thanks,
> >
> >cga
> >
> >
> >  
> The Vim documentation's well-known needle-and-haystack problem again.

very frustrating this particular time.. I only had to page up once from
where I was (*printoptions*) to find it.. 

> 
> See
>:help 'printfont'
>:help pfn-option

This last one does not work in my version of vim. :help pfn does..
> 
> You could have found the latter from the former, which you could have 
> found by means of
> 
>:help 'print
> 
> using :set nocompatible wildmenu

starting using wildmenu yesterday.. nicer than ":h print+"

need to get used to it.

Also, I found a vim plugin that provides a printoptions menu -
prtdialog.vim - so you only need to remember the command to start it
but I don't know if it's my setup or what.. I can't get it to work.

You're supposed to type pd to activate the menu but vim keeps
telling me that "modifiable is off" each time I issue a \pd against
anything like a vim help file.. a man page.. etc. Not very useful.

> 
> 
> HTH,
> Tony.

Thanks.

cga


Re: :ha printouts - fontsize

2006-06-04 Thread cga2000
On Sun, Jun 04, 2006 at 02:50:02PM EDT, Yegappan Lakshmanan wrote:
> Hi,
> 
> On 6/4/06, cga2000 <[EMAIL PROTECTED]> wrote:
> >I occasionally need a quick printout of what I am currently editing and
> >use the :ha command. I was wondering whether there was any way I could
> >switch to a different printer font or choose a smaller font size.
> >
> 
> Did you try changing the 'printfont' option?
> 
> :help pfn-option
> 
:help pfn
:help printfont
 
don't know how I missed that.. I must have done an ":h print" + Ctrl-D
at some point. 

thanks a bunch.. answers all my questions.

Thanks,

cga


Re: display tweaks - tilde lines, statusline..

2006-06-04 Thread cga2000
On Sun, Jun 04, 2006 at 03:11:10PM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:
> >Is there any way the "tilde lines" that represent empty lines at the end
> >of the buffer can be changed to something else or removed altogether? 
> >  
> You may change their colour. If you set bg and fg to the same value, 
> they will become invisible. For instance:
> 
> :hi NonText cterm=NONE ctermbg=bg ctermfg=bg gui=NONE guibg=bg guifg=bg
> 
I had tried something similar 

:hi NonText ctermbg=black ctermfg=black

and it didn't work. I ran a quick test and you also have to specify
cterm=NONE for the above to work. 

But then the help file specifies the following under "cterm": 

Use only one of "cterm=" OR "ctermfg=" OR "ctermbg=".

> Note that the same highlight group also governs the @ or @@@ for a 
> partial line at the end of a window, and possibly other things too.

I had thought of that while experimenting - although I have no idea
what the "@" and "@@@" are .. or the "partial lines".

Is there any way I can query vim to find out what a group (?) like
NonText actually covers?

> >Is there any was the "statusline" can be displayed systematically? As
> >far as I can tell it only materializes when I split the display.
> >  
> see ":help 'laststatus'". :set laststatus=2 will make it always visible.

Thanks, this is exactly what I need.

> >Is there any way I can have the contents of a buffer displayed a couple
> >of columns to the right of the (sub)window's border? I currently specify
> >"set foldcolumn=" but that doesn't appeear to be what it was meant for
> >so I was wondering whether there might be a better way.
> >  
> I don't understand what you're trying to do. Maybe ":help 'number'" or 
> ":help :vsplit" will give you ideas.

Sorry.. trying to keep my posts short..

What I mean is that when you display anything in vim - source program,
doc, vim help file.. etc. the text starts in column one as you would
expect but this means that it is right next to the window/terminal's
edge - rather than leaving a narrow margin of 1-2 columns, which would
make the display look a lot nicer and improve legibility.

When using vertical split with for instance the vim help in the
rightmost window, the first character of each line that starts in column
one actually touches the VertSplit line without a single intervening
pixel. As to the left window the text is flush against the laptop's
frame and depending on the colorscheme that I use and ambient light I
can actually see this first character's reflection on the dark plastic
of the display's encasing.  

So what I thought was that a narrow margin would make the display look a
lot nicer and enhance legibility. 

So pretty much along the lines of your "invisible tildes" trick above,
I tried setting foldcolumn to two and looking for some :hi way of
making sure that the fold column is not visible - same color as my
display's background. 

But just as you mentioned for the NonText group, I was concerned using
foldcolumn for something it was not meant for might have some hidden
and unwanted side-effects.

Interestingly, with :set nu the problem is resolved: one empty column
separates the line numbers from the text. But then I don's really want
line numbers when I'm looking at a help file for instance.

> >Is there any way I can have vim display the hex contents of a buffer? I
> >currently do a "ggVG :!od -t x1z -w32" followed by "u" to revert back to
> >a regular view but maybe there is a more straightforward way to achieve
> >the same result.
> >  
> see ":help hex-editing"

.. hmm .. the best part is the one that says that vim is not really
meant for it.. :-)

Thanks,

cga


Re: display tweaks - tilde lines, statusline..

2006-06-04 Thread cga2000
On Sun, Jun 04, 2006 at 02:47:48PM EDT, Yegappan Lakshmanan wrote:
> Hi,
> 
> On 6/4/06, cga2000 <[EMAIL PROTECTED]> wrote:
> >Is there any way the "tilde lines" that represent empty lines at the end
> >of the buffer can be changed to something else or removed altogether?
> >
> 
> AFAIK, you cannot remove/hide the tilde lines. You can change the
> highlighting used for the tilde lines using the NonText highlight
> group.
> 
.. for some reason I find them annoying.. :-)

.. tried setting NonText "ctermfg=black ctermbg=black" and they were
still visible

> >
> >Is there any was the "statusline" can be displayed systematically? As
> >far as I can tell it only materializes when I split the display.
> >
> 
> You can set the 'laststatus' option to 2 to always display the status line:
> 
>set laststatus=2
> 
great, thanks. I don't like stuff like that to change while I'm editing.
> >
> >Is there any way I can have the contents of a buffer displayed a couple
> >of columns to the right of the (sub)window's border? I currently specify
> >"set foldcolumn=" but that doesn't appeear to be what it was meant for
> >so I was wondering whether there might be a better way.
> >
> >Is there any way I can have vim display the hex contents of a buffer? I
> >currently do a "ggVG :!od -t x1z -w32" followed by "u" to revert back to
> >a regular view but maybe there is a more straightforward way to achieve
> >the same result.
> >
> 
> You can use the xxd tool shipped with Vim to convert a file to hex format
> and back.

definitely more straightforward if you take xxd's defaults. I'll switch
to that.
> 
> - Yegappan

Thanks,

cga


display tweaks - tilde lines, statusline..

2006-06-04 Thread cga2000
Is there any way the "tilde lines" that represent empty lines at the end
of the buffer can be changed to something else or removed altogether? 

Is there any was the "statusline" can be displayed systematically? As
far as I can tell it only materializes when I split the display.

Is there any way I can have the contents of a buffer displayed a couple
of columns to the right of the (sub)window's border? I currently specify
"set foldcolumn=" but that doesn't appeear to be what it was meant for
so I was wondering whether there might be a better way.

Is there any way I can have vim display the hex contents of a buffer? I
currently do a "ggVG :!od -t x1z -w32" followed by "u" to revert back to
a regular view but maybe there is a more straightforward way to achieve
the same result.

Thanks,

cga


:ha printouts - fontsize

2006-06-04 Thread cga2000
I occasionally need a quick printout of what I am currently editing and
use the :ha command. I was wondering whether there was any way I could
switch to a different printer font or choose a smaller font size.

I doubt this is relevant but just in case I'll mention that I use vim on
an xterm and cups for print jobs. As to the printer it is an HP Laserjet
with embedded postscript.

Thanks,

cga


non-gui version - changing fonts on the fly

2006-05-28 Thread cga2000
Just a confirmation: 

I am under the impression that with vim running in an xterm, you are
limited to using whatever fonts have been defined as X resources and
using a mouse Ctrl- if you want to change to a different
font on the fly. Naturally the font change would affect the entire
display.

Likewise, I have seen some rather elegant color schemes where some :hi
groups are highlighted not only by using a different colour but also
switching to italic - charon.vim, eg.  Coding "cterm=italic" in the .vim
file does not appear to cause a vim syntax error but after taking a
quick look at the xterm doc it seems that using an italicized font as a
highlighting enhancement - as least in my setup - is not possible when
running vim in non-gui mode. 

Am I correct assuming the above or am I missing anything?

Thanks,

cga


Re: Tables.

2006-05-23 Thread cga2000
On Tue, May 23, 2006 at 01:43:59AM EDT, Hari Krishna Dara wrote:
> 
> On Tue, 23 May 2006 at 12:51am, cga2000 wrote:
> 
> > On Sat, May 20, 2006 at 04:08:01PM EDT, Thomas Adam wrote:
> > > --- Hari Krishna Dara <[EMAIL PROTECTED]> wrote:
> > > > It is a text browser like lynx, but does a better job of formatting
> > > > tables and others. From my man page, the homepage should be:
> > >
> > > Of which I find 'Elinks' to do an even better job.  As usual, YMMV.
> > >
> > .. and has a more sensible name than 'links' - try googling on links..
> >
> > I have switched from mozilla to Elinks and find it mature enough for
> > just about anything. Only drawback - at least in the version I am
> > running, is that it does not appear to support javascript.
> >
> > Thanks,
> >
> > cga
> 
> >From the screenshots, it seems like it does a great job of formatting
> pages.
> 
> BTW, did you find my solution of using links -dump (or elinks -dump)
> partially meeting your needs? I didn't see any feedback from you on
> either this or the soft-tab-stop plugin that I sent before. I am curious
> on which apprach you are finally going to adapt and why.
> 
Something is not quite right with my procmail setup. I eliminate
duplicates and so when you email me and cc: the list I only get a  copy
in my Inbox..  nothing in the mailing list folder.. so sometimes I miss
replies and when I see them I do  'g' group reply - which I believe is
the equivalent of "reply to all" in GUI mailers. I have very recently
switched to mutt and I still have some things that need a little bit of
persuasion before they do everything I want. 

So, I'm just sending this message both to you *and* cc'ing the list so
hopefully you will get at least one copy. 

Too late to run a test now, it's 3:11 AM here on the East Coast and I
really need to sleep. :-)

I did see your emails (both the -links dump and the soft-tabs one) and
I'm pretty sure I responded. I'll double-check tomorrow and re-send if
necessary.

Thanks,

cga


Re: Tables.

2006-05-22 Thread cga2000
On Sat, May 20, 2006 at 12:09:20AM EDT, Hari Krishna Dara wrote:
> 
[..]
> 
> If you have links installed, you can do this easily with the -dump
> option. Here is a quick idea:
> 
> function! HtmlToTxt()
> write
> let filename = expand('%')
> pedit %.txt
> wincmd p
> setl bufhidden=delete
> exec 'silent! 1,$!links -dump '.filename
> setl nomodified
> wincmd p
> endfunc
> nnoremap   :call HtmlToTxt()
> 
> E.g., if you have the following in a file:
> 
> 
> 
>   
> NumberDescription
>   
>   
> 1One
>   
>   
> 2Two
>   
>   
> 3Three
>   
> 
> 
> 
> and press , you get the below in the preview window:
> 
>+--+
>| Number | Description |
>|+-|
>| 1  | One |
>|+-|
>| 2  | Two |
>|+-|
>| 3  | Three   |
>+--+
> 
> To make your HTML table editing easier, you can have macros to insert new
> rows and columns.
> 
Thanks, Hari,

This is very nice indeed. Took me about two minutes to set it up and run
the test and would appear to meet my requirements: I can get the
text-only rendering - without box characters - for a quick preview in
vim via a simple keyboard action and I could likely set up some other
macro/function that would launch Elinks or a graphical web browser for
different levels of rendering of my documents.

I need to dig into vim's function capabilities, see if I can have the
preview window full screen-height - or use normal vertical split instead
of the preview window - so I can have the html source and the basic
text-mode rendering thereof side-by-side.

The dilemma of course is choosing which markup language I should choose
(html, groff, latex, ..). I'm sure I could start one of those
never-ending threads if I asked something quite vague such as "which
markup language is the best choice for the documenting dilettante".. or
something to that effect. :-)

Personally the main issue I have with html is that I find its syntax
rather illegible and quite difficult to type. But I'm sure there must be
quite a collection of vim tools to help your enter all these tags
rapidly.

Thank you very much.

cga

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


Re: Tables.

2006-05-22 Thread cga2000
On Sat, May 20, 2006 at 04:08:01PM EDT, Thomas Adam wrote:
> --- Hari Krishna Dara <[EMAIL PROTECTED]> wrote:
> > It is a text browser like lynx, but does a better job of formatting
> > tables and others. From my man page, the homepage should be:
> 
> Of which I find 'Elinks' to do an even better job.  As usual, YMMV.
> 
.. and has a more sensible name than 'links' - try googling on links..

I have switched from mozilla to Elinks and find it mature enough for
just about anything. Only drawback - at least in the version I am
running, is that it does not appear to support javascript.

Thanks,

cga


Re: Tables.

2006-05-20 Thread cga2000
On Fri, May 19, 2006 at 11:35:09PM EDT, Gary Johnson wrote:
> On 2006-05-19, cga2000 <[EMAIL PROTECTED]> wrote:
> > On Fri, May 19, 2006 at 08:22:40AM EDT, Benji Fisher wrote:
> > > On Thu, May 18, 2006 at 10:08:53PM -0400, cga2000 wrote:
> > > > 
> > > > I was wondering if another approach such as using a markup language
> > > > that supports tables might not be preferable in the long run. What I
> > > > mean by this is that it might be a little more difficult to start off
> > > > with but might provide more control and facilities and end up being a
> > > > more "portable" solution.
> > > > 
> > > > html would be an obvious candidate but I suppose that there are others
> > > > in the linux world?
> > > > 
> > > > Is there any way I can split the screen and have the source version of a
> > > > document written in a markup language in one window and the compiled
> > > > version in the other?  With a simple command or key combo that I could
> > > > issue in the "source" window that would cause a refresh of what is
> > > > displayed in the other window..? Or is vim just not suited for this
> > > > kind of approach?
> > > 
> > >  It depends on what you mean by "split the screen."  
> > 
> > vim vertical split on an xterm. 
> 
> If the compiled version is plain text, sure.  You could use an 
> autocommand with the BufWritePost event that would run the compiler 
> on your source file, switch vim windows, delete the existing 
> contents, and :read in the compiler output file.

Sounds pretty straight-forward.
> 
> This will work with HTML and with man pages, with some limitations 
> on fonts and styles.
> 
> > > If you want one window that has vim running in the bottom half and an
> > > HTML browser running in another, 
> > 
> > yes.. pretty much what I had in mind.. another example: I'm writing a
> > man page and I would like to work on the source in the left vim window
> > and check the rendered man page in the right vim window:
> > 
> > 1. I make changes to my man page & save to disk
> > 2. I switch to the other window and hit the "refresh" key
> > 3. Now I can see the results of my changes
> > 4. Back to 1. above etc..
> > 
> > In order to do this in vim you would probably need to be able to run a
> > shell in a vim window - doesn't seem to be possible.
> 
> You don't need a shell in a window, just do what I suggested above.  
> Or use a "refresh" key instead of an autocommand, if you prefer.
> 
Yes, your description of the process is very clear. If I understand
correctly I would just need to direct the output of the compile command
to a temp file and cause vim to re-read it and display the updated
version.

> There is a plugin that lets you read man pages within vim.  You 
> could probably use this directly or adapt it to your needs.
> 
I was just going to ask whether you could suggest something comparable
that I could adapt.. :-)

As it happens, the :Man  plugin is one of my favorites.
> 
> > It doesn't have to be html, though. Some very basic markup language
> > that provides headers, paragraphs, lists, and tables and that could be
> > easily translated to html, pdf, postscript, and simple text would be
> > well-adapted to my needs. 
> > 
> > No idea if linux has such a thing.
> 
> Well, there is nroff.  

I have used it once in the past to write a test man page. Just taking
a look at how things work. And I don't remember running into any
problems.

> Man pages are actually written using nroff macros.  At least one
> implementation of the man command uses the following to format the
> pages it finds:
> 
> tbl -TX  | neqn | nroff -man | col -x

I don't remember a man page that has a table in it. I mean a table that
actually visualizes the cells with box drawing characters.
> 
> The tbl command is used to format tables and the neqn command is used
> to format equations.
> 
> Nroff does some things really well and some things not so well.  I
> think w3m does a better job of creating tables from HTML than tbl and
> nroff do from their source code.

I use mostly elinks and it also does a very good job of rendering HTML
tables. 
> 
> Then there's latex, which I know nothing about other than it is
> supposedly a very nice typesetting language for everything from short
> letters to long dissertations and books.  A lot of people swear by it. 

Yes, I've used LyX in the past and it's rather nice. Don't know if
latex is quite suitable for the small documentation tasks I have in
mind but from what I have heard it's probably worth the effort. 
> 
> HTH, Gary
> 
Very much so.

Thanks,

cga


Re: Tables.

2006-05-19 Thread cga2000
On Fri, May 19, 2006 at 08:22:40AM EDT, Benji Fisher wrote:
> On Thu, May 18, 2006 at 10:08:53PM -0400, cga2000 wrote:
> > 
> > I was wondering if another approach such as using a markup language
> > that supports tables might not be preferable in the long run. What I
> > mean by this is that it might be a little more difficult to start off
> > with but might provide more control and facilities and end up being a
> > more "portable" solution.
> > 
> > html would be an obvious candidate but I suppose that there are others
> > in the linux world?
> > 
> > Is there any way I can split the screen and have the source version of a
> > document written in a markup language in one window and the compiled
> > version in the other?  With a simple command or key combo that I could
> > issue in the "source" window that would cause a refresh of what is
> > displayed in the other window..? Or is vim just not suited for this
> > kind of approach?
> 
>  It depends on what you mean by "split the screen."  

vim vertical split on an xterm. 

> If you want one window that has vim running in the bottom half and an
> HTML browser running in another, 

yes.. pretty much what I had in mind.. another example: I'm writing a
man page and I would like to work on the source in the left vim window
and check the rendered man page in the right vim window:

1. I make changes to my man page & save to disk
2. I switch to the other window and hit the "refresh" key
3. Now I can see the results of my changes
4. Back to 1. above etc..

In order to do this in vim you would probably need to be able to run a
shell in a vim window - doesn't seem to be possible.

> you will have to look for some other program that can embed both.  

I use gnu/screen and the one feature that I miss is that it does not
have vertical split. So I can't have my source and output side by side
visualising in one window the outcome of my changes in the other.

> If you are content with [g]vim and a browser running in separate
> windows, it should not be hard (depending on your OS) to have vim save
> the current version and send the browser a command to re-load the
> file.

It doesn't have to be html, though. Some very basic markup language
that provides headers, paragraphs, lists, and tables and that could be
easily translated to html, pdf, postscript, and simple text would be
well-adapted to my needs. 

No idea if linux has such a thing.

Thanks,

cga


Re: Tables.

2006-05-18 Thread cga2000
On Thu, May 18, 2006 at 08:23:00AM EDT, Benji Fisher wrote:
> On Wed, May 17, 2006 at 07:50:08PM -0700, Suresh Govindachar wrote:
> > 
> > cga2000 wrote:
> > 
> >   > But I was not thinking of these tab stops.. 
> >   > more in the line of typewriter stuff, I guess. 
> > 
> >   Creating an imap involving the following 
> >   operations might do the job:
> > 
> >"---set up the typewriter style tab-stops---
> >let twtabs=[3, 5, 10, 28, 40, 58]
> >"---then imap  to 
> >"   something involving the following---
> >let idx=0 
> >while (getpos('.')[2] >= twtabs[idx]) 
> >  let idx += 1  
> >endwhile
> >"---then something like--- 
> >cursor(0, twtabs[idx])
> >"---or---
> >normal (twtabs[idx] - getpos('.')[2])l
> > 
> >   --Suresh
> 
>  I already implemented that.  See the VarTab() function in foo.vim
> (my file of example vim functions):
> 
> http://www.vim.org/script.php?script_id=72
> 
Thanks. Will play with that too. 

I was wondering if another approach such as using a markup language
that supports tables might not be preferable in the long run. What I
mean by this is that it might be a little more difficult to start off
with but might provide more control and facilities and end up being a
more "portable" solution.

html would be an obvious candidate but I suppose that there are others
in the linux world?

Is there any way I can split the screen and have the source version of a
document written in a markup language in one window and the compiled
version in the other?  With a simple command or key combo that I could
issue in the "source" window that would cause a refresh of what is
displayed in the other window..? Or is vim just not suited for this
kind of approach?

Thanks,

cga


Re: Tables.

2006-05-18 Thread cga2000
On Thu, May 18, 2006 at 02:36:05AM EDT, Stano Sitar wrote:
> cga2000 napsal(a):
> 
> >The functionalities I had in mind would probably do something like this:
> >
> >1. Assist text entry by letting you define tab stops,
> >2. Let you select a column of text and justify it, 
> >3. Provide some means of inserting vertical lines at each tab stop,
> >4. Assist in creating horizontal lines by adding the ad hoc character
> >   where a vertical and a horizontal line intersect, 
> >5. Reformat the table frame when box drawing characters are not
> >   available (replacing line intersections by '+' for instance).
> 
> Try program sc
> sc is an anicent "spreadsheet calculator" for console
> (text only, no mouse)
> It does everything you want, it is very small,
> it exists for number of platforms (for dos and Windows
> version look for "gnuish" collection)
> 
> keybindings in sc are very vi-like
> 
> You can make script that sends data from vim to sc,
> format data in sc and export them back to vim
> 
> best regards
> Stanislav

Definitely the better strategy. I'll keep this in mind for when I have
more time to look into it. 

I downloaded it to take a look. Is there a some kind of user guide or
other resource that  might help getting started?

I also found another text-mode spreadsheet called slsc. Would you know
if either of these is still maintained and where I should go, should I
need some form of assistance?

Thanks,

cga


Re: Tables.

2006-05-18 Thread &#x27;cga2000'
On Wed, May 17, 2006 at 10:50:08PM EDT, Suresh Govindachar wrote:
> 
> cga2000 wrote:
> 
>   > But I was not thinking of these tab stops.. 
>   > more in the line of typewriter stuff, I guess. 
> 
>   Creating an imap involving the following 
>   operations might do the job:
> 
>"---set up the typewriter style tab-stops---
>let twtabs=[3, 5, 10, 28, 40, 58]
>"---then imap  to 
>"   something involving the following---
>let idx=0 
>while (getpos('.')[2] >= twtabs[idx]) 
>  let idx += 1  
>endwhile
>"---then something like--- 
>cursor(0, twtabs[idx])
>"---or---
>normal (twtabs[idx] - getpos('.')[2])l
> 
>   --Suresh

Thanks much, saving this for later.

cga


  1   2   >