3
3

More than 5 years have passed since last update.

矩形選択時の始点と終点の収得方法

Posted at

絶対忘れるのでメモ。

function! g:hoge() range
  " 始点
  let start_pos = getpos("'<")
  " 終点
  let end_pos = getpos("'>")
  echo start_pos
  " [1,3,0,0]
  echo end_pos
  " [4,7,0,0]
 endfunction
 vnoremap @ :call g:hoge()<CR>
3
3
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
3
3