-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathauto_cursorline.txt
84 lines (55 loc) · 2.8 KB
/
auto_cursorline.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
75
76
77
78
79
80
81
82
83
84
*auto_cursorline.txt* enable/disable cursorline automatically
Author: delphinus
Licence: MIT
CONTENTS *auto_cursorline-contents*
Introduction |auto_cursorline-introduction|
Install |auto_cursorline-install|
Configuration |auto_cursorline-configuration|
Functions |auto_cursorline-functions|
Variables |auto_cursorline-variables|
Information |auto_cursorline-information|
==============================================================================
INTRODUCTION *auto_cursorline-introduction*
This plugin manages the |'cursorline'| option to show only when you need. It
shows / hides in these cases below.
* When it shows
- opening buffers
- moving into another window
- holding the cursor in a certain wait (customizable)
* When it hides
- moving the cursor
NOTE: For Neovim (>=0.7.0) users, you may use a Lua version of this instead.
See https://github.com/delphinus/auto-cursorline.nvim
==============================================================================
INSTALL *auto_cursorline-install*
Clone the repository to your |packpath| …… that's all!
==============================================================================
CONFIGURATION *auto_cursorline-configuration*
*auto_cursorline-configuration-g_auto_cursorline_wait_ms*
g:auto_cursorline_wait_ms ~
It waits this value milliseconds before hiding |'cursorline'|. Default: `1000`
*auto_cursorline-configuration-b_auto_cursorline_disabled*
b:auto_cursorline_disabled ~
When this value is set to `1`, it disables all features. This is a
buffer-specific value, so you may set this with autocmd.
>
" this disables all features in JSON filetypes.
autocmd FileType json :let b:auto_cursorline_disabled = 1
In addition to this, all features are already disabled in |terminal| windows.
==============================================================================
INFORMATION *auto_cursorline-information*
Why is this plugin needed? ~
(details in https://qiita.com/delphinus/items/a05f6f21dd494bad9f25 )
The |'cursorline'| option takes heavy CPU usage and makes the cursor move
slowly. In addition, you should need |'cursorline'| only when you are missing
the cursor. Hiding |'cursorline'| should make it easy to read characters on the
line.
Background ~
The idea of this plugin is derived from this entry below:
https://thinca.hatenablog.com/entry/20090530/1243615055
One of the reason why I did “reinventing the wheel” is because the original
one uses the |'updatetime'| option to wait before hiding |'cursorline'|. But other
plugins, such as vim-gitgutter https://github.com/airblade/vim-gitgutter uses
|'updatetime'| for different usages. I made this plugin for setting the
designated value for the time before hiding the |'cursorline'|.
vim:tw=78:fo=tcq2mM:ts=8:ft=help:norl