Segue para o conteúdo

20 de outubro de 2009

Home, End, Page Up and Page Down configuration for Mac (Snow Leopard)

Terminal.app

Enter “Terminal->Preferences->Settings->Keyboard“, and change the following options:

Vi Mode

Home: \033[H
End: \033[F
PageUp: \033[5~
PageDown: \033[6~

Emacs Mode

Home: \033[1~
End: \033[4~
PageUp: \033[5~
PageDown: \033[6~

Bash/Readline

Edit your ~/.inputrc and add the following lines:

Common settings

# Be 8 bit clean.
set input-meta on
set output-meta on
set convert-meta off

# allow the use of the Delete/Insert keys
"\e[3~": delete-char
"\e[2~": quoted-insert

# mappings for "page up" and "page down"
# to step to the beginning/end
# of the history
"\e[5~": beginning-of-history
"\e[6~": end-of-history

Vim mode settings

# Vi mode
set editing-mode vi
set keymap vi

# allow the use of the Home/End keys
"\e[H": beginning-of-line
"\e[F": end-of-line

Emacs mode settings

# allow the use of the Home/End keys
"\e[1~": beginning-of-line
"\e[4~": end-of-line

Vim

Edit the file ~/.vimrc and add the following options:

Terminal configured with Vi mode

map [H
imap [H
map [F
imap [F
map [5~
imap [5~
map [6~
imap [6~

Terminal configured with Emacs mode

map [1~
imap [1~
map [4~
imap [4~
map [5~
imap [5~
map [6~
imap [6~

Cocoa Keybindings

Put the following lines in ~/Library/KeyBindings/DefaultKeyBinding.dict:

{
    /* home */
    "\UF729" = "moveToBeginningOfLine:";
    "$\UF729" = "moveToBeginningOfLineAndModifySelection:";

    /* end */
    "\UF72B"  = "moveToEndOfLine:";
    "$\UF72B" = "moveToEndOfLineAndModifySelection:";

    /* page up */
    "\UF72C"  = "pageUp:";
    "$\UF72C" = "pageUpAndModifySelection:";

    /* page down */
    "\UF72D"  = "pageDown:";
    "$\UF72D" = "pageDownAndModifySelection:";
}

Firefox

Install the following Firefox extension.

References

A Triveos é especializada no desenvolvimento de aplicações Web e utiliza Python e Django em grande parte de seus projetos. Tendo como base esse know-how no uso de Python e Django criamos o Curso de Desenvolvimento Web com Python e Django nas modalidades in-company e online.
Leia mais sobre Sem categoria
View Comments Deixe um comentario
  1. ago 14 2010

    Amiable fill someone in on and this post helped me alot in my college assignement. Thank you seeking your information.

Compartilhe as suas opiniões, envie um comentário.

Nota: HTML é permitido. Seu endereço de e-mail nunca será publicado.

Assine os comentários

blog comments powered by Disqus