GNU/Linux >> Linux の 問題 >  >> Ubuntu

Ctrl +左矢印が単語をスキップしないのはなぜですか?

私はUbuntu12.04を使用しています。テキストを編集するたびに、 ctrlを使用します + / 単語間を移動/ジャンプします。最近、xscreensaverをインストールし、キーボードショートカットを変更してスクリーンセーバーをアクティブにしました。しかし、その後、 Ctrl + 通常の応答を停止しました(左の次の単語に移動します)。 Ctrl + まだ右の次の単語にジャンプします。ターミナル、Geditを使用している場合でも、ウェブページにテキストを入力している場合でも、問題が発生します。

gnome-screensaverに戻り、xscreensaverを削除しました(キーボードショートカットも修正しました)。しかし、問題は残っています。

/etc/inputrcからコンテンツをコピーしようとしました ~/.inputrcへ (デフォルトでは、〜/ .inputrcはありません)。ここでいくつかの情報を入手しました:Ctrlキーと矢印キーを使用してナビゲートすると奇妙な文字が表示されます

助けてください。

編集:
これが私の~/.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

/ etc / inputrcを削除すると、Ctrlキーを押しながら右矢印を5回押すと次のようになります。

上の最初の画像とは異なり、Ctrlキーを押しながら左矢印を2回以上押すと、;5Dは印刷されません。 繰り返しますが…コマンドを一度受け入れて、もうそれを行わないようです..下の画像を参照してください:

関連:Ubuntuでスクリプトを実行するための./とSHの違いは?

承認された回答:

1 – ~/.zshrc

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

2 –または~/.bashrc

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

…そして今、 ctrl + / byobu/tmuxで単語をジャンプします。

3 – inputrcを台無しにしないでください 。


Ubuntu
  1. Linux –Setuidが機能しないのはなぜですか??

  2. Linux –ロケールEs_mxは機能するがEsは機能しないのはなぜですか?

  3. プリマスがこんなに遅く始まるのはなぜですか?

  1. Ctrl-alt- +ショートカットは何をしますか?

  2. Ctrl + \(バックスラッシュ)がプロセスを強制終了しないのはなぜですか?

  3. / etc / issueにLubuntuではなくUbuntuが表示されるのはなぜですか?

  1. uniq が同一の単語を異なるものとしてカウントするのはなぜですか?

  2. MAP_GROWSDOWN マッピングが成長しないのはなぜですか?

  3. Limits.h を含めてはいけません! と表示されるのはなぜですか? dirent.hで?