cga2000 wrote:
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

...oops... verbose set textwidth? wrapmargin?

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.)

:verbose set formatoptions? formatexpr?

  formatoptions=tcql
        Last set from /usr/share/vim/vim63/ftplugin/mail.vim

":help fo-table" will tell you what these flags mean.

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.

'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.


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 <Char-338> lmap oe <Char-339>

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.

If your other applications don't support UTF-8 you will have to do without the OE and oe digraphs.


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 and
do unicode out-of-the-box..  or until I have the time to look into
this and acquire a better understanding of the issues.

I'm using "language mappings" here so they will be turned on and off together with the keymap.


Come to think of it, French would appear to have the most annoying
spelling system of the West European languages that I have some degree
of familiarity with.  Spanish, Italian, and German seem to use fewer
non-ASCII characters.
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.

[..]


Thanks

cga



Reply via email to