Use of CTRL-]

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Use of CTRL-]

Oliver Fuchs
Hi,
I am using in OpenBSD 3.7 vim-6.3.61-gtk.tgz.
I want to use the CTRL-] command to jump to a tag.
But that is not possible here. Where do I have to go to to change this
behaviour? I have read that

"... CTRL-] is the default telnet escape key.  When you type CTRL-] to
jump to a tag, you will get the telnet prompt instead."

So do I have to change my telnet setup to enable CTRL-] in vim?

Oliver
--
... don't touch the bang bang fruit
Reply | Threaded
Open this post in threaded view
|

Re: Use of CTRL-]

Tim Chase-2
> "... CTRL-] is the default telnet escape key.  When you type
> CTRL-] to jump to a tag, you will get the telnet prompt
> instead."
>
> So do I have to change my telnet setup to enable CTRL-] in
> vim?

While I'm not sure off the top of my head how to go about
changing the escape key for telnet (my OpenBSD box is at home in
a closet at the moment), you can remap the functionality within
vim by doing something long the lines of

        :nnoremap Q <c-]>

(all typed verbatim with less-than, dash, and greater-than).
This will allow you to use "Q" in vim just as you would normally
use ^]

For altering telnet's behavior, according to a linux-box manpage
I've got access to, you can either disable the escape character
entirely (listed as the "-E" parameter) or change it to your
preferred character, though that would require figuring out what
is sent for your desired character, and then determining how to
escape that in such a way that your shell doesn't barf on it :)

HTH,

-tim





Reply | Threaded
Open this post in threaded view
|

Re: Use of CTRL-]

Oliver Fuchs
On Mon, 29 Aug 2005, Tim Chase wrote:

> >"... CTRL-] is the default telnet escape key.  When you type
> >CTRL-] to jump to a tag, you will get the telnet prompt
> >instead."
> >
> >So do I have to change my telnet setup to enable CTRL-] in
> >vim?
>
> While I'm not sure off the top of my head how to go about
> changing the escape key for telnet (my OpenBSD box is at home in
> a closet at the moment), you can remap the functionality within
> vim by doing something long the lines of
>
> :nnoremap Q <c-]>
>
> (all typed verbatim with less-than, dash, and greater-than).
> This will allow you to use "Q" in vim just as you would normally
> use ^]

Yes great, I put
nnoremap Q <c-]>
in my .vimrc and so I can use Q to get to the help tags.
Many many thanks to you

Oliver


>
> For altering telnet's behavior, according to a linux-box manpage
> I've got access to, you can either disable the escape character
> entirely (listed as the "-E" parameter) or change it to your
> preferred character, though that would require figuring out what
> is sent for your desired character, and then determining how to
> escape that in such a way that your shell doesn't barf on it :)
>
> HTH,
>
> -tim

--
... don't touch the bang bang fruit
Reply | Threaded
Open this post in threaded view
|

Re: Use of CTRL-]

Chris Allen
In reply to this post by Oliver Fuchs
On 29/08/05, Oliver Fuchs <[hidden email]> wrote:
> Hi,
> I am using in OpenBSD 3.7 vim-6.3.61-gtk.tgz.
> I want to use the CTRL-] command to jump to a tag.
> But that is not possible here. Where do I have to go to to change this
> behaviour? I have read that
>
> "... CTRL-] is the default telnet escape key.  When you type CTRL-] to
> jump to a tag, you will get the telnet prompt instead."

Newer versions of Vim include this sage advice (my emphasis added):

See the telnet man page.  You can 'telnet -E {Hostname}' to disable
the escape character, or 'telnet -e {EscapeCharacter} {Hostname}' to
specify another escape character.  ***If possible, try to use "ssh"
instead of "telnet" to avoid this problem.***

Using SSH, aside from not necessarily requiring your password,
prevents your friendly BOFH and unfriendly neighbors from reading your
password off the network every time you type it.  You don't have to
worry about the escape key, since it is already well chosen by SSH
(but you can change it if you really need to).

HTH,
Chris Allen
Reply | Threaded
Open this post in threaded view
|

Re: Use of CTRL-]

Oliver Fuchs
On Mon, 29 Aug 2005, Chris Allen wrote:

> On 29/08/05, Oliver Fuchs <[hidden email]> wrote:
> > Hi,
> > I am using in OpenBSD 3.7 vim-6.3.61-gtk.tgz.
> > I want to use the CTRL-] command to jump to a tag.
> > But that is not possible here. Where do I have to go to to change this
> > behaviour? I have read that
> >
> > "... CTRL-] is the default telnet escape key.  When you type CTRL-] to
> > jump to a tag, you will get the telnet prompt instead."
>
> Newer versions of Vim include this sage advice (my emphasis added):
>
> See the telnet man page.  You can 'telnet -E {Hostname}' to disable
> the escape character, or 'telnet -e {EscapeCharacter} {Hostname}' to
> specify another escape character.  ***If possible, try to use "ssh"
> instead of "telnet" to avoid this problem.***
>
> Using SSH, aside from not necessarily requiring your password,
> prevents your friendly BOFH and unfriendly neighbors from reading your
> password off the network every time you type it.  You don't have to
> worry about the escape key, since it is already well chosen by SSH
> (but you can change it if you really need to).
>
> HTH,
> Chris Allen

Many thanks to you for helping.

Oliver
--
... don't touch the bang bang fruit