-
Notifications
You must be signed in to change notification settings - Fork 2
/
vim-increment-activator.txt
240 lines (188 loc) · 8.74 KB
/
vim-increment-activator.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
*increment-activator.txt* Utility that increment to cursor or select
CONTENTS *increment-activator-contents*
Overview................................|increment-activator-overview|
Installation............................|increment-activator-installation|
Interface...............................|increment-activator-interface|
Variables...........................|increment-activator-variables|
Key Mappings........................|increment-activator-key-mappings|
Issues..................................|increment-activator-issues|
Changelog...............................|increment-activator-changelog|
License.................................|increment-activator-license|
==============================================================================
OVERVIEW *increment-activator-overview*
*increment-activator* (IncrementActivator.vim) is powerful increment activator.
The behavior is like <C-a>, <C-x> (in|de)crement current number
by the default Vim's key-map.
It has been enhanced to allow increment the list that you have defined.
The list defined by you is auto generate to candidates.
For exam, case of private, protected, puBlic
generated candidates to
* no change
* lower (private, protected, public)
* UPPER (PRIVATE, PROTECTED, PUBLIC)
* Capitalize (Private, Protected, Public)
==============================================================================
INSTALLATION *increment-activator-installation*
Pre-Requirements
- Vim version 7.2 or above
Using Package Manager:
Case NeoBundle.vim: >
NeoBundle 'nishigori/increment-activator'
<
Case Vundle: >
Bundle 'nishigori/increment-activator'
<
Getting Manual:
1. Get the plugin package
2. Extract the files and put them in your Vim directory
(usually ~/.vim/ or Program Files/Vim/vimfiles on Windows).
==============================================================================
INTERFACE *increment-activator-interface*
------------------------------------------------------------------------------
FUNCTIONS *increment-activator-functions*
increment_activator#increment() *increment_activator#increment*
Apply to increment currently word.
increment_activator#decrement() *increment_activator#decrement*
Apply to decrement currently word.
*increment_activator#candidates#generate*
increment_activator#candidates#generate({filetype})
increment_activator#candidates#clear() *increment_activator#candidates#clear*
Clear to generated candidates of all.
------------------------------------------------------------------------------
VARIABLES *increment-activator-variables*
*g:increment-activator_filetype_candidates*
g:increment_activator_filetype_candidates
Type of dictionary.
Keys is <filetype> ('_' is filetype of all).
Value is lists (nested the list).
The candidates for priority is -
1. Current filetype (`&filetype`)
2. `_` key (`_` is special as apply to all filetypes)
3. number by default Vim
Example:
>
let g:increment_activator_filetype_candidates =
\ {
\ '_': [
\ ['info', 'warning', 'notice', 'error'],
\ ['Pythonista', 'PHPer', 'Gopher'],
\ ['ぬるぽ', 'ガッ'],
\ ],
\ 'erlang': [
\ ['module', 'export'],
\ [
\ 'is_alive', 'is_atom', 'is_binary', 'is_bitstring',
\ 'is_boolean', 'is_float', 'is_function',
\ 'is_integer', 'is_list', 'is_number',
\ 'is_pid', 'is_port', 'is_process_alive',
\ 'is_record', 'is_reference', 'is_tuple',
\ ],
\ ],
\ 'git-rebase-todo': [
\ ['pick', 'reword', 'edit', 'squash', 'fixup', 'exec'],
\ ],
\ 'go': [
\ ['true', 'false', 'iota', 'nil'],
\ ['byte', 'complex64', 'complex128'],
\ ['int', 'int8', 'int16', 'int32', 'int64'],
\ ['uint', 'uint8', 'uint16', 'uint32', 'uint64'],
\ ['float32', 'float64'],
\ ['interface', 'struct'],
\ ],
\ }
<
Defaults to "{}".
g:increment_activator#config *g:increment-activator_config*
This variable is deprecated.
Please use g:increment_activator_filetype_candidates
*g:increment_activator#no_default_candidates*
g:increment_activator_no_default_candidates
This plugin will use candicates that defined by plugin for increment.
If you don't want there candicates,
define g:increment_activator_no_default_candidates to 1.
before plugin loaded.
Candidates defined by plugin:
* sun, mon, tue, wed, thu, fri, sat
* sunday, monday, tuesday, ... saturday
* jan, feb, mar, apr, may, ... dec
* january, february, march, ... december
* true, false
* yes no
* on, off
>
let g:increment_activator_no_default_candidates = 1
<
Defaults to 0.
g:increment_activator_no_default_key_mappings
*g:increment_activator_no_default_key_mappings*
This plugin will define the following key mapping automatically.
If you don't want there key mappings (<C-a>, <C-x>),
define |g:increment_activator_no_default_key_mappings| to 1.
before this plugin loaded.
>
let g:increment_activator_no_default_key_mappings = 1
<
Defaults to 0.
------------------------------------------------------------------------------
KEY MAPPINGS *increment-activator-key-mappings*
This plugin will define the following |Normal-mode| key map automatically.
In other |mode()|, you must define key maps.
Example for custom key mappings:
>
" Normal-mode: customized
let g:increment_activator_no_default_key_mappings = 1
nmap <silent> ab <Plug>(increment-activator-increment)
nmap <silent> az <Plug>(increment-activator-decrement)
" Insert-mode
imap <silent> <C-a> <Plug>(increment-activator-increment)
imap <silent> <C-x> <Plug>(increment-activator-decrement)
<
<Plug>(increment-activator-increment) *<Plug>(increment-activator-increment)*
Applies to increment currently word.
It supports on |Normal-mode|, |Insert-mode|.
<Plug>(increment-activator-decrement) *<Plug>(increment-activator-decrement)*
Applies to decrement currently word.
It supports on |Normal-mode|, |Insert-mode|.
==============================================================================
ISSUES *increment-activator-issues*
This plugin is under the management of Github.
https://github.com/nishigori/increment-activator/issues
Are you having any the problem, question, or idea ? Please add issue !!
==============================================================================
CHANGLOG *increment-activator-changelog*
To get the diff between two versions, go to -
https://github.com/nishigori/increment-activator/compare/VERSION...VERSION
0.1.0 Sun Jun 29 19:59:53 2014 +0900 *increment-activator-cahngelog-0.1.0*
- Change variable name from 'increment_activator#config' to -
'increment_activator_filetype_candidates'
- [GH-6] Fix increment not expect multiple line
0.0.2 Tue Jan 14 08:02:55 2014 +0900 *increment-activator-cahngelog-0.0.2*
- Support insert-mode
- Fix E154 'duplicate tag 'increment-activator'
0.0.1 Sat Jan 4 06:24:23 2014 +0900 *increment-activator-changelog-0.0.1*
- First release.
- Feature inherited https://github.com/nishigori/vim-sunday
- Support candidates of filetype definition
- define able no use default key mappings
- define able no use candidates created by plugin
==============================================================================
LICENSE *increment-activator-license*
Copyright 2013-2014 by Takuya Nishigori
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:noet:fen: