Re: BOF Vim 8 - Suggestions

2007-01-21 Thread John Beckett

A.J.Mechelynck wrote:
IMHO it is important that function keys (with the exception of F1 = :help) 
should by default _not_ have preset functions in Vim, in order that they 
be safely available for whatever mappings any user would want to assign to 
them, without competing with existing functions. There aren't so many keys 
that users can safely use as the {lhs} of a mapping with no fear that it 
will collide with an existing function.


For the record, I don't want function keys to be mapped by default. I am
suggesting that there should be a really simple (preferably built-in) way to
invoke a sample set of mappings for a C programmer.

For example, I could then send someone an email telling them to download
Vim and enter command :set template=cprogram (or whatever). I could
then advise the new user (a C programmer, not a dummy) that they can do
(whatever) to grep stuff, and (whatever) to use ctags. You would then have
one more converted Vim user!

As a final comment, I would recommend that any such template should
include mappings:
- Clear search highlights and the message line.
- Search for highlighted text.

John



Re: BOF Vim 8 - Suggestions

2007-01-21 Thread SM Smithfield

Hi group,

I would like to be able to specify that the fragment of text in a
folded line be colored as it would normally appear (i.e. in it's
unfolded state).

This would make folding much more useful to me. This would
facilitate reading the contents of a properly folded file at a
glance, and permit demure colors for the rest of the fold to keep
it out of the way.

Beyond that I would like to be able to have be able to specify the
length of the text fragment.

Beyond that I would like to see the format of the folded line
exposed in a fashion similar to the status line.



Mark.



Re: [BUG] Conversion error on write when 'autowriteall' is set causes infinite recursion

2007-01-21 Thread Bram Moolenaar

Nikolai Weibull wrote:

 Test case:
 
 vim -c 'e ++enc=latin1 a.test | exec normal! i\C-Vu2026 | set
 autowriteall | q'

And make sure 'encoding' is utf-8.  Yes, I can reproduce it.  One more
item for the todo list...

-- 
hundred-and-one symptoms of being an internet addict:
39. You move into a new house and decide to Netscape before you landscape.

 /// 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: BOF Vim 8 - EncryptLine

2007-01-21 Thread Marc Weber
On Thu, Jan 18, 2007 at 02:15:36PM +1100, 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.

I don't think this should be a general vim feature either.
Yet another idea to solve this:
Why not use syntax and set forgground/background color to the same value
to hide the text? Then you don't even notice that there is text.

eg 

hidden
Password:$ - end of line
revealed
Password: my secret pwd  $ - end of line

you can use regexp to match secrets this way.

Marc


Re: BOF Vim 8 - Suggestions

2007-01-21 Thread Martin Stubenschrott
On Sun, Jan 21, 2007 at 10:55:44PM +0100, Nikolai Weibull wrote:
 On 1/21/07, Marc Weber [EMAIL PROTECTED] wrote:
 
 My comments on nohl:
 nnoremap esc :nohl bar echo cr
 should clear message line and remove highlighting
 
 nnoremap Esc Esc:silent! nohighlightCR

Whenever I put any of these 2 commands in my .vimrc, vim beeps on
startup, and when I press 'k' it deletes the current and above line.

--
Martin


Re: BOF Vim 8 - Suggestions

2007-01-21 Thread Nikolai Weibull

On 1/21/07, Nikolai Weibull [EMAIL PROTECTED] wrote:

On 1/21/07, Marc Weber [EMAIL PROTECTED] wrote:

 My comments on nohl:
 nnoremap esc :nohl bar echo cr
 should clear message line and remove highlighting

nnoremap Esc Esc:silent! nohighlightCR


Hm, sorry, my bad, the 'echo CR' is what one wants.

 nikolai


Re: BOF Vim 8 - EncryptLine

2007-01-21 Thread John Beckett

Marc Weber wrote:

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.


I don't think this should be a general vim feature either.
Yet another idea to solve this:
Why not use syntax and set forgground/background color to the same value
to hide the text? Then you don't even notice that there is text.


OK - I'm convinced that EncryptLine is not wanted!

However, I want the secret to really be encrypted because I use
a system to copy my data files from machine to machine for
backups. The encryption is to protect the secret if someone
somehow gets access to the file.

John



Re: BOF Vim 8 - EncryptLine

2007-01-21 Thread Robert Lee

John Beckett wrote:

Marc Weber wrote:

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.


I don't think this should be a general vim feature either.
Yet another idea to solve this:
Why not use syntax and set forgground/background color to the same value
to hide the text? Then you don't even notice that there is text.


OK - I'm convinced that EncryptLine is not wanted!

However, I want the secret to really be encrypted because I use
a system to copy my data files from machine to machine for
backups. The encryption is to protect the secret if someone
somehow gets access to the file.

John


What is wrong with SCP/SFTP? If these are not available, externally 
encrypt the file. You can even make a vim macro to do the job IIRC.


Text editors don't do encryption and never should.

-Robert