LoginSignup
22
6

More than 1 year has passed since last update.

Vim — q とコロン ( q: ) で出てくるあいつは何と呼ぶのか > 「コマンドライン・ウィンドウ」らしい

Last updated at Posted at 2018-08-22

Vimを終了 ( :q ) させようとすると、たまに押し間違えてでてくるあいつ。

コマンドラインウィンドウ。
カタカナで書くと山口百恵の曲っぽい。

もしくは単に「コマンドウィンドウ」と呼ぶみたいだ。

image

用途用法

通常の1行のコマンドモードとは違って、Vim的なキーストロークやショートカットキーなどを保ったまま、コマンド履歴を扱えたり、コマンドを打てるっぽい。

Enterでコマンド実行。
:q でウィンドウから抜けられる。 ( q: ではない )

いいね!

vimでコマンドラインウインドウを使わないのはもったいない」 の「履歴をvimのコマンドラインに送る」という説明に納得。

しかし、めちゃくちゃググりにくい

英語で思いつく限りの単語でググっても出てこないレベル。
ググり方が悪いのだろうか?

  • Google "Vim q and colon" (思うような結果なし)
  • Google "Vim q before colon" (思うような結果なし)
  • Google "Vim colon after q" (思うような結果なし)
  • Google "Vim command line q colon" (思うような結果なし)

名前が分からないとそもそも始まらない。

vimの画面には Command Line と表示されていることを頼りに Vim command line q とぐぐったらようやくヒットした。

ドキュメント

6. Command-line window				*cmdline-window* *cmdwin*

							*command-line-window*
In the command-line window the command line can be edited just like editing
text in any window.  It is a special kind of window, because you cannot leave
it in a normal way.
{not available when compiled without the |+cmdline_hist| or |+vertsplit|
feature}

OPEN						*c_CTRL-F* *q:* *q/* *q?*

There are two ways to open the command-line window:

Vim documentation: cmdline

参照

Vim command window

...

q: — Open with a command history from normal mode
q/ — Open with a search history from normal mode (to search forward)
q? — Open with a search history from normal mode (to search backward)
Ctrl+F — Open with a command history from command mode

Vim command window | Arabesque

あわせて読みたい?

Thanks to

Vim — コマンド入力モードで移動するショートカット (普通のショートカットが効かない) - Qiita でコメントいただいた @shiracamus さん

Links

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

22
6
2

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
22
6