*vital/Vim/ViewTracer.txt*	Trace |window| and |tabpage|.

Maintainer: thinca  <thinca+vim@gmail.com>

==============================================================================
CONTENTS				*Vital.Vim.ViewTracer-contents*

INTRODUCTION			|Vital.Vim.ViewTracer-introduction|
INTERFACE			|Vital.Vim.ViewTracer-interface|
  FUNCTIONS			  |Vital.Vim.ViewTracer-functions|



==============================================================================
INTRODUCTION				*Vital.Vim.ViewTracer-introduction*

*Vital.Vim.ViewTracer* can trace |window| and |tab-page|.
A window number and a tab-page number are changed by its location.  So, it is
difficult to find the same window or tab-page.
This module traces them.

>
	let V = vital#{plugin-name}#new()
	let T = V.import("Vim.ViewTracer")

	" Trace the current window by handle
	let handle = T.trace_window()

	" Get the current tabnr and winnr of handle
	let [tabnr, winnr] = T.find(handle)

	" Jump to the handled window
	call T.jump(handle)
<

Requirement:
- Vim 7.3.893 or later



==============================================================================
INTERFACE				*Vital.Vim.ViewTracer-interface*

------------------------------------------------------------------------------
FUNCTIONS				*Vital.Vim.ViewTracer-functions*

trace_window([{tabnr}, {winnr}])	*Vital.Vim.ViewTracer.trace_window()*
	Returns a handle object to trace a specified window.  If {tabnr} and
	{winnr} is omitted, current is used.

trace_tabpage([{tabnr}])		*Vital.Vim.ViewTracer.trace_tabpage()*
	Returns a handle object to trace a specified tabpage.  If {tabnr} is
	omitted, current is used.
	Note that tracing of tabpage has a little side effect before Vim
	7.4.434.  These operations move a tab page only for a moment.

find({handle})				*Vital.Vim.ViewTracer.find()*
	Gets current tabnr and winnr of {handle}.
	If a {handle} is tracing a tabpage, {winnr} is 0.
	Returns a List like [{tabnr}, {winnr}].

exists({handle})			*Vital.Vim.ViewTracer.exists()*
	Checks whether window or tabpage of {handle} exists.

tabnr({handle})				*Vital.Vim.ViewTracer.tabnr()*
	Gets current tabnr of {handle}.

winnr({handle})				*Vital.Vim.ViewTracer.winnr()*
	Gets current winnr of {handle}.

jump({handle})				*Vital.Vim.ViewTracer.jump()*
	Jumps to window or tabpage of {handle}.



==============================================================================
vim:tw=78:fo=tcq2mM:ts=8:ft=help:norl
