vim(およびvi)では、コマンドモードで入力[[
すると、ファイルの先頭に移動するように見え、入力すると]]
、ファイルの末尾に移動するように見えます。しかし、私はそれをファイルコマンドの開始/終了だと思ったので、gg
何か違うことをしているのでしょうか? G
[[
]]
私の推測では、[[
それ]]
は何かの次のインスタンスに進むでしょうが、私は何を理解することができません。
試してみてください:help ]]
:
]]
[count]セクションは、最初の列の次の'{'に進みます。
さらに読む::help section
。
プロのヒント:コマンドを検索して組み込みをナビゲートする方法を学びます:help
。それは包括的であり、多くのヒントを提供します。他のエディターほど速くVimを学ぶことはできませんが、継続的な学習に取り組むと、非常に強力で効率的なエディターになるでしょう。
このヒントを見るまで、のデフォルトの動作[[
と]]
便利なものは見つかりませんでした:help section
If your '{' or '}' are not in the first column, and you would like to use "[["
and "]]" anyway, try these mappings:
:map [[ ?{<CR>w99[{
:map ][ /}<CR>b99]}
:map ]] j0[[%/{<CR>
:map [] k$][%?}<CR>
から:help [[
、
[[ [count] sections backward or to the previous '{' in
the first column. |exclusive|
Note that |exclusive-linewise| often applies.
私の知る限り、
[[ : jump to function start
]] : jump to function end
編集:私はまた、以下を定義するチートシートを見つけました:
( [count] : sentences backward
) [count] : sentences forward
{ [count] : paragraphs backward
} [count] : paragraphs forward
]] [count] : sections forward or to the next '{' in the first column. When used after an operator, then the '}' in the first column.
][ [count] : sections forward or to the next '}' in the first column
[[ [count] : sections backward or to the previous '{' in the first column
]] [count] : sections backward or to the previous '}' in the first column