-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathViewTracer.txt
74 lines (49 loc) · 2.33 KB
/
ViewTracer.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
*vital/Vim/ViewTracer.txt* Trace |window| and |tabpage|.
Maintainer: thinca <[email protected]>
==============================================================================
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)
<
==============================================================================
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