LoginSignup
1
1

More than 5 years have passed since last update.

Line 番号 gutter や、wrap 設定を気楽に変更する。

Last updated at Posted at 2015-05-01

line 番号の表示や、softwrap を気楽に変更したい。

keymap は vim-mode 前提。
softwrap は editor:toggle-soft-wrap があるので、それをキーマップすれば良いだけ。
line-number の表示の toggle は対応するコマンドが無いので、カスタムコマンドを作ってキーマップする。
なんか知らん。コマンドあった。。editor:toggle-line-numbers があった。

init.coffee
# これはいらないけど、設定をトグルするコマンドのサンプルとして残しておく。
# atom.commands.add 'atom-text-editor', 'custom:toggle-line-number', ->
#   atom.config.toggle("editor.showLineNumbers")

vim-mode 前提

keymap.cson
'atom-text-editor.vim-mode.command-mode':
  'space n': 'editor:toggle-line-numbers'
  'space w': 'editor:toggle-soft-wrap'

使い方

normal mode (Atom の呼び方, scope では vim-mode.command-mode ) で

  • space 押した後、n で line number の表示を切り替え
  • space 押した後、w で wrap の切り替え
1
1
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
1
1