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?

VIMチャレンジその2(全5回):VIMの真骨頂「コマンド組み合わせ」

Posted at
Page 1 of 7

コマンドの組み合わせ

  • 基本的なコマンドでもかなりの効率化になる
  • 基本的なコマンドの組み合わせで複雑な操作が可能になる

(関数型PG言語みたい、と思った方は何かにかなり毒されています!素晴らしい)


コマンドの前に数値(1/2)

  • 基本的には次のコマンドを繰り返す
  • 2行コピー → 2y
  • 2回ペースト → 2p
  • 10行下に移動 → 10j

コマンドの前に数値(2/2)

  • 10単語後ろに移動 → 10w
  • 10単語前に移動 → $ 10b
    行末から移動した方が早いときに便利
    大雑把に移動するときに使う

特定行にジャンプ

  • 33行目にジャンプ → 33gg

選択モードとの組み合わせ

  • 3行選択 → Shift+V 3j
  • 全体を選択してコピー → gg Shift+V G y
    こう書くと複雑だがすぐ手癖になります

PGのエラー箇所に移動

VS Codeと組み合わせると・・・

backend/src/Texts.hs:7:22: error: [GHC-76037]
  • 7gg 22l

番外

  • 単語単位の操作
    • 移動:w
    • 単語の削除:dw
  • カッコの対応を確認
    • %
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?