/
unite.txt
755 lines (603 loc) · 20.1 KB
/
unite.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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
*unite.txt* Unite all sources
Version: 1.0
Author : Shougo <Shougo.Matsu@gmail.com>
License: MIT license {{{
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.
}}}
CONTENTS *unite-contents*
Introduction |unite-introduction|
Install |unite-install|
Interface |unite-interface|
Commands |unite-commands|
Variables |unite-variables|
Sources variables |unite-sources-variables|
Key mappings |unite-key-mappings|
Examples |unite-examples|
Create source |unite-create-source|
ToDo |unite-todo|
Bugs |unite-bugs|
Changelog |unite-changelog|
==============================================================================
INTRODUCTION *unite-introduction*
*unite* searches and displays information from arbitrary sources like files,
buffers, recently used files or registers. You can run one of defined action
on a target displayed.
The differences between |unite| and similar plugins like |fuzzyfinder| or |ku|
are that |unite| doesn't use the built-in completion interface of Vim, and
integrates sources at the same time.
==============================================================================
USAGE *unite-usage*
In case when you run with files and buffers as the source
>
:Unite file buffer
<
In case when you run with the initial input value foo
>
:Unite -input=foo file
<
The unite you started splits the window horizontally as default, opening on
the top of the Vim. For example,
>
:Unite file
<
lists up the files of the current directory. You may choose one of the
candidates by moving j or k, and typing Enter opens the candidate in a new
buffer. That's the default action for candidates of which kind is file. You
may also select an action with <Tab> on a candidate. See also |unite-action|
about the actions.
You can narrow down the candidates with a keyword. After opening a unite
window, the cursor goes on the right side of > in the 2nd line by typing i.
Then you can input a keyword to narrow down the candidates. Each single
characters you type narrows down the candidates. You also can use a wild card * as an
arbitrary character sequence. For example
>
*hisa
<
matches hisa, ujihisa, or ujihisahisa. Furthermore, two consequence wild cards
matches directory recursively. For example
>
**/foo
<
matches bar/foo or buzz/bar/foo. Note that you should consider using
|file_rec| that will be described bellow in most cases.
You may specify multiple keywords to narrow down, separating by spaces.
>
foo bar
<
That matches candidates that match both foo and bar.
You may specify negative conditions with !.
>
foo !bar
<
That matches foo but candidates that match bar will be rejected.
See also |unite_default_key_mappings|for other actions.
==============================================================================
INSTALL *unite-install*
==============================================================================
INTERFACE *unite-interface*
------------------------------------------------------------------------------
COMMANDS *unite-commands*
:Unite [-buffer-name={buffer-name}] [-input={input-text}] {sources}
*:Unite*
Unite all sources. Initial narrowing text is empty.
{buffer-name} is unite buffer name.
{input-text} is initial input text.
:UniteWithCurrentDir [-buffer-name={buffer-name}] [-input={input-text}] {sources}
*:UniteWithCurrentDir*
Unite all sources. Initial narrowing text is current directory.
:UniteWithBufferDir [-buffer-name={buffer-name}] [-input={input-text}] {sources}
*:UniteWithBufferDir*
Unite all sources. Initial narrowing text is current buffer
directory.
:UniteWithCursorWord [-buffer-name={buffer-name}] [-input={input-text}] {sources}
*:UniteWithCursorWord*
Unite all sources. Initial narrowing text is cursor word.
------------------------------------------------------------------------------
VARIABLES *unite-variables*
g:unite_update_time *g:unite_update_time*
Default value is 200.
g:unite_enable_start_insert *g:unite_enable_start_insert*
If this variable is enabled, unite.vim will
execute|:startinsert| automatically.
Default value is 0.
g:unite_enable_ignore_case *g:unite_enable_ignore_case*
Default value is same to 'ignorecase'.
g:unite_enable_smart_case *g:unite_enable_smart_case*
Default value is same to 'infercase'.
g:unite_split_rule *g:unite_split_rule*
Define split position rule.
Default value is "topleft".
g:unite_enable_split_vertically *g:unite_enable_split_vertically*
If this option is true, split unite window vertically.
Default value is 0.
g:unite_data_directory *g:unite_data_directory*
Default value is expand('~/.unite').
SOURCES VARIABLES *unite-sources-variables*
g:unite_source_file_ignore_pattern *g:unite_source_file_ignore_pattern*
Default value is refer to autoload/unite/sources/file.vim.
g:unite_source_file_mru_time_format *g:unite_source_file_mru_time_format*
Default value is "(%c)".
g:unite_source_file_mru_file *g:unite_source_file_mru_file*
Default value is |g:unite_data_directory| . '/.file_mru'.
g:unite_source_file_mru_limit *g:unite_source_file_mru_limit*
Default value is 100.
g:unite_source_file_mru_ignore_pattern *g:unite_source_file_mru_ignore_pattern*
Default value is refer to autoload/unite/sources/file_mru.vim.
------------------------------------------------------------------------------
KEY MAPPINGS *unite-key-mappings*
Normal mode mappings.
<Plug>(unite_exit) *<Plug>(unite_exit)*
Exit unite.
Visual mode mappings.
<Plug>(unite_toggle_mark_selected_candidates) *<Plug>(unite_toggle_selected_candidates)*
Toggle marks in selected candidates.
*g:unite_default_key_mappings*
Following keymappings are default keymappings.
Normal mode mappings.
{lhs} {rhs}
-------- -----------------------------
Please refer to unite#mappings#define_default_mappings() in
autoload/unite/mappings.vim.
==============================================================================
SOURCE *unite-source*
------------------------------------------------------------------------------
SOURCE ATTRIBUTES *unite-source-attributes*
*unite-source-attribute-name*
name string (requried)
The name of a source. It must consist of the following
characters:
- a-z
- 0-9
- _
- /
For example:
- "buffer" , "file_mru" and "virw/git" are valid.
- "BadOne", "!@#$%^&*()_[]{}-|" and "" are
not valid.
*unite-source-attribute-max_candidates*
max_candidates number (optional)
The maximum number of candidates.
This attribute is optional; if it is not given, 0 is
used as the default value. This means maximum number
is infinity.
*unite-source-attribute-required_pattern_length*
required_pattern_length number (optional)
The required pattern length to collect candidates.
This attribute is optional; if it is not given, 0 is
used as the default value. This means that always
collect candidates.
==============================================================================
EXAMPLES *unite-examples*
>
" The prefix key.
nnoremap [unite] <Nop>
nmap f [unite]
nnoremap [unite]u :<C-u>Unite<Space>
nnoremap <silent> [unite]f :<C-u>UniteWithCurrentDir -buffer-name=files buffer file_mru bookmark file<CR>
nnoremap <silent> [unite]b :<C-u>UniteWithBufferDir -buffer-name=files buffer file_mru bookmark file<CR>
autocmd FileType unite call s:unite_my_settings()
function! s:unite_my_settings()"{{{
" Overwrite settings.
imap <buffer> jj <Plug>(unite_insert_leave)
nnoremap <silent><buffer> <C-k> :<C-u>call unite#mappings#do_action('preview')<CR>
"imap <buffer> <C-w> <Plug>(unite_delete_backward_path)
" Start insert.
"let g:unite_enable_start_insert = 1
endfunction"}}}
let g:unite_source_file_mru_limit = 200
>
==============================================================================
TODO *unite-todo*
==============================================================================
BUGS *unite-bugs*
==============================================================================
CHANGELOG *unite-changelog*
2010-11-02
- Improved <Plug>(unite_select_next_line) and <Plug>(unite_select_previous_line).
2010-11-01
- Improved redraw.
- Fixed parents.
2010-10-31
- Fixed buffer action error.
- Improved buffer actions.
- Changed unite#start() specification.
- Improved common parents.
- Improved unite#take_action().
- Added unite#take_parents_action().
- Added cdable source.
- Improved Japanese documentation.
- Added rec action in cdable.
- Improved tab source.
- Added g:unite_winwidth option.
- Improved match line.
2010-10-30
- Action specification is changed dramatically.
- Improved substitute path separator.
- Added unite#undef_custom_action().
- Source bookmark uses unite#custom_action().
- :Unite command analyses source arguments.
- Improved Japanese documentation.
- Set hlsearch option.
- Added unite#start() and unite#get_context().
- Implemented extend kinds.
- Improved file_rec.
2010-10-29
- Improved selectable action(experimental).
- Improved tab action.
- Fixed unite#take_action().
2010-10-28
- Improved util.vim.
- Sorted marked candidates.
2010-10-26
- Added g:unite_winheight option.
- Improved modifiable.
- Improved file_mru abbr.
- Improved file_mru load.
- Improved unite_tab.
- Added rename action in kind tab.
- Fixed filtering bug.
2010-10-25
- Fixed unite#invalidate_cache() error.
2010-10-24
- Improved file_mru.
- Added tab source.
2010-10-23
- Fixed jump_list.
2010-10-22
- Fixed escape pattern.
- Added bookmark action in buffer.
- Improved file_mru.
2010-10-21
- Improved prompt check.
- Added unite#define_source() and unite#define_kind() and unite#undef_source() and unite#undef_kind().
- Added unite-user-sources.
- Improved Japanese help.
- Added tabvimshell action in directory kind.
- Improved jump_list preview action.
2010-10-20
- Improved do_action().
- Fixed source name syntax.
- Added i_<Plug>(unite_do_delete_action) mapping.
- Added -start-insert option.
2010-10-19
- Improved source name completion.
2010-10-16
- Deleted g:unite_enable_quick_match_mappings option.
- Added <Plug>(unite_quick_match_default_action) mapping.
- Improved quick match.
- Improved unite#mappings#do_action() description.
- Added g:unite_quick_match_table option.
- Implemented unite#custom_alias().
- Improved unite#set_substitute_pattern() and unite#custom_alias().
- Implemented unite#custom_default_action().
- Implemented unite#custom_action().
- Fixed buffer append error.
- Improved unite#take_action().
2010-10-15
- Improved <Plug>(unite_select_next_line) and <Plug>(unite_select_previous_line).
- Implemented default-action option.
- Improved completion.
- Displays candidates number.
- Implemented quick match.
- Added g:unite_enable_quick_match_mappings option.
- Added cursor key support.
- Deleted <ESC> mapping.
2010-10-14
- Fixed substitute pattern.
- Improved dummy file.
- Implemented unite#get_substitute_pattern().
- Fixed :Unite completion.
- Improved buffer_tab.
- Improved s:load_default_sources_and_kinds() loading.
2010-10-12
- Fixed get directory error.
- Fixed s:load_default_sources_and_kinds() error.
- Added buffer_tab source.
- Improved buffer sort.
2010-10-11
- Fixed modifiable problem in insert mode.
- Fixed lcd in unite#quit_session().
- Improved <Plug>(unite_delete_backward_path) mapping.
- Improved s:load_default_sources_and_kinds().
2010-10-10
- Changed g:unite_update_time default value.
- Allowed source name contained /.
- Allowed sources#define to list sources.
- Added <Plug>(unite_delete_backward_path) mapping.
2010-10-09
- Improved unite#mappings#smart_map().
- Deleted <S-Tab> default mapping.
- Improved g:unite_source_file_mru_time_format default pattern.
- Improved default mappings.
- Modifiable unite buffer.
- Fixed register source error.
- Improved prompt highlight.
- Improved Japanese description.
- Parse prompt.
- Implemented restore prompt.
- Improved <Plug>(unite_delete_backward_char).
- Fixed syntax clear.
- Fixed :UniteWithInput.
2010-10-08
- Fixed dummy candidates bug.
- Improved buffer narrowing.
- Added common kind.
- Improved unite#mappings#do_action().
- Improved choose action.
- Improved mapping description.
- Changed source action specification.
- Improved cd action.
- Improved dummy.
- Improved English description.
- Added g:unite_cd_command and g:unite_lcd_command options.
- Changed gather_candidates() specification.
- Changed the name of unite#mappings#smart_imap to unite#mappings#smart_map
2010-10-07
- Improved :UniteResume.
- Fixed file_mru word.
- Optimized register source.
- Don't chase link.
- Fixed filtering bug.
- Fixed dummy candidates bug.
2010-10-06
- Improved unite#set_substitute_pattern().
- Deleted / mappings.
- Improved description.
- Improved globing pattern.
- List current buffer.
- Added vimshell action in buffer.
- Improved default substitute patterns.
- Improved / substitute pattern.
- Fixed substitute pattern.
- Added :UniteResume.
2010-10-04
- Fixed Japanese description.
- Deleted :UniteFilemruSweep command.
2010-10-02
- Added file_rec source.
- Improved file_rec source.
- Added :UniteWithInput command.
- Improved get input text.
- Improved invalid source detection.
- Detect home directory in file_rec.
2010-10-01
- Improved iskeyword.
2010-09-30
- Improved g:unite_source_file_ignore_pattern.
- Changed g:unite_temporary_directory into g:unite_data_directory.
- Improved / mapping.
- Fixed globing.
- Deleted setlocal number.
- Fixed / mapping.
2010-09-29
- Added openable kind.
- Print candidates when <Plug>(unite_choose_action).
- Changed / mapping.
- Implemented unite#mappings#smart_imap().
2010-09-28
- Optimized redraw.
- Added <Plug>(unite_do_narrow_action).
- Reverted / behavior.
- Added narrow action in buffer.
- Fixed glob().
- Fixed force redraw bug.
- Added cd and lcd action in buffer.
- Fixed modifiable bug.
2010-09-27
- Fixed file glob.
- Fixed abbr in file_mru.
- Fixed doted file search.
- Improved g:unite_source_file_ignore_pattern.
2010-09-26
- Fixed ignorecase bug.
- Deleted obsolute mappings.
- Improved prompt.
- Implemented input text save.
- Optimized file_mru.
- Added <Plug>(unite_cursor_top) and <Plug>(unite_loop_cursor_down) and <Plug>(unite_loop_cursor_up) mappings.
- Improved documentation.
- Fixed vimshell error.
- Improved glob.
2010-09-24
- Improved <Plug>(unite_select_next_line) and <Plug>(unite_previous_line) behavior.
- Fixed documentation typo.
- Added unite#set_substitute_pattern().
- Deleted g:unite_substitute_patterns.
2010-09-23
- Fixed filtering bug.
- Added the unite-functions description into Japanese document.
2010-09-21
- Ver.1.0 development is started.
- Fixed unite buffer restore bug.
Ver.0.5 {{{
2010-09-21
- Ver.0.5 is released.
- Fixed japanese documentation.
- Improved unite buffer detect.
2010-09-20
- Added :UniteWithCursorWord command.
- Improved initialization.
- Added Japanese help(Thanks naoina!).
- Added <Plug>(unite_toggle_mark_selected_candidates) keymapping.
- Changed some keymappings name.
- Refactoringed file_mru.
- Added bookmark source.
- Added jump_list kind.
- Added <Plug>(unite_do_bookmark_action)
- Detect vimfiler and vimshell in bookmark.
- Improved buffer search.
- Fixed i_<Plug>(unite_exit).
- Fixed help tags.
2010-09-19
- Fixed wildcard bug.
- Improved buffer check.
- Improved split.
2010-09-18
- Display modified flag in source buffer.
- Fixed multiple unite buffer bug.
- Refactoringed.
- Fixed :UniteWithBufferDir and :UniteWithCurrentDir.
- Improved multiple unite buffer.
- Set nomodeline.
- Fixed redraw bug.
- Changed g:unite_update_time default value.
2010-09-17
- Implemented escape ' '.
- Added split actions in kind file.
- Added cd and lcd actions in kind file.
- Added ex action in kind file.
- Improved filtering.
- Added vimshell action in kind directory.
- Improved mru format.
- Implemented delete action in file_mru.
- Improved action table.
2010-09-16
- Added <Plug>(unite_move_head) keymapping.
- Deleted h keymappings.
- Added sources variables description.
- Supported ** pattern.
- Added g:unite_source_file_ignore_pattern option.
- Improved g:unite_source_file_mru_ignore_pattern option.
- Implemented option parse.
- Revised examples.
- Improved directory kind.
- Added file kind actions.
- Added preview keymapping.
2010-09-15
- Improved complete sources.
- Implemented choose action.
- Resolve link file.
- Improved restore window.
2010-09-14
- Added dummy candidate in file source.
- Changed cur_text as input.
- Changed unite#start() arguments.
2010-09-12
- Fixed filtering.
- Added source register.
- Added kind word.
2010-09-10
- Ver.0.5 development is started.
- Implemented kind.
- Improved caching.
}}}
Ver.0.1 {{{
2010-09-10
- Improved UniteWithBufferDir and UniteWithCurrentDir.
2010-09-09
- Check redrawtime.
- Implemented ! exclude pattern.
- Added g:unite_enable_start_insert option.
- Improved file_mru.
- Fixed filtering bug.
- Detect invalid source name.
- Implemented maximum candidates attribute.
- Added g:unite_split_rule and g:unite_enable_split_vertically options.
- Implemented required_pattern_length attribute.
2010-09-05
- Fixed filtering bug.
- Improved close buffer.
- Improved truncate.
- Improved mappings.
2010-09-04
- Implemented exclude pattern.
- Improved syntax.
2010-08-30
- Improved UniteWithBufferDir.
2010-08-28
- Fixed / mapping.
- Fixed startinsert error.
- Fixed mappings.
- Fixed initialization bug.
- Implemented caching candidates.
- Improved caching behavior.
- Improved <Plug>(unite_enter).
- Added UniteWithCurrentDir.
- Added UniteWithBufferDir.
- Improved <Plug>(unite_do_selected_candidate).
2010-08-27
- Improved <Enter> mappings.
2010-08-25
- Added examples.
2010-08-19
- Added wildcard syntax.
2010-08-18
- Added <Plug>(unite_print_candidate) mapping.
- Improved truncate string.
- Fixed escape bug.
- Implemented insert mode completion.
- Improved truncate max.
- Improved unite_enter.
- Implemented <Plug>(unite_insert_leave) mapping.
2010-08-13
- Fixed highlight bug.
- Fixed buffer filtering bug.
- Fixed load error.
2010-08-12
- Improved source buffer.
- Improved mappings.
- Improved filter.
- Added g:unite_enable_ignore_case and g:unite_enable_smart_case option.
2010-08-10
- Improved keymappings.
- Improved InsertLeave behavior.
- Improved substitute tilde.
- Added g:unite_substitute_patterns option.
2010-08-08
- Fixed nomodifiable error.
- Improved redraw.
- Implemented previous/next source.
2010-08-07
- Implemented buffer delete.
- Improved action table.
- Implemented marks.
- Improved buffer settings.
2010-08-06
- Improved buffer abbr.
- Renamed unite#buf_leave().
- Improved buffer sort.
- Improved cursor position.
- Improved buffer leave.
2010-08-05
- Fixed buffer switch.
- Improved match behavior.
2010-08-04
- Improved menu.
- Improved syntax.
- Improved redrawtime.
- Improved file source.
- Fixed open bugs.
2010-08-03
- Changed mru file format.
- Changed mappings name.
- Added highlight match.
2010-08-02
- Improved mappings name.
2010-08-01
- Updated file_mru.
- Improved mappings.
2010-07-31
- Added documentation.
- Added syntax file.
- Implemented buffer source.
- Added file source.
- Added file_mru source.
- Some improvements.
}}}
==============================================================================
vim:tw=78:ts=8:ft=help:norl:noet:fen:fdl=0:fdm=marker: