scrollup
, scrolldown
は一行のスクロールしかしない)
sudo apt install libncurses-dev
INSTALL
を參照
對象バージョン:5.7
~/.nanorc
:
## オプション
set autoindent # オートインデント
set jumpyscrolling # 半画面単位でスクロール(デフォルトは一行単位)
set linenumbers # 行番号
set minibar # タイトルバーの代りに、ステータスバーにバッファに関する情報を表示
set multibuffer # ファイル読込時、新しいバッファに挿入する
# set nohelp # 画面下部のヘルプを表示しない
# set positionlog # カーソル位置を保存
set quickblank # ステータスバーのメッセージを1回のキー操作で消す
set regexp # 正規表現での検索
set softwrap # ウィンドウの端で折返す(ソフトラップ)
set suspendable # 「中断」を許可
set tabsize 2 # タブ文字のサイズ
set whitespace "»·" # スペース・タブ文字。表示するにはトグルをオンする必要がある
set titlecolor cyan # タイトルバーの文字色
set statuscolor cyan # ステータスバーの文字色
set errorcolor black,lightred # エラーメッセージの配色
set numbercolor cyan # 行番号の文字色
set keycolor lightblack # 下部のヘルプのキーの文字色
set functioncolor lightblack # 下部のヘルプの説明の文字色
~/.nanorc
:
## キーコンフィグ
bind ^\ exit all # 終了
bind ^_ suspend main # 中断
bind ^O insert main # 読込
bind M-S writeout main # 書込
bind ^C copy main # コピー
bind ^V paste all # ペースト
bind ^X cut all # カット
bind ^Z undo main # 元に戻す
bind ^Y redo main # やり直す
bind ^R replace main # 置換
bind ^J pagedown main # ページ下へスクロール
bind ^K pageup main # ページ上へスクロール
bind M-J scrolldown main # 一行下へスクロール
bind M-K scrollup main # 一行上へスクロール
bind M-Q findnext all # 次を検索
bind M-W findprevious all # 前を検索
bind M-L center main # カーソル行を画面中央へスクロール
bind ^L gotoline main # 指定した行へ移動
bind M-R refresh main # 画面を更新
~/.nanorc
:
## シンタックスハイライト
include "/usr/local/share/nano/*.nanorc" # シンタックスハイライトを適用