このページについて

FakeVim

Vim スタイルの編集に関する設定を行うには、Preferences >FakeVim に移動してください。

Vimの動作設定

Vimの動作を設定するには、Preferences >FakeVim >General に移動してください。

FakeVimの設定画面の「一般」タブ

プリセットを使用するには:

  • テキストエディタ用に指定されたインデント設定を事前に選択するには、「Copy Text Editor Settings 」を選択します。
  • Qt XMLのコーディングスタイルを事前選択するには、「Set Qt Style 」を選択します。
  • シンプルなインデントスタイルを事前選択するには、「Set Plain Style 」を選択します。

その後、事前選択された設定を変更します。

プラグインのエミュレーション

Plugin Emulation で、エミュレートする一般的な vim プラグインを選択します。

次の表は、利用可能なプラグインと、それらへのリンクをまとめたものです。

Vim プラグイン説明
vim-commentarygc アクションを使用してコード領域をコメントアウトします。例:gccgc2jgcip
ReplaceWithRegister
  • [count]["x]gr{motion} を実行すると、motion をレジスタx の内容に置換します。
  • ["x]grr を実行すると、現在の行が置換されます。
argtextobj.vim関数の引数として、ia およびaa というテキストオブジェクトを定義します。
vim-exchangevim 用のテキスト交換演算子。
vim-surround周囲の削除、追加、変更を行うマッピングを追加します。

FakeVim コマンドのマッピング

FakeVim のコマンドラインで入力されたコマンドをQt Creator の関数にマッピングするには:

  1. Preferences 」>「FakeVim 」>「Ex Command Mapping 」に移動します。
  2. Filter 」フィールドに文字列を入力して、Qt Creator の関数を検索します。

    FakeVimの設定にある「コマンドマッピング」タブ

  3. リストから関数を選択します。
  4. Regular expression 」フィールドに、関数をトリガーする文字列を入力します。

    Ex Trigger Expression 」フィールドにトリガー式が表示されます。

選択したトリガー式を削除するには、[Reset] を選択します。

すべての関数のトリガー式をリセットするには、[Reset All] を選択します。

ユーザーコマンドのマッピング

ユーザーコマンドをキーボードショートカットに割り当てるには、[Preferences ] > [FakeVim ] > [User Command Mapping] の順に選択します。ショートカットに割り当てられたユーザーコマンドは、あたかもそのコマンドを入力したかのように(マクロを再生する場合と同様に)、FakeVim によって実行されます。

「ユーザーコマンドの割り当て」タブ(FakeVimの設定)

「Vim と同じように編集する」および「FakeVim のモードとコマンドも参照してください

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.