GNU/Linux >> Tutoriales Linux >  >> Ubuntu

¿Por qué Ctrl + flecha izquierda no salta palabras?

Estoy en mi Ubuntu 12.04. Cada vez que edito texto, uso ctrl + izquierda /derecha para moverse/saltar entre palabras. Recientemente, instalé xscreensaver y cambié los atajos de teclado para activar mi protector de pantalla. Pero entonces, Ctrl + izquierda dejó de responder normalmente (mover a la siguiente palabra a la izquierda). Ctrl + derecha todavía salta a la siguiente palabra a la derecha. El problema ocurre si estoy usando la terminal, Gedit o incluso escribiendo texto en páginas web.

Volví a gnome-screensaver, eliminé xscreensaver (también arreglé mis atajos de teclado). Pero el problema persiste.

Intenté copiar contenido de /etc/inputrc a ~/.inputrc (por defecto, no tengo ~/.inputrc). Obtuve algo de información aquí:Aparecen caracteres extraños cuando uso las teclas Ctrl y Flecha para navegar

Por favor ayuda.

EDITAR:
Aquí está mi ~/.inputrc:

# /etc/inputrc - global inputrc for libreadline
# See readline(3readline) and `info rluserman' for more information.
# Be 8 bit clean.
set input-meta on
set output-meta on
# To allow the use of 8bit-characters like the german umlauts, uncomment
# the line below. However this makes the meta key not work as a meta key,
# which is annoying to those which don't need to type in 8-bit characters.

# set convert-meta off

# try to enable the application keypad when it is called.  Some systems
# need this to enable the arrow keys.
# set enable-keypad on

# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys

# do not bell on tab-completion
# set bell-style none
# set bell-style visible

# some defaults / modifications for the emacs mode
$if mode=emacs

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

# 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

# alternate mappings for "page up" and "page down" to search the history
# "e[5~": history-search-backward
# "e[6~": history-search-forward

# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
"e[1;5C": forward-word
"e[1;5D": backward-word
"e[5C": forward-word
"e[5D": backward-word
"ee[C": forward-word
"ee[D": backward-word

$if term=rxvt
"e[8~": end-of-line
"eOc": forward-word
"eOd": backward-word
$endif

# for non RH/Debian xterm, can't hurt for RH/Debian xterm
# "eOH": beginning-of-line
# "eOF": end-of-line

# for freebsd console
# "e[H": beginning-of-line
# "e[F": end-of-line

$endif

si elimino /etc/inputrc, esto es lo que obtengo si mantengo presionada la tecla CTRL y luego presiono la flecha hacia la derecha cinco veces:

A diferencia de la primera imagen de arriba, mantener presionada la tecla CTRL y presionar la flecha izquierda más de una vez no imprimirá ;5D de nuevo... es como si estuviera aceptando el comando una vez y ya no lo hace... vea la imagen de abajo:

Relacionado:¿la diferencia entre ./ y SH para ejecutar un script en Ubuntu?

Respuesta aceptada:

1 – En ~/.zshrc

bindkey '^[[1;5D' backward-word
bindkey '^[[1;5C' forward-word

2 – O en ~/.bashrc

bind '"e[1;5D" backward-word' 
bind '"e[1;5C" forward-word'

… Y ahora ctrl + izquierda / derecha saltar palabras en byobu / tmux.

3 – No te metas con inputrc .


Ubuntu
  1. ¿Por qué Tomcat funciona con el puerto 8080 pero no con el 80?

  2. ¿Por qué uniq cuenta palabras idénticas como diferentes?

  3. ¿Por qué el mapeo MAP_GROWSDOWN no ​​crece?

  4. ¿Por qué dice No debemos incluir límites? en dirent.h?

  5. ¿Por qué Ctrl + V no se pega en Bash (shell de Linux)?

¿Por qué la expresión regular funciona en X pero no en Y?

Linux:¿por qué no funciona Setuid?

Linux – ¿Por qué Locale Es_mx funciona pero no Es?

¿Por qué `exit &` no funciona?

¿Alt-tab no cambia?

¿Por qué Libreoffice parece viejo?