0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

GNU nanoでもCtrl+Cでコピー、Ctrl+Vでペーストする

Posted at

GNU nano に、Ctrl+C でコピー、Ctrl+V でペーストなどの一般的なキーバインドを持たせるなど、私の行っている設定です。

nano の設定をカスタマイズするために、サンプル設定ファイル /etc/nanorc を ~/.config/nano/nanorc にコピーします。

mkdir -p ~/.config/nano
cp /etc/nanorc ~/.config/nano/nanorc

~/.config/nano/nanorc ファイルを nano で開きます。

nano ~/.config/nano/nanorc

以下のコメントを解除します。

行番号を表示するために:

set linenumbers

シンタックスハイライトするために:

include /usr/share/nano/*.nanorc

上記だけでシンタックスハイライトされないものがあるので追記:

include /usr/share/nano/extra/*.nanorc

一般的なキーバインドを持たせるために:

bind ^X cut main
bind ^C copy main
bind ^V paste all
bind ^Q exit all
bind ^S savefile main
bind ^W writeout main
bind ^O insert main
set multibuffer
bind ^H help all
bind ^H exit help
bind ^F whereis all
bind ^G findnext all
bind ^B wherewas all
bind ^D findprevious all
bind ^R replace main
unbind ^U all
unbind ^N main
unbind ^Y all
unbind M-J main
unbind M-T main
bind ^A mark main
bind ^P location main
bind ^T gotoline main
bind ^T gotodir browser
bind ^T cutrestoffile execute
bind ^L linter execute
bind ^E execute main
bind ^K "{mark}{end}{zap}" main
bind ^U "{mark}{home}{zap}" main
bind ^Z undo main
bind ^Y redo main
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?