Picon

Re: [Feature Request]: &metasendsescape

Bram Moolenaar wrote:

>It works for me:
>
>	:map <M-a> lll
>
>Pressing Alt-a has the effect of "lll".
>
>Make sure 'encoding' is set to "utf-8" before the mappings are defined,
>otherwise it might not work.  Changing 'encoding' while Vim is running
>has many side effects.  Best is to set it as early as possible and leave
>it alone.
>  
>
Ok, I'll gladly take your word for it, even though I couldn't make it 
work here.

One issue bugs me: as much as it is easy to get your terminal to behave
the right way when you're using xterm, standard terminals like the
linux console and gnome-terminal default to sending an ESC prefix, and
there appears to be no easy (at least findable) way to change that! Just 
ima-
gine how many console/gnome-terminal users have been bugged by the
fact their <M-c> maps don't work. I had to write an ioctl() C snippet to
change that in the console, but I can't find any way to do it with gnome-
terminal, as much as I suspect there might be an obscure control sequence.
This is a problem which, in my point of view, should be considered with
attention, and mentioned with care in the docs.

Best,
(Continue reading)

Jens Paulus | 1 Dec 08:42 2004
Picon

Re: Setting of visual mode marks for put text

Hi Bram,

On Tue, Nov 30, 2004 at 11:39:39 +0100, Bram Moolenaar wrote:
> > when selecting text with visual mode and then deleting it and putting it
> > to some other location I suggest that the < and > marks will then be set
> > to mark the region of this put text. Then if the user continues editing
> > the text file and later presses gv he or she can operate on that text
> > again. Currently the < and > marks both mark the first line after the
> > deleted text and I think this does not make much sense and the gv
> > command is useless then. Of course, these marks should not be set with
> > each putting of text but only when putting text that was deleted using
> > visual mode.
> 
> The text you put back doesn't know it came from a Visual selected area.
> The delete and put operations are independent.  Any sequence of commands
> may appear in between the two operations.
> 
> It's true that the '< and '> marks are not very useful after deleting
> the Visual area, since the text is gone.  That's just how it is.  The
> deleted text is now in a register, thus you can use that.

well I was just thinking there could be a boolean variable created that
is normally false and only made true if text is deleted using visual
mode. Then whenever text is put this variable would be checked and if it
is true the < and > marks are made equal to the [ and ] marks and it is
made false.

Best regards

Jens
(Continue reading)

Bram Moolenaar | 1 Dec 12:16 2004
Picon
Picon

Re: [Feature Request]: &metasendsescape


Herculano de Lima Einloft Neto wrote:

> Bram Moolenaar wrote:
> 
> >It works for me:
> >
> >	:map <M-a> lll
> >
> >Pressing Alt-a has the effect of "lll".
> >
> >Make sure 'encoding' is set to "utf-8" before the mappings are defined,
> >otherwise it might not work.  Changing 'encoding' while Vim is running
> >has many side effects.  Best is to set it as early as possible and leave
> >it alone.
> >  
> >
> Ok, I'll gladly take your word for it, even though I couldn't make it 
> work here.

There were a few xterm versions that produced illegal utf-8 byte
sequences for Alt-key combinations.  You could try installing a newer
one.  Version 197 is just out:  ftp://invisible-island.net/xterm

> One issue bugs me: as much as it is easy to get your terminal to behave
> the right way when you're using xterm, standard terminals like the
> linux console and gnome-terminal default to sending an ESC prefix, and
> there appears to be no easy (at least findable) way to change that!

I think you should report that as a bug: Pressing a key with Alt can't
(Continue reading)

Keith Roberts | 1 Dec 18:18 2004

RE: Setting of visual mode marks for put text

>-----Original Message-----
>From: Jens Paulus [mailto:jpaulus <at> freenet.de] 
>Sent: Tuesday, November 30, 2004 11:43 PM
>To: vim-dev <at> vim.org
>Subject: Re: Setting of visual mode marks for put text
>
>Hi Bram,
>
>On Tue, Nov 30, 2004 at 11:39:39 +0100, Bram Moolenaar wrote:
>> > when selecting text with visual mode and then deleting it and 
>> > putting it to some other location I suggest that the < and > marks 
>> > will then be set to mark the region of this put text. Then if the 
>> > user continues editing the text file and later presses gv 
>he or she 
>> > can operate on that text again. Currently the < and > marks both 
>> > mark the first line after the deleted text and I think 
>this does not 
>> > make much sense and the gv command is useless then. Of 
>course, these 
>> > marks should not be set with each putting of text but only when 
>> > putting text that was deleted using visual mode.
>> 
>> The text you put back doesn't know it came from a Visual 
>selected area.
>> The delete and put operations are independent.  Any sequence of 
>> commands may appear in between the two operations.
>> 
>> It's true that the '< and '> marks are not very useful after 
>deleting 
>> the Visual area, since the text is gone.  That's just how it 
(Continue reading)

Jens Paulus | 1 Dec 23:13 2004
Picon

Re: Setting of visual mode marks for put text

Hi Keith,

On Wed, Dec 01, 2004 at 09:18:32 -0800, Keith Roberts wrote:
> >On Tue, Nov 30, 2004 at 11:39:39 +0100, Bram Moolenaar wrote:
> >> > when selecting text with visual mode and then deleting it and 
> >> > putting it to some other location I suggest that the < and > marks 
> >> > will then be set to mark the region of this put text. Then if the 
> >> > user continues editing the text file and later presses gv 
> >he or she 
> >> > can operate on that text again. Currently the < and > marks both 
> >> > mark the first line after the deleted text and I think 
> >this does not 
> >> > make much sense and the gv command is useless then. Of 
> >course, these 
> >> > marks should not be set with each putting of text but only when 
> >> > putting text that was deleted using visual mode.
> >> 
> >> The text you put back doesn't know it came from a Visual 
> >selected area.
> >> The delete and put operations are independent.  Any sequence of 
> >> commands may appear in between the two operations.
> >
> >well I was just thinking there could be a boolean variable 
> >created that is normally false and only made true if text is 
> >deleted using visual mode. Then whenever text is put this 
> >variable would be checked and if it is true the < and > marks 
> >are made equal to the [ and ] marks and it is made false.
> 
> Actually, this makes some sense to me ... But perhaps the better
> question is: is there a way (no matter how it was selected or put) to
(Continue reading)

Picon

quickfix window format padding

The attached patch adds padding to the quickfix window format, so that 
it looks more
uniform. I much preffer it like this, although I still think there's 
room for improvement.
Please see what you think, if you agree, I should add it also for the 
"col %d" field.
I needed to add ``EXTRA_LIBS = -lm'' to src/Makefile, not sure what's 
the policy on this.

Best,
--
Herculano de Lima Einloft Neto
<hlen <at> ig.com.br>
Attachment (quickfix.c.patch): text/x-patch, 2766 bytes
Jens Paulus | 2 Dec 23:08 2004
Picon

Items in popup menu

Hi developers,

when using gvim with the popup menu there is something which could be
improved. For example, if I execute the item
Select word
and directly after this
Select sentence
the visual mode is left and the sentence is not selected. To select a
sentence I have to do it once more.

And if I am in visual mode an additional item
Select blockwise
appears although there is already a
Select block
item.

When not using the popup menu I can select a word and then directly
switch to linewise selection. With the popup menu it should be the same
and I think there is no need to have two items for blockwise selection.
More useful would be items for selecting a sentence and a paragraph.

Best regards

Jens

Bram Moolenaar | 3 Dec 12:08 2004
Picon
Picon

Re: Items in popup menu


Jens Paulus wrote:

> when using gvim with the popup menu there is something which could be
> improved. For example, if I execute the item
> Select word
> and directly after this
> Select sentence
> the visual mode is left and the sentence is not selected. To select a
> sentence I have to do it once more.

Where did you get the "Select sentence" menu entry from?  It's not in
the standard menus.

> And if I am in visual mode an additional item
> Select blockwise
> appears although there is already a
> Select block
> item.

One is to turn the existing selection into a blockwise selection, the
other to start selecting a block at the cursor position.  There is no
special mode for blockwise Visual mode, thus the entry can't be omitted
for the situation you already are in that mode.

> When not using the popup menu I can select a word and then directly
> switch to linewise selection. With the popup menu it should be the same
> and I think there is no need to have two items for blockwise selection.
> More useful would be items for selecting a sentence and a paragraph.

(Continue reading)

Jens Paulus | 4 Dec 00:22 2004
Picon

Re: Items in popup menu

Hi Bram,

On Fri, Dec 03, 2004 at 12:08:48 +0100, Bram Moolenaar wrote:
> > when using gvim with the popup menu there is something which could be
> > improved. For example, if I execute the item
> > Select word
> > and directly after this
> > Select sentence
> > the visual mode is left and the sentence is not selected. To select a
> > sentence I have to do it once more.
> 
> Where did you get the "Select sentence" menu entry from?  It's not in
> the standard menus.

actually this is true. Instead of Select sentence I meant Select line.
The popup menu contains the following items.

Undo
Paste
Select Word
Select Line
Select Block
Select All

Now if I select a word with the popup menu and then directly after this
a line with the popup menu I am put back into Normal mode instead of
having the current line selected. My idea is that I am not thrown back
to Normal mode but that it works like executing vip and after this V in
Normal mode, the result is that the current line is selected.

(Continue reading)

Jens Paulus | 4 Dec 13:02 2004
Picon

Re: Setting of visual mode marks for put text

Hi Keith,

On Fri, Dec 03, 2004 at 14:08:43 -0800, Keith Roberts wrote:
> You could create a command, something like:
> 
> 	command GV call GV()
> 
> And the function GV(), which would do something like:
> 
> - use visualmode() to figure out the type of selection
> - col('.') and line('.') will show if current selection is empty
> - if not empty, :normal gv
> - if empty, :normal `[{v|V|CTRL-V}`]

here is how I did it.

vn <silent> d d:let gvtest=""<CR>
vn <silent> D D:let gvtest=""<CR>
no p :exe "norm! p"<bar>call Gv()<CR>
no gp :exe "norm! gp"<bar>call Gv()<CR>
no p] :exe "norm! p]"<bar>call Gv()<CR>
no P :exe "norm! P"<bar>call Gv()<CR>
no gP :exe "norm! gP"<bar>call Gv()<CR>
no [p :exe "norm! [p"<bar>call Gv()<CR>
fun Gv()
if exists("g:gvtest")
exe "norm mp`[".visualmode()."`]\<C-\>\<C-N>`p"
unl g:gvtest
en
endf
(Continue reading)


Gmane