Re: Konsole: lost focus of window or tab

2007-01-17 Thread Nikolai Weibull

On 1/17/07, Matthew Woehlke [EMAIL PROTECTED] wrote:


Mikolaj Machowski wrote:



 Is it possible to recognize if window or tab of Konsole lost focus
 through termcap/terminfo sequence?

 Or is it at least possible with dcop or any other way?

 I am investigating ways to support Vim FocusGain/FocusLost autoevents.



Long answer (short answer below):


[A really long answer]

Hi!

Sorry, but I just had to ask, what exactly are you responding to?  I
saw no suggestion of using DCOP in the vim-dev thread.  Did someone on
the kde list suggest it?  Just curious on what they were suggesting.

Thanks!

 nikolai


VC8 makefile patch

2007-01-17 Thread Mike Williams

Hi,

Attached is a patch to use VC8 specific optimization options.  FTR, VC8 
no longer supports the /Gn processor code generation directive, and the 
makefile now uses link time code generation when not optimizing for space.


Enjoy.

Mike
--
If space is a vacuum, who changes the bags?
*** Make_mvc.mak.orig   Wed Apr 26 10:30:22 2006
--- Make_mvc.makWed Jan 17 13:48:57 2007
***
*** 321,326 
--- 321,327 
  OUTDIR=$(OBJDIR)
  
  # Convert processor ID to MVC-compatible number
+ !if $(_NMAKE_VER) != 8.00.50727.42
  !if $(CPUNR) == i386
  CPUARG = /G3
  !elseif $(CPUNR) == i486
***
*** 334,339 
--- 335,346 
  !else
  CPUARG =
  !endif
+ !else
+ # VC8 only allows specifying SSE architecture
+ !if $(CPUNR) == pentium4
+ CPUARG = /arch:SSE2
+ !endif
+ !endif
  
  !ifdef NODEBUG
  VIM = vim
***
*** 344,349 
--- 351,362 
  !else # MAXSPEED
  OPTFLAG = /Ox
  !endif
+ # Use link time code generation in VC8 if not worried about size
+ !if $(_NMAKE_VER) == 8.00.50727.42
+ !if $(OPTIMIZE) != SPACE
+ OPTFLAG = $(OPTFLAG) /GL
+ !endif
+ !endif
  CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG)
  RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
  ! ifdef USE_MSVCRT
***
*** 706,711 
--- 719,733 
  LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB)  user32.lib $(SNIFF_LIB) 
\
$(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) \
$(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
+ 
+ # Report link time code generation progress if used. 
+ !ifdef NODEBUG
+ !if $(_NMAKE_VER) == 8.00.50727.42
+ !if $(OPTIMIZE) != SPACE
+ LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
+ !endif
+ !endif
+ !endif
  
  all:  $(VIM).exe vimrun.exe install.exe uninstal.exe xxd/xxd.exe \
GvimExt/gvimext.dll


Re: VC8 makefile patch

2007-01-17 Thread A.J.Mechelynck

Mike Williams wrote:

Hi,

Attached is a patch to use VC8 specific optimization options.  FTR, VC8 
no longer supports the /Gn processor code generation directive, and the 
makefile now uses link time code generation when not optimizing for space.


Enjoy.

Mike



Why the test on !if $(_NMAKE_VER) == 8.00.50727.42 ? Are you sure the old 
behaviour will be the right thing to do with _any_ older _or_ newer version? 
Shouldn't we rather assume that versions 8.0 or later of MSVC will require 
the new arguments? We should provide as best as we can for future versions, to 
avoid, if possible, the need for constant re-patching of the makefile with 
every new version that Gates  Co will decide to publish.



Best regards,
Tony


Re: VC8 makefile patch

2007-01-17 Thread Mike Williams

On 17/01/2007 15:09, A.J.Mechelynck wrote:

Mike Williams wrote:

Hi,

Attached is a patch to use VC8 specific optimization options.  FTR, VC8 
no longer supports the /Gn processor code generation directive, and the 
makefile now uses link time code generation when not optimizing for space.


Enjoy.

Mike



Why the test on !if $(_NMAKE_VER) == 8.00.50727.42 ? Are you sure the old 
behaviour will be the right thing to do with _any_ older _or_ newer version? 
Shouldn't we rather assume that versions 8.0 or later of MSVC will require 
the new arguments? We should provide as best as we can for future versions, to 
avoid, if possible, the need for constant re-patching of the makefile with 
every new version that Gates  Co will decide to publish.


The comparison operators can be made relative if desired.  It is normal 
for any new VC compiler to review compiler options and update any build 
scripts.  VC8 retired, deprecated, and added a large number of 
compiler/linker options.  There is nothing to say future versions wont 
do the same.  To have a build script use minimal options for an 
unrecognised compiler version is reasonable - as long as it reports that 
this is the case.


Mike
--
Do you think that you're right and I'm wrong? How naive if you do...


Re: Konsole: lost focus of window or tab

2007-01-17 Thread Matthew Woehlke

Nikolai Weibull wrote:

On 1/17/07, Matthew Woehlke wrote:

Mikolaj Machowski wrote:
 Is it possible to recognize if window or tab of Konsole lost focus
 through termcap/terminfo sequence?

 Or is it at least possible with dcop or any other way?

 I am investigating ways to support Vim FocusGain/FocusLost autoevents.



Long answer (short answer below):


[snip really long answer]

Hi!

Sorry, but I just had to ask, what exactly are you responding to?  I
saw no suggestion of using DCOP in the vim-dev thread.  Did someone on
the kde list suggest it?  Just curious on what they were suggesting.


Mikolaj Machowski though of it (see his original e-mail to kde-devel, 
quoted above). So this is a follow up of the previous thread, FocusLost 
and terminal functionality; also it raised a number of curiosity 
questions (about Vim) on my part, so I cross-posted. :-) (And because we 
are talking about Vim, of course.)


--
Matthew
HIPPOS feel unacknowledged. HIPPOS get angry.
 PRAISE HIPPOS
 HIPPOS seem somewhat placated.



Re: Konsole: lost focus of window or tab

2007-01-17 Thread Matthew Woehlke

Matthew Woehlke wrote:

Mikolaj Machowski wrote:

Is it possible to recognize if window or tab of Konsole lost focus
through termcap/terminfo sequence?

Or is it at least possible with dcop or any other way?

I am investigating ways to support Vim FocusGain/FocusLost autoevents.


[snip long answer]
[...and short answer, too]


Robert Knight says we should be able to add escape sequences to Konsole 
to support this. I might be able to help with the patching (although it 
is KDE4 that will really get the fix, anything for KDE3 does not seem 
likely to be accepted, so you would be patching your own local version), 
but someone Vim-side needs to tell us what Konsole needs to provide...


Does Vim already support notifications for some terminal emulators? If 
so, how do we go about adding Konsole to that list?


--
Matthew
HIPPOS feel unacknowledged. HIPPOS get angry.
 PRAISE HIPPOS
HIPPOS seem somewhat placated.



Re: Konsole: lost focus of window or tab

2007-01-17 Thread A.J.Mechelynck

Matthew Woehlke wrote:

Matthew Woehlke wrote:

Mikolaj Machowski wrote:

Is it possible to recognize if window or tab of Konsole lost focus
through termcap/terminfo sequence?

Or is it at least possible with dcop or any other way?

I am investigating ways to support Vim FocusGain/FocusLost autoevents.


[snip long answer]
[...and short answer, too]


Robert Knight says we should be able to add escape sequences to Konsole 
to support this. I might be able to help with the patching (although it 
is KDE4 that will really get the fix, anything for KDE3 does not seem 
likely to be accepted, so you would be patching your own local version), 
but someone Vim-side needs to tell us what Konsole needs to provide...


Does Vim already support notifications for some terminal emulators? If 
so, how do we go about adding Konsole to that list?




Sure. At the very least, it reacts to the notifications that a key has been 
pressed, or the mouse moved or clicked ;-) or, more seriously, to FocusGained 
and FocusLost events for the GUI and a few console versions where this can be 
detected. I suppose any notification mechanism would be OK, as long as Vim 
can be made to listen to it and trigger its (already defined) FocusGained and 
FocusLost events (q.v.). Do the termcap/terminfo libraries provide for 
representation of focus-related event signals? I don't know, but IMHO it would 
be easiest if they did; however, even if they don't, I suppose an appropriate 
event handler could be programmed into Vim, provided that there existed _any_ 
method to communicate those events unambiguously to a running program. If 
there are several incompatible ways to do it depending on OS and terminal, 
then I suppose it could be implemented via a configure argument and/or a 
configure library search, the way mouse handlers are already included or 
excluded at compile (or more precisely configure) time: see


vim --version | grep mouse


Best regards,
Tony.


Re: VC8 makefile patch

2007-01-17 Thread Bram Moolenaar

Mike Williams wrote:

 Attached is a patch to use VC8 specific optimization options.  FTR, VC8 
 no longer supports the /Gn processor code generation directive, and the 
 makefile now uses link time code generation when not optimizing for space.

Although MS keeps changing the arguments, the new ones mostly get used
again in future versions.  Thus this check:

 + !if $(_NMAKE_VER) != 8.00.50727.42

Should probably check if the version is greater than or smaller than
this specific number.  At least do the comparing with this specific
number once and pass the result to further ifs.

-- 
Q. What happens to programmers when they die?
A: MS-Windows programmers are reinstalled.  C++ programmers become undefined,
   anyone who refers to them will die as well.  Java programmers reincarnate
   after being garbage collected.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: Konsole: lost focus of window or tab

2007-01-17 Thread Bram Moolenaar

Matthew Woehlke wrote:

 Matthew Woehlke wrote:
  Mikolaj Machowski wrote:
  Is it possible to recognize if window or tab of Konsole lost focus
  through termcap/terminfo sequence?
 
  Or is it at least possible with dcop or any other way?
 
  I am investigating ways to support Vim FocusGain/FocusLost autoevents.
  
  [snip long answer]
  [...and short answer, too]
 
 Robert Knight says we should be able to add escape sequences to Konsole 
 to support this. I might be able to help with the patching (although it 
 is KDE4 that will really get the fix, anything for KDE3 does not seem 
 likely to be accepted, so you would be patching your own local version), 
 but someone Vim-side needs to tell us what Konsole needs to provide...
 
 Does Vim already support notifications for some terminal emulators? If 
 so, how do we go about adding Konsole to that list?

Vim does check for some events, such as the xterm version response.  We
need to add termcap/terminfo codes for this internally (won't work
anywhere else).  Thus if you follow what's there in Vim it should not be
too complicated.

-- 
To define recursion, we must first define recursion.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: Konsole: lost focus of window or tab

2007-01-17 Thread Mikolaj Machowski
Dnia środa 17 styczeń 2007, Matthew Woehlke napisał:
 Matthew Woehlke wrote:
  Mikolaj Machowski wrote:
  Is it possible to recognize if window or tab of Konsole lost focus
  through termcap/terminfo sequence?
 
  Or is it at least possible with dcop or any other way?
 
  I am investigating ways to support Vim FocusGain/FocusLost
  autoevents.
 
  [snip long answer]
  [...and short answer, too]

 Robert Knight says we should be able to add escape sequences to Konsole
 to support this. I might be able to help with the patching (although it
 is KDE4 that will really get the fix, anything for KDE3 does not seem
 likely to be accepted, so you would be patching your own local version),

I was waiting 2 years for Lists in VimL so I can wait several months for
KDE 4 ;)

 but someone Vim-side needs to tell us what Konsole needs to provide...

Looks like it should be similar communication like with mouse events.
Proper escape codes - I suppose there is no standard at the moment. If
Konsole would be first to do it there is chance that will become
standard.

 Does Vim already support notifications for some terminal emulators? If
 so, how do we go about adding Konsole to that list?

Comment in :ui.c:3010: says:

/*
 * Called when focus changed.  Used for the GUI or for systems where this 
can
 * be done in the console (Win32).
 */


m.



Re: Konsole: lost focus of window or tab

2007-01-17 Thread Mikolaj Machowski
Dnia środa 17 styczeń 2007, Matthew Woehlke napisał:

 I'm willing to (try to, at least) help get this working in 3.5.x if you
 can dig up what the needed escapes are (it sounds like there are already
 existing examples?)... it probably won't be accepted but you could use
 it locally, and of course submit it for porting to KDE4.

On kde-devel R. Knight said he can accept it to 3.5.7 release and later
maintain it for KDE 4.

Now, some start. I don't know much about term internals. I read
something yesterday and today so forgive me if I wrote something stupid.
Just seed for further discussion:

Base info according to man terminfo:

Variable String: focus_lost
Cap name:flo
TCapcode:fL
Description: terminal lost focus

Escape sequence: \E[1fl

Variable String: focus_gained
Cap name:fga
TCapcode:fG
Description: terminal gained focus

Escape sequence: \E[1fg

These sequences and names don't conflict with any other entry defined in
my /etc/termcap or /usr/share/terminfo/** .

m.



Re: Konsole: lost focus of window or tab

2007-01-17 Thread Bram Moolenaar

Mikolaj Machowski wrote:

 Dnia środa 17 styczeń 2007, Matthew Woehlke napisał:
 
  I'm willing to (try to, at least) help get this working in 3.5.x if you
  can dig up what the needed escapes are (it sounds like there are already
  existing examples?)... it probably won't be accepted but you could use
  it locally, and of course submit it for porting to KDE4.
 
 On kde-devel R. Knight said he can accept it to 3.5.7 release and later
 maintain it for KDE 4.
 
 Now, some start. I don't know much about term internals. I read
 something yesterday and today so forgive me if I wrote something stupid.
 Just seed for further discussion:
 
 Base info according to man terminfo:
 
 Variable String: focus_lost
 Cap name:flo
 TCapcode:fL
 Description: terminal lost focus
 
 Escape sequence: \E[1fl
 
 Variable String: focus_gained
 Cap name:fga
 TCapcode:fG
 Description: terminal gained focus
 
 Escape sequence: \E[1fg
 
 These sequences and names don't conflict with any other entry defined in
 my /etc/termcap or /usr/share/terminfo/** .

There are some rules about escape sequences, I think ending in fl or
fg is not good.  Try asking Thomas Dickey, he has a good overview of
the codes.

Note that we also need one to enable/disable getting these events.  A
program should only get the events when asked for.

-- 
hundred-and-one symptoms of being an internet addict:
38. You wake up at 3 a.m. to go to the bathroom and stop and check your e-mail
on the way back to bed.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


BOF Vim 8 - Suggestions

2007-01-17 Thread John Beckett

Sorry I'm late, but I just listened to the Vim BOF session that Bram
mentioned three months ago.

In the talk, Bram sounded quite evangelical with regard to promoting
Vim usage, and he asked for suggestions on how he should best spend
his limited time in working towards a new version (Vim 8).

I am posting this introductory message with my response, plus a
second message describing a feature I would like (EncryptLine).

The best way to expand Vim usage IMHO would be to work out better
default settings to improve the first hour of contact. In addition,
perform necessary fixups, but resist new features.

If I were starting Vim usage now, I would probably abandon it as
soon as I discovered that pressing PageUp did NOT reverse the effect
of PageDown. I still hate that! Vim has many wonderous features, but
I imagine that many people don't stay to find them because of
irritations like PgUp/PgDn.

Highlighting all matches when searching is excellent, but there
needs to be a way for a new user to turn it off. I map Space for
this, however, it would be better to press Escape to clear
highlights and message text (if Escape is pressed while in Normal
mode, remove search highlights and clear any message). Maybe also
have a way for this feature to be turned off.

I won't say more now. If Bram feels that improved defaults would be
worth investigating, a discussion here would probably be best.
OTOH people who dream in Vim script may not be the best source of
ideas on how Vim should be configured to win new converts.

John


BOF Vim 8 - EncryptLine

2007-01-17 Thread John Beckett

Suggested new feature:
Make an easy way to encrypt a secret within a line.
Then you can have a simple text file to document stuff, with
embedded secrets. On reading, you only need to enter a key if you
want to see a secret.

Example lines before encryption:

server12 { admin topsecret } any text
mybank { account 123456789 pin 1234 }

Example lines after encryption:

server12 {~8vP09fb3+Pn6+/z9/v8AAwocSE9cDYPAYJUThgE} any text
mybank {~afSDKoy9saGMCZ91x6F7pHkwdzEcMBoGCSqGSIb3DQEJ}

When viewing a file with encrypted secrets, it doesn't matter if
others are shoulder surfing. You only need to get rid of onlookers
for the short time it would take to enter a key and view a secret in
the message line (which would not change the file).

I implemented this scheme in an obsolete editor many years ago,
and offer the suggestion in case it appeals to Bram. However, as
noted in my Suggestions message, I think new features should be
resisted in favour of fixups, so I won't be offended if this is
ignored.

A more detailed description of the proposal follows.

A secret is entered between {  and } on a single line.
There is a space after the opening brace.

The encrypted result is stored as base64 text, with ~ inserted as
the first character. The space (plaintext) and tilde (ciphertext)
are safety checks so text is not encrypted or decrypted twice.

These commands would be required:

EnterKey - Prompt user to enter a key for encryption/decryption.
EncryptLine - Encrypt text inside braces on the current line.
DecryptLine - Reverse EncryptLine.
ShowSecret - Show decrypted secret in the message line.

EnterKey prompts the user and allows them to enter a key (no echo).
The key is hashed, and the hash is retained in memory for this
session. It can be cleared by using EnterKey to enter a blank key.
The hashed key is used for any subsequent encryption and decryption.

EncryptLine checks that the current line contains {  (with space),
followed by }. It then uses the hashed key to encrypt the text
between the braces, then replaces that text in the current line with
a base64 encoded form of the ciphertext.

EncryptLine inserts a tilde (~) after the first brace. This is a
safety mechanism so you won't accidentally encrypt a line twice.

EncryptLine inserts a small amount of random padding (salt). The
padding is of variable length so the length of the secret is not
known to intruders. However, there is only a small amount of padding
so the result is fairly compact.

ShowSecret decrypts the secret in the current line, and displays the
plaintext in the message line. The file is not changed. There should
be an easy way to put the plaintext in the clipboard, and an easy
way to blank the displayed secret.

DecryptLine reverses EncryptLine, changing the current line. It does
nothing (apart from display an error) if the result is not
reasonable (the ciphertext must be a tilde followed by base64, and
the decryption should satisfy certain sanity checks, and should
yield printable text starting with a space). This is a safety check
to avoid losing data if the wrong key is used to decrypt.

John


Re: BOF Vim 8 - EncryptLine

2007-01-17 Thread Robert Lee

John Beckett wrote:

Suggested new feature:
Make an easy way to encrypt a secret within a line.
Then you can have a simple text file to document stuff, with
embedded secrets. On reading, you only need to enter a key if you
want to see a secret.

Example lines before encryption:

server12 { admin topsecret } any text
mybank { account 123456789 pin 1234 }

Example lines after encryption:

server12 {~8vP09fb3+Pn6+/z9/v8AAwocSE9cDYPAYJUThgE} any text
mybank {~afSDKoy9saGMCZ91x6F7pHkwdzEcMBoGCSqGSIb3DQEJ}

When viewing a file with encrypted secrets, it doesn't matter if
others are shoulder surfing. You only need to get rid of onlookers
for the short time it would take to enter a key and view a secret in
the message line (which would not change the file).

I implemented this scheme in an obsolete editor many years ago,
and offer the suggestion in case it appeals to Bram. However, as
noted in my Suggestions message, I think new features should be
resisted in favour of fixups, so I won't be offended if this is
ignored.

A more detailed description of the proposal follows.

A secret is entered between {  and } on a single line.
There is a space after the opening brace.

The encrypted result is stored as base64 text, with ~ inserted as
the first character. The space (plaintext) and tilde (ciphertext)
are safety checks so text is not encrypted or decrypted twice.

These commands would be required:

EnterKey - Prompt user to enter a key for encryption/decryption.
EncryptLine - Encrypt text inside braces on the current line.
DecryptLine - Reverse EncryptLine.
ShowSecret - Show decrypted secret in the message line.

EnterKey prompts the user and allows them to enter a key (no echo).
The key is hashed, and the hash is retained in memory for this
session. It can be cleared by using EnterKey to enter a blank key.
The hashed key is used for any subsequent encryption and decryption.

EncryptLine checks that the current line contains {  (with space),
followed by }. It then uses the hashed key to encrypt the text
between the braces, then replaces that text in the current line with
a base64 encoded form of the ciphertext.

EncryptLine inserts a tilde (~) after the first brace. This is a
safety mechanism so you won't accidentally encrypt a line twice.

EncryptLine inserts a small amount of random padding (salt). The
padding is of variable length so the length of the secret is not
known to intruders. However, there is only a small amount of padding
so the result is fairly compact.

ShowSecret decrypts the secret in the current line, and displays the
plaintext in the message line. The file is not changed. There should
be an easy way to put the plaintext in the clipboard, and an easy
way to blank the displayed secret.

DecryptLine reverses EncryptLine, changing the current line. It does
nothing (apart from display an error) if the result is not
reasonable (the ciphertext must be a tilde followed by base64, and
the decryption should satisfy certain sanity checks, and should
yield printable text starting with a space). This is a safety check
to avoid losing data if the wrong key is used to decrypt.

John


John,

Since this requires the file to contain markup characters on the line, 
its usefulness is limited in source files where the tags { and } would 
cause a syntax error and cannot be marked as comments. As long as this 
limitation is acceptable, I think it might me equally as useful and 
perhaps more simple and intuitive if instead foldmarkers were used 
along with the fold commands (zc, zo):


Password fold exposed:
?php
 $admin_password = /*{{{*/ 'maryhadababyitsaboy' /*}}}*/ ;
?

Password fold closed:
?php
+--  1 line: $admin_password = * ; 
?

This has some advantages:

- Less work for the user to visibly protect screen content (no 
passwords, etc).

- Reuses existing keyboard sequences: zc, zo, zm, zr, zM, zR, etc...
- Only extends existing functionality (folding -- support for 
single-line folds would need to be added)
- Count of *'s is indicative of length of hidden area (user can add 
whitespace padding to obscure when desired)
- The obscuration character (*) could be configurable, perhaps as a 
multi-character seq, e.g. '**', to also help obscure length.
- Source code is still readable (e.g. the reader is still able to see 
that an assignment is occurring and on what variable)
- mkview will cause the fold state to be remembered, to be recalled 
later, perhaps automatically when the file is reopened.


This can already be done with traditional multi-line folds:

?php
 // {{{ $admin_password = '***';
 $admin_password = 'maryhadababyitsaboy';
 // }}}
?

to become:

?php
+-- 3 Lines: $admin_password = '***'; ---
?

Must my $0.02.

-Robert


Odp: BOF Vim 8 - Suggestions

2007-01-17 Thread Mikołaj Machowski

 I won't say more now. If Bram feels that improved defaults would be
 worth investigating, a discussion here would probably be best.
 OTOH people who dream in Vim script may not be the best source of
 ideas on how Vim should be configured to win new converts.

I suppose this apply for me also ;), but:

1. Persistence of search highlighting is IMO good thing.
2. Star behaviour of keys much depends on packager. If Vim starts in compatible 
mode there is nothing which can be done. In nocompatible mode everything works 
as newbie can expect. AFAIR on Win32 default Vim mode is nocompatible, on Linux 
distributions it depends on packager but I think apart from redhattish 
vim-minimal for admin purposes everywhere is nocompatible.

m.


Ania - Kilka historii na ten sam temat - trasa koncertowa:
Wrocław, Zielona Góra, Warszawa, Ełk, Lublin... Sprawdź:
Sprawdź:http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fbytom.htmlsid=993




Re: latin1 vs utf8

2007-01-17 Thread DervishD
Hi Bram :)

 * Bram Moolenaar [EMAIL PROTECTED] dixit:
   utf-8 is a superset of latin1, thus using utf-8 for 'encoding'
   should nearly always work.
  
  Except that then I have to encode my 'showbreak' option as utf8 and
  not latin1 :( I prefer to have it encoded as latin1 (as the rest of my
  files), until I switch to utf8.
 
 Yeah, there are small things like this.  You might want to put this in
 your .vimrc:
   scriptencoding latin1

It's already there but that doesn't fix the problem with
'showbreak'.
 
  If I change 'enc', I see 'á', correctly.
 
 You should do :edit ++enc=utf-8 filename or include utf-8 in
 'fileencodings' before editing the file.  Then it will work no matter
 what 'encoding' is set to.

But then my US-ASCII files (and new files) will be considered utf-8,
and I don't want that. Or do you mean that if I set (e.g.)
'fencs=ucs-bom,latin1,utf8' things will work even if utf8 is never tried
because latin1 always succeeds?
 
  What I don't understand is that if I set 'fencs' and let 'fenc' take
  the value from it, the translation is done correctly because vim
  converts the characters. Once the file is loaded, this doesn't happen
  and setting 'enc' by hand seems the only choice. Am I doing anything
  wrong?
 
 Yes.  'fenc' is set by Vim when it reads the file.  Setting it to
 another value doesn't cause the file to be reread or conversion to be
 done.

OK, now I understand, thanks : Any way of forcing a conversion?

Again, thanks a lot :)

Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!


Re: latin1 vs utf8

2007-01-17 Thread A.J.Mechelynck

DervishD wrote:

Hi Bram :)

 * Bram Moolenaar [EMAIL PROTECTED] dixit:

utf-8 is a superset of latin1, thus using utf-8 for 'encoding'
should nearly always work.

Except that then I have to encode my 'showbreak' option as utf8 and
not latin1 :( I prefer to have it encoded as latin1 (as the rest of my
files), until I switch to utf8.

Yeah, there are small things like this.  You might want to put this in
your .vimrc:
scriptencoding latin1


It's already there but that doesn't fix the problem with
'showbreak'.
 

If I change 'enc', I see 'á', correctly.

You should do :edit ++enc=utf-8 filename or include utf-8 in
'fileencodings' before editing the file.  Then it will work no matter
what 'encoding' is set to.


But then my US-ASCII files (and new files) will be considered utf-8,
and I don't want that. Or do you mean that if I set (e.g.)
'fencs=ucs-bom,latin1,utf8' things will work even if utf8 is never tried
because latin1 always succeeds?


In :set fencs=ucs-bom,latin1,utf8, UTF-8 is indeed never tried because 
Latin1 always succeeds. And that means *never*. IOW, that setting is logically 
equivalent to just :set fencs=ucs-bom,latin1. There is _nothing_ that Vim 
will do in one case and not in the other.


 

What I don't understand is that if I set 'fencs' and let 'fenc' take
the value from it, the translation is done correctly because vim
converts the characters. Once the file is loaded, this doesn't happen
and setting 'enc' by hand seems the only choice. Am I doing anything
wrong?

Yes.  'fenc' is set by Vim when it reads the file.  Setting it to
another value doesn't cause the file to be reread or conversion to be
done.


OK, now I understand, thanks : Any way of forcing a conversion?

Again, thanks a lot :)

Raúl Núñez de Arenas Coronado




Best regards,
Tony.


Re: latin1 vs utf8

2007-01-17 Thread DervishD
Hi Tony :)

 * A.J.Mechelynck [EMAIL PROTECTED] dixit:
 DervishD wrote:
 If I change 'enc', I see 'á', correctly.
 You should do :edit ++enc=utf-8 filename or include utf-8 in
 'fileencodings' before editing the file.  Then it will work no matter
 what 'encoding' is set to.
 
 But then my US-ASCII files (and new files) will be considered utf-8,
 and I don't want that. Or do you mean that if I set (e.g.)
 'fencs=ucs-bom,latin1,utf8' things will work even if utf8 is never tried
 because latin1 always succeeds?
 
 In :set fencs=ucs-bom,latin1,utf8, UTF-8 is indeed never tried because 
 Latin1 always succeeds. And that means *never*. IOW, that setting is 
 logically equivalent to just :set fencs=ucs-bom,latin1. There is 
 _nothing_ that Vim will do in one case and not in the other.

So, and if I understand everything correctly, if my locale is
latin1, my terminal is latin1 (that is, enc=latin1 and tenc=latin1) and
I want to edit/view utf8 files *and* I don't want new files or US-ASCII
files to be considered utf8, my best bet is to use BufReadPre to
detect utf8 files using file -i or something similar, thus forcing the
conversion, am I wrong?

I assume that when BufReadPos is invoked, any conversion has
already been carried, am I wrong?

Well, all of the above is easy to test, so if I can afford the time
later, I'll do and post here my results.

Thanks, Tony :)

Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!


Re: latin1 vs utf8

2007-01-17 Thread A.J.Mechelynck

DervishD wrote:
[...]

So, and if I understand everything correctly, if my locale is
latin1, my terminal is latin1 (that is, enc=latin1 and tenc=latin1) and
I want to edit/view utf8 files *and* I don't want new files or US-ASCII
files to be considered utf8, my best bet is to use BufReadPre to
detect utf8 files using file -i or something similar, thus forcing the
conversion, am I wrong?


I'm not sure: what happens if your UTF-8 file contains some character (such as 
the Euro sign) which has no representation in Latin1?




I assume that when BufReadPos is invoked, any conversion has
already been carried, am I wrong?


IIUC, you aren't.



Well, all of the above is easy to test, so if I can afford the time
later, I'll do and post here my results.

Thanks, Tony :)

Raúl Núñez de Arenas Coronado



Best regards,
Tony.


Reformatting text after setting tw

2007-01-17 Thread Stavros Tsolakos

Hi all.

I am editing a text file with vim7. I set tw=80 and it works for any 
text I write AFTER setting it. But how could I force vim reformat my 
whole text file so that all lines obey to the new textwidth?


Perhaps it is a dumb question, but I still haven't found a way to do it.

Thanks a lot!

Stavros




Re: Reformatting text after setting tw

2007-01-17 Thread Erlend Hamberg
On Wednesday 17 January 2007 13:37, Stavros Tsolakos wrote:
 I am editing a text file with vim7. I set tw=80 and it works for any
 text I write AFTER setting it. But how could I force vim reformat my
 whole text file so that all lines obey to the new textwidth?

:help gq

-- 
Erlend Hamberg
[EMAIL PROTECTED]


Re: latin1 vs utf8

2007-01-17 Thread DervishD
Hi all, and sorry for self-replying...

 * DervishD [EMAIL PROTECTED] dixit:
  I want to edit/view utf8 files *and* I don't want new files or
  US-ASCII files to be considered utf8, my best bet is to use
  BufReadPre to detect utf8 files using file -i or something
  similar, thus forcing the conversion, am I wrong?

I've done the following autocommand to perform the detection:

autocmd BufReadPre *
\ if system(file -i  . expand(amatch)) =~ utf8 |
\   setlocal fenc=utf8 |
\ endif

I'm sure that it could be much more simpler and powerful, but I'm a
newbie programming in VimL, so... It works for me, at least, but any
suggestion is welcome.

Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!


Re: Reformatting text after setting tw

2007-01-17 Thread DervishD
Hi Stavros :)

 * Stavros Tsolakos [EMAIL PROTECTED] dixit:
 I am editing a text file with vim7. I set tw=80 and it works for any 
 text I write AFTER setting it. But how could I force vim reformat my 
 whole text file so that all lines obey to the new textwidth?

There is probably a better way, but I would do:

gggqG

This means:
ggGo to beginning of file
gqFormat the following (well, really is format the text
specified by {motion})
G Go to end of file

If I recall correctly, gq doesn't work with ranges, only with
motions.

 Perhaps it is a dumb question, but I still haven't found a way to do it.

Take a look at :help gq and :help navigation.

Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!


Re: Reformatting text after setting tw

2007-01-17 Thread marc
Stavros Tsolakos said...
 Hi all.
 
 I am editing a text file with vim7. I set tw=80 and it works for any 
 text I write AFTER setting it. But how could I force vim reformat my 
 whole text file so that all lines obey to the new textwidth?

I use

  map   F8  gqap

to format paragraphs. See

:h gqap

for more ideas.

-- 
Cheers,
Marc



Re: vim 7.0, Edit with Vim, and x64 WinXP

2007-01-17 Thread Phil Edwards

On 1/17/07, George V. Reilly [EMAIL PROTECTED] wrote:

Phil Edwards wrote:
 7.0 is running fine on all my other systems, it's only this 64-bit XP
 box that doesn't see the new menu entries.  I can't even get an Edit
 with... entry to appear; that seems to be gone or restricted or moved
 or.

Try saving the following to vim.reg and executing that:


REGEDIT4

[HKEY_CLASSES_ROOT\*\Shell\Open with Vim\command]
@=\c:\\Program Files\\Vim\\vim70\\gvim.exe\ \%1\




On 1/17/07, jk [EMAIL PROTECTED] wrote:

Put a shortcut key to send to...!



Thank you both for your replies.

As it happens, neither of those helps, because the shell extension is
not being used at all.  After some more research, I've found that
32-bit shell extensions are not loaded into the 64-bit Windows
Explorer, regardless of registry entries (like the first suggestion).
I would not be happy using the proposed workaround in the second
suggestion, but since the entries will not appear *anywhere* in the
context menu -- it's all or nothing -- it won't matter.  :-)

I found after I sent my message that it's not just a Vim thing,
either; any 32-bit shell extension will not be used.  Programs like
WinRAR or Winzip have the same problems.  The real solution is to
build a 64-bit shell extension, but that's going to be beyond the
casual user.

The most common workaround, it turns out, is to run a copy of the
windows explorer in a 32-bit mode, e.g., a desktop shortcut pointing
to C:\windows\syswow64\explorer.exe /separate.  (What does syswow
mean?  Don't ask, I have no idea.)  The /separate runs the file
manager in its own 32-bit process space, and suddenly all the shell
extensions are working.

This has drawbacks; the 32-bit explorer has its own view of the world
that isn't necessarily related to what the rest of the computer is
thinking.  What's more, any software that *has* installed 64-bit shell
extensions will not show up in this copy.


Re: latin1 vs utf8

2007-01-17 Thread A.J.Mechelynck

DervishD wrote:
[...]

\ if system(file -i  . expand(amatch)) =~ utf8 |

[...]

On my system, file -i ~/pub/index.htm (for a file in UTF-8) answers

/root/pub/index.htm: text/x-c; charset=utf-8

Notice the dash between utf and 8.


Best regards,
Tony.


Re: Reformatting text after setting tw

2007-01-17 Thread Tim Chase
I am editing a text file with vim7. I set tw=80 and it works for any 
text I write AFTER setting it. But how could I force vim reformat my 
whole text file so that all lines obey to the new textwidth?


Perhaps it is a dumb question, but I still haven't found a way to do it.



In addition to the suggestions for using gqap or gggqG which 
are common ways to do this, if your document came from a source 
where a newline separated actual paragraphs, you can use either


:g/^/norm gqq

or

:%s/$/\r

to double-space it and then use the gggqG formula to reformat 
the whole doc.


Take note that if you have code blocks in your document, they'll 
get oddly reformatted as running text, which is likely not what 
you want.  There are additional ways of performing paragraph 
reformatting over particular blocks...I wrote some stuff that 
Thomas Adam included in an issue of the Linux Gazette that did 
such craziness:


http://linuxgazette.net/108/tag/1.html

where you want your action to be norm gqq or norm gqip.

HTH,

-tim




Re: latin1 vs utf8

2007-01-17 Thread A.J.Mechelynck

DervishD wrote:

Hi Tony :)

 * A.J.Mechelynck [EMAIL PROTECTED] dixit:

DervishD wrote:
[...]

   \ if system(file -i  . expand(amatch)) =~ utf8 |

[...]

On my system, file -i ~/pub/index.htm (for a file in UTF-8) answers

/root/pub/index.htm: text/x-c; charset=utf-8

Notice the dash between utf and 8.


My bad, I typed carelessly. It succeeded on my system because I did
my first test with a file *named* 'utf8'. I've noticed the problem a
moment ago, and it's already fixed.

Thanks a lot for pointing!.

Raúl Núñez de Arenas Coronado



Hoho... Then maybe you should use file -bi rather than file -i in order to 
avoid detecting UTF-8 for:


/home/raul/utf-8_to_latin.txt: text/plain; charset=ISO-8859-1


Best regards,
Tony.


Re: latin1 vs utf8

2007-01-17 Thread DervishD
Hi Tony :)

 * A.J.Mechelynck [EMAIL PROTECTED] dixit:
 Notice the dash between utf and 8.
 
 My bad, I typed carelessly. It succeeded on my system because I did
 my first test with a file *named* 'utf8'. I've noticed the problem a
 moment ago, and it's already fixed.
 
 Hoho... Then maybe you should use file -bi rather than file -i in order to 
 avoid detecting UTF-8 for:
 
 /home/raul/utf-8_to_latin.txt: text/plain; charset=ISO-8859-1

I've done that and more: 

if system(file -bi  . expand(amatch)) =~# ; charset=utf-8$ 

I was too lazy to ellaborate the regex correctly. It is still
unellaborated, but works better.

Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!


Re: latin1 vs utf8

2007-01-17 Thread A.J.Mechelynck

DervishD wrote:

Hi Tony :)

 * A.J.Mechelynck [EMAIL PROTECTED] dixit:

Notice the dash between utf and 8.

   My bad, I typed carelessly. It succeeded on my system because I did
my first test with a file *named* 'utf8'. I've noticed the problem a
moment ago, and it's already fixed.
Hoho... Then maybe you should use file -bi rather than file -i in order to 
avoid detecting UTF-8 for:


/home/raul/utf-8_to_latin.txt: text/plain; charset=ISO-8859-1


I've done that and more: 

if system(file -bi  . expand(amatch)) =~# ; charset=utf-8$ 


I was too lazy to ellaborate the regex correctly. It is still
unellaborated, but works better.

Raúl Núñez de Arenas Coronado



regexp matches with matching case, ; charset=utf-8 at end of string. 
Redundant with -b but ought to work, unless a text file can have something 
after the charset, which I haven't seen yet in the experiments I've done.


One thing I just noticed: shell scripts (which are text) get 
application/x-shellscript and no charset, at least on my system; IMHO that's 
a bug in the file program.



Best regards,
Tony.


Re: vim 7.0, Edit with Vim, and x64 WinXP

2007-01-17 Thread [EMAIL PROTECTED]
Phil Edwards wrote:
 As it happens, neither of those helps, because the shell extension 
is
 not being used at all.  After some more research, I've found that
 32-bit shell extensions are not loaded into the 64-bit Windows
 Explorer, regardless of registry entries (like the first 
suggestion).
 I would not be happy using the proposed workaround in the second
 suggestion, but since the entries will not appear *anywhere* in the
 context menu -- it's all or nothing -- it won't matter.  :-)

It sounds like you are running x86 (Win32) binaries on Win64.
You can find native Win64 binaries at http://www.georgevreilly.
com/vim/

/George



Re: latin1 vs utf8

2007-01-17 Thread DervishD
Hi Tony :)

 * A.J.Mechelynck [EMAIL PROTECTED] dixit:
 DervishD wrote:
  * A.J.Mechelynck [EMAIL PROTECTED] dixit:
 Notice the dash between utf and 8.
My bad, I typed carelessly. It succeeded on my system because I did
 my first test with a file *named* 'utf8'. I've noticed the problem a
 moment ago, and it's already fixed.
 Hoho... Then maybe you should use file -bi rather than file -i in order 
 to avoid detecting UTF-8 for:
 
 /home/raul/utf-8_to_latin.txt: text/plain; charset=ISO-8859-1
 
 I've done that and more: 
 
 if system(file -bi  . expand(amatch)) =~# ; charset=utf-8$ 
 
 I was too lazy to ellaborate the regex correctly. It is still
 unellaborated, but works better.
 
 regexp matches with matching case, ; charset=utf-8 at end of string. 
 Redundant with -b but ought to work, unless a text file can have something 
 after the charset, which I haven't seen yet in the experiments I've done.

Well, in fact using the output from file -i is not a good idea,
but finding the charset of a file is not easy anyway, so the redundance
doesn't worry me. In fact I prefer that redundance, just in case I
change file -bi for anything else in the future (thing that I plan to
do, by the way).

The problem is that the conversion in vim is done before charset can
be set by hand :(, otherwise, a simple :setlocal fenc=utf8 will do. A
human is the perfect tool to discriminate between charsets :D

 One thing I just noticed: shell scripts (which are text) get 
 application/x-shellscript and no charset, at least on my system; IMHO 
 that's a bug in the file program.

I don't know if it is a bug or not, but IMHO it is because the
output has a different structure from one mimetype to other. It should
always output the charset or never, but not only for text. I don't know
if any standard mandates that charset is only meaningful for
text/plain, but...

If tomorrow morning I have some spare time I'll try to get a better
solution, preferably using VimL only.

Thanks for your help :)

Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!


install custom python module?

2007-01-17 Thread Tom Whittock

Hi.

I would like to install an external python module (ctypes) into vim
+python, so I can use that modules functionality from my script, but
am unsure as to how to do that. Is this a reasonable thing to want to
do? Is it possible? There doesn't seem to be a python_path equivalent
that I can see...

Any help appreciated,
Cheers,
Tom.


Re: latin1 vs utf8

2007-01-17 Thread Bram Moolenaar

DervishD wrote:

 Hi all, and sorry for self-replying...
 
  * DervishD [EMAIL PROTECTED] dixit:
   I want to edit/view utf8 files *and* I don't want new files or
   US-ASCII files to be considered utf8, my best bet is to use
   BufReadPre to detect utf8 files using file -i or something
   similar, thus forcing the conversion, am I wrong?
 
 I've done the following autocommand to perform the detection:
 
 autocmd BufReadPre *
 \ if system(file -i  . expand(amatch)) =~ utf8 |
 \   setlocal fenc=utf8 |
 \ endif
 
 I'm sure that it could be much more simpler and powerful, but I'm a
 newbie programming in VimL, so... It works for me, at least, but any
 suggestion is welcome.

Did you set 'fileencodings' to an empty string?  Otherwise this would
not work.

-- 
My sister Cecilia opened a computer store in Hawaii.
She sells C shells by the seashore.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Spam in Tips in Vim's website

2007-01-17 Thread DervishD
Hi all :)

I've noticed that there are still spam in the Tips comments at the
vim website. Bram, do you need help with that? If you want, I can take a
look at the comments and delete any spam I catch. I don't know how much
spare time I'll have, but even with ~1500 tips, it shouldn't take more
than a week or so.

I've read your post in the Vim page saying that with the help of
moderators, the spam had been eliminated, so probably the spam I've seen
today is new. That's bad :(((

Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!


Re: latin1 vs utf8

2007-01-17 Thread DervishD
Hi Bram :)

 * Bram Moolenaar [EMAIL PROTECTED] dixit:
 DervishD wrote:
  I've done the following autocommand to perform the detection:
  
  autocmd BufReadPre *
  \ if system(file -i  . expand(amatch)) =~ utf8 |
  \   setlocal fenc=utf8 |
  \ endif
  
  I'm sure that it could be much more simpler and powerful, but I'm a
  newbie programming in VimL, so... It works for me, at least, but any
  suggestion is welcome.
 
 Did you set 'fileencodings' to an empty string?  Otherwise this would
 not work.

Apart from fixing the above (including the last version I posted
here, which has a catch, yes, I have fileencodings set to an empty
string. Why this wouldn't work if 'fencs' is not an empty string? Is
because 'fenc' will get a value *after* the autocommand is invoked?.

Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!


RE: Spam in Tips in Vim's website

2007-01-17 Thread Halim, Salman
While I'm not in a position to determine who gets to moderate tips, I would 
like to request that if anybody sees spam while looking through a tip and 
decides to mention it, please include the tip number(s) so a moderator can go 
in and address the issue.

Thank you,

Salman. 

 -Original Message-
 From: DervishD [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, January 17, 2007 2:47 PM
 To: vim
 Subject: Spam in Tips in Vim's website
 
 Hi all :)
 
 I've noticed that there are still spam in the Tips 
 comments at the vim website. Bram, do you need help with 
 that? If you want, I can take a look at the comments and 
 delete any spam I catch. I don't know how much spare time 
 I'll have, but even with ~1500 tips, it shouldn't take more 
 than a week or so.
 
 I've read your post in the Vim page saying that with the 
 help of moderators, the spam had been eliminated, so probably 
 the spam I've seen today is new. That's bad :(((
 
 Raúl Núñez de Arenas Coronado
 
 --
 Linux Registered User 88736 | http://www.dervishd.net It's my 
 PC and I'll cry if I want to... RAmen!
 


Re: Spam in Tips in Vim's website

2007-01-17 Thread Kim Schulz
On Wed, 17 Jan 2007 20:46:30 +0100
DervishD [EMAIL PROTECTED] wrote:

 Hi all :)
 
 I've noticed that there are still spam in the Tips comments at the
 vim website. Bram, do you need help with that? If you want, I can
 take a look at the comments and delete any spam I catch. I don't know
 how much spare time I'll have, but even with ~1500 tips, it shouldn't
 take more than a week or so.
 
 I've read your post in the Vim page saying that with the help of
 moderators, the spam had been eliminated, so probably the spam I've
 seen today is new. That's bad :(((
 
 Raúl Núñez de Arenas Coronado
 

having RSS feeds of the tips being added makes it easy to catch the
spam just after it has been added without having to go to the homepage
all the time. 

-- 
Kim Schulz| Private :  http://www.schulz.dk
[EMAIL PROTECTED] | Business:  http://www.devteam.dk
+45 5190 4262 | Sparetime: http://www.fundanemt.com


Re: Spam in Tips in Vim's website

2007-01-17 Thread Bram Moolenaar

DervishD wrote:

 I've noticed that there are still spam in the Tips comments at the
 vim website. Bram, do you need help with that? If you want, I can take a
 look at the comments and delete any spam I catch. I don't know how much
 spare time I'll have, but even with ~1500 tips, it shouldn't take more
 than a week or so.
 
 I've read your post in the Vim page saying that with the help of
 moderators, the spam had been eliminated, so probably the spam I've seen
 today is new. That's bad :(((

Well, the most obvious spam has been deleted, but it takes time to check
all the tips.  We have a group of moderators working on it.  If you want
to be a moderator let me know your www.vim.org login.

-- 
hundred-and-one symptoms of being an internet addict:
37. You start looking for hot HTML addresses in public restrooms.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: Spam in Tips in Vim's website

2007-01-17 Thread DervishD
Hi Bram :)

 * Bram Moolenaar [EMAIL PROTECTED] dixit:
 DervishD wrote:
 
  I've noticed that there are still spam in the Tips comments at the
  vim website. Bram, do you need help with that? If you want, I can take a
  look at the comments and delete any spam I catch. I don't know how much
  spare time I'll have, but even with ~1500 tips, it shouldn't take more
  than a week or so.
  
  I've read your post in the Vim page saying that with the help of
  moderators, the spam had been eliminated, so probably the spam I've seen
  today is new. That's bad :(((
 
 Well, the most obvious spam has been deleted, but it takes time to check
 all the tips.  We have a group of moderators working on it.  If you want
 to be a moderator let me know your www.vim.org login.

I think I'll follow the advices from Salman Halim and Kim Schulz and
I'll subscribe to vim tips using the RSS feed and will report the number
of the affected tips. If things get worse and the feed works for me (by
now I'm using Google Reader), I'll happily join vim.org as moderator to
delete the spam.

Thanks a lot :)

Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!


Re: Spam in Tips in Vim's website

2007-01-17 Thread DervishD
Hi Salman :)

 * Halim, Salman [EMAIL PROTECTED] dixit:
 While I'm not in a position to determine who gets to moderate tips, I
 would like to request that if anybody sees spam while looking through
 a tip and decides to mention it, please include the tip number(s) so a
 moderator can go in and address the issue.

I'll follow your advice and will subscribe to the RSS feed. This way
I'll get a list with any new spam that appears in the tips section.

Thanks :)

Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!


Re: Spam in Tips in Vim's website

2007-01-17 Thread DervishD
Hi Kim :)

 * Kim Schulz [EMAIL PROTECTED] dixit:
 On Wed, 17 Jan 2007 20:46:30 +0100
 DervishD [EMAIL PROTECTED] wrote:
  I've noticed that there are still spam in the Tips comments at the
  vim website. Bram, do you need help with that? If you want, I can
  take a look at the comments and delete any spam I catch. I don't know
  how much spare time I'll have, but even with ~1500 tips, it shouldn't
  take more than a week or so.
 
 having RSS feeds of the tips being added makes it easy to catch the
 spam just after it has been added without having to go to the homepage
 all the time. 
 
I've subscribed and I've already picked some of the spam.
Unfortunately, this only solves tips that *are* spam, not spam in
comments (at least I can't catch that from reader without looking at
every tip).

Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!


Tips which are spam

2007-01-17 Thread DervishD
Hi all :))

So far I've picked:

1473,1471,1461,1460,1459,1457,1452. At least some of them have been
already deleted.

About the spam in tips' comments, that's another issue.

Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!


Re: Tips which are spam--clean up author/summary

2007-01-17 Thread Russell Bateman
While (someone) is at it, tip #1472's author and summary need to be 
adjusted. Similarly, #1456's author field.





RE: Tips which are spam--clean up author/summary

2007-01-17 Thread Halim, Salman
Moderators can only mark tips and/or comments as spam.  We can't make
any other changes. 

 -Original Message-
 From: Russell Bateman [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, January 17, 2007 4:09 PM
 To: vim
 Subject: Re: Tips which are spam--clean up author/summary
 
 While (someone) is at it, tip #1472's author and summary need 
 to be adjusted. Similarly, #1456's author field.
 
 
 


Re: install custom python module?

2007-01-17 Thread Aaron Griffin

On 1/17/07, Tom Whittock [EMAIL PROTECTED] wrote:

I would like to install an external python module (ctypes) into vim
+python, so I can use that modules functionality from my script, but
am unsure as to how to do that. Is this a reasonable thing to want to
do? Is it possible? There doesn't seem to be a python_path equivalent
that I can see...


vim +python runs a typical python session - anything that the python
REPL sees, vim +python will too.

FTR though, sys.path contains the paths python searches.

:python import sys
:python print sys.path


RE: Spam in Tips in Vim's website

2007-01-17 Thread Halim, Salman
 I've subscribed and I've already picked some of the spam.
 Unfortunately, this only solves tips that *are* spam, not 
 spam in comments (at least I can't catch that from reader 
 without looking at every tip).
 
 Raúl Núñez de Arenas Coronado

Spam in comments can also be addressed by moderators as of fairly recently.  
When you come across such a comment, you can mark the comment as spam, leaving 
the rest of the tip and comments alone.  While you are correct that you may not 
be able to catch them all, they're only a problem if someone stumbles across 
them -- in which case, they need only mention it and any moderator (yes, I 
speak for you, too!) will happily remove it.

There is a page (http://vim.sourceforge.net/tips/recent_notes.php) that lists 
the most recently added tip notes.  The nice thing about it is that you can 
mark notes as spam right from here.

Salman.


Tips which have spam contained in their comments/notes:

2007-01-17 Thread Charles E Campbell Jr

Hello!

FYI -- this is a list of my tips that still have link spam added as 
comments/notes:


   126
   139
   147
   150
   152
   167
   200
   411
   573
   588
   607
   622
   744
   862
   895

I'm sure that they're not the only ones.

Regards,
Chip Campbell



Re: vim.sf.net and subscribing to comments/scripts on Google's front page

2007-01-17 Thread Gary Johnson
On 2007-01-17, Denis Perelyubskiy [EMAIL PROTECTED] wrote:
 hello,
 
 does anyone subscribe to comments/tips from vim.sf.net on Google's home
 page? Every time I try, I get very weird comments:
 
 e.g.:
 
 Tip #1473 - pics of amateur videos nude
 Tip #1472 - VIMRC
 Tip #1471 - spanish shemale sex homemade
 
 Basically, I think even the spammed tips get published to the RSS. I
 don't know if there is a way to refresh RSS when the comments are
 removed, but it sure would be nice to get that!

Slightly OT, but are you subscribed to the scripts as well as the 
tips?  If so, does the scripts feed work for you?  It hasn't for me 
since the scripts server had problems a month or so ago.

Regards,
Gary

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


Re: Tips which have spam contained in their comments/notes:

2007-01-17 Thread Yongwei Wu

On 1/18/07, Charles E Campbell Jr [EMAIL PROTECTED] wrote:

Hello!

FYI -- this is a list of my tips that still have link spam added as
comments/notes:

126
139
147
150
152
167
200
411
573
588
607
622
744
862
895

I'm sure that they're not the only ones.

Regards,
Chip Campbell


It is really annoying. In the worst case, there are 12 spam notes in a
tip! I needed to click and wait for quite a while because of the
Internet problem caused by the Taiwan earthquake.

At least the spam notes in these tips are eradicated now.

--
Wu Yongwei
URL: http://wyw.dcweb.cn/


Re: latin1 vs utf8

2007-01-17 Thread Yongwei Wu

On 1/18/07, DervishD [EMAIL PROTECTED] wrote:

Hi Bram :)

 * Bram Moolenaar [EMAIL PROTECTED] dixit:
 DervishD wrote:
  I've done the following autocommand to perform the detection:
 
  autocmd BufReadPre *
  \ if system(file -i  . expand(amatch)) =~ utf8 |
  \   setlocal fenc=utf8 |
  \ endif
 
  I'm sure that it could be much more simpler and powerful, but I'm a
  newbie programming in VimL, so... It works for me, at least, but any
  suggestion is welcome.

 Did you set 'fileencodings' to an empty string?  Otherwise this would
 not work.

Apart from fixing the above (including the last version I posted
here, which has a catch, yes, I have fileencodings set to an empty
string. Why this wouldn't work if 'fencs' is not an empty string? Is
because 'fenc' will get a value *after* the autocommand is invoked?.


'Fileencodings' is the option to detect the file encoding, and
'fileencoding' is the option to set/reflect the encoding of the
current file.

In my _vimrc, I have settings like:

 function! SetFileEncodings(encodings)
   let b:my_fileencodings_bak=fileencodings
   let fileencodings=a:encodings
 endfunction

 function! RestoreFileEncodings()
   let fileencodings=b:my_fileencodings_bak
   unlet b:my_fileencodings_bak
 endfunction

 au BufReadPre  *.gb   call SetFileEncodings('cp936')
 au BufReadPre  *.big5 call SetFileEncodings('cp950')
 au BufReadPre  *.nfo  call SetFileEncodings('cp437')
 au BufReadPost *.gb,*.big5,*.nfo  call RestoreFileEncodings()

You may use a similar way.

Best regards,

Yongwei
--
Wu Yongwei
URL: http://wyw.dcweb.cn/


Administrator never hears the beep

2007-01-17 Thread Spencer Lu
I'm running Vim 6.4 on Windows 2000.  When I'm using GVim as a normal 
user, I can hear the beeping noises (for example, if I'm on the last 
line and then press 'j').  However, when I'm logged in as Administrator, 
I never hear any beeping noises.


I made a few changes to my _vimrc file, but the file is shared by all 
users, and none of the changes have to do with the beep, so I don't know 
why Administrator can't hear the beep.


Anyone know what's going on?  Thanks.


Re: Administrator never hears the beep

2007-01-17 Thread panshizhu
Spencer Lu [EMAIL PROTECTED] 写于 2007-01-18 13:45:29:
 I'm running Vim 6.4 on Windows 2000.  When I'm using GVim as a normal
 user, I can hear the beeping noises (for example, if I'm on the last
 line and then press 'j').  However, when I'm logged in as Administrator,
 I never hear any beeping noises.

 I made a few changes to my _vimrc file, but the file is shared by all
 users, and none of the changes have to do with the beep, so I don't know
 why Administrator can't hear the beep.

 Anyone know what's going on?  Thanks.

Beeps are controled by t_ settings, those settings may be reset *after*
.vimrc.

So you should set those in .gvimrc again.

Check if there's a .gvimrc for Administrator?

HTH.
--
Sincerely, Pan, Shi Zhu. ext: 2606

Re: Administrator never hears the beep

2007-01-17 Thread Spencer Lu
[EMAIL PROTECTED] wrote:
 Beeps are controled by t_ settings, those settings may be reset *after*
 .vimrc.
 
 So you should set those in .gvimrc again.
 
 Check if there's a .gvimrc for Administrator?

Neither the normal user nor Administrator have a gvimrc file.