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?

More than 3 years have passed since last update.

Vim新しく覚えたシリーズ1 (マーク・ジャンプ機能)

Last updated at Posted at 2021-03-03

概要

vim歴 10年でも、何となく使ってなかった(基本的)機能がいっぱいあるので、
たまに新しいことにチャレンジして記録しようと思った。

マーク・ジャンプ機能。(他記録はこちら)

内容

環境

macOS Catalina
VIM - Vi IMproved 8.1 macOS version Normal version without GUI.

使ってみた

tmp.txt
aaaaa
bbbbb
ccccc

①3行目でmmを入力した。(mでマーク)
②1行目に移動。
③**'m**を入力した。(「'」シングルクオートでマークmに移動)

できた!

まとめ

Command Description
ma set mark a at current cursor location
'a jump to line of mark a
`a jump to position(line and column) of mark a
:marks list all the cuurent marks
:marks aB list marks a, B

蛇足

  • .(ドット):最後に編集した場所がマークされている
  • ', `:直前ににジャンプした場所がマークされている
  • [,]:最後に編集・yankした場所がマークされている
  • <,>:最後にvisual selectした場所がマークされている。

参考にさせていただいた頁・本

感想

快適だった。
「`」(バックスラッシュ)は少し打ちにくい印象。。

今後

ちょっと編集した後に、また元の場所に戻ってきたい時などに活用していきたい。

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?