44
40

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 5 years have passed since last update.

vimでカーソル位置の行と列を強調表示する

Posted at

vimで検索するとカーソルの位置を見失うことがあります。
そんなときは行や列を強調表示すると見やすくなります。

.vimrc
" 行を強調表示
set cursorline

" 列を強調表示
set cursorcolumn

カーソル位置の行と列を強調表示

実際に使ってみると分かるのですが、常用すると強調表示が逆に邪魔になったり、描画も遅くてストレスになったりするのでmapでON/OFFを切り替えると使い勝手がよさそうです。

.vimrc
nnoremap <Leader>c :<C-u>setlocal cursorline! cursorcolumn!<CR>
44
40
1

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
44
40

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?