Permalink
Browse files

- Added examples.

  • Loading branch information...
1 parent fee1ee6 commit cb27af0f609f880a3e044cc064fa9aac7f623e2a @Shougo committed Oct 17, 2012
Showing with 58 additions and 3 deletions.
  1. +58 −3 doc/unite.txt
View
@@ -2678,7 +2678,6 @@ description String (Optional)
==============================================================================
EXAMPLES *unite-examples*
>
-
" The prefix key.
nnoremap [unite] <Nop>
nmap f [unite]
@@ -2690,10 +2689,24 @@ EXAMPLES *unite-examples*
nnoremap <silent> [unite]r :<C-u>Unite
\ -buffer-name=register register<CR>
nnoremap <silent> [unite]o :<C-u>Unite outline<CR>
+ nnoremap <silent> [unite]f
+ \ :<C-u>Unite -buffer-name=resume resume<CR>
+ nnoremap <silent> [unite]d
+ \ :<C-u>Unite -buffer-name=files -default-action=lcd directory_mru<CR>
+ nnoremap <silent> [unite]ma
+ \ :<C-u>Unite mapping<CR>
+ nnoremap <silent> [unite]me
+ \ :<C-u>Unite output:message<CR>
nnoremap [unite]f :<C-u>Unite source<CR>
+ nnoremap <silent> [unite]s
+ \ :<C-u>Unite -buffer-name=files -no-split
+ \ jump_point file_point buffer_tab
+ \ file_rec:! file file/new file_mru<CR>
+
" Start insert.
"let g:unite_enable_start_insert = 1
+ "let g:unite_enable_short_source_names = 1
autocmd FileType unite call s:unite_my_settings()
function! s:unite_my_settings()"{{{
@@ -2703,8 +2716,34 @@ EXAMPLES *unite-examples*
imap <buffer> jj <Plug>(unite_insert_leave)
"imap <buffer> <C-w> <Plug>(unite_delete_backward_path)
- " <C-l>: manual neocomplcache completion.
- inoremap <buffer> <C-l> <C-x><C-u><C-p><Down>
+ imap <buffer><expr> j unite#smart_map('j', '')
+ imap <buffer> <TAB> <Plug>(unite_select_next_line)
+ imap <buffer> <C-w> <Plug>(unite_delete_backward_path)
+ imap <buffer> ' <Plug>(unite_quick_match_default_action)
+ nmap <buffer> ' <Plug>(unite_quick_match_default_action)
+ imap <buffer><expr> x
+ \ unite#smart_map('x', "\<Plug>(unite_quick_match_choose_action)")
+ nmap <buffer> x <Plug>(unite_quick_match_choose_action)
+ nmap <buffer> <C-z> <Plug>(unite_toggle_transpose_window)
+ imap <buffer> <C-z> <Plug>(unite_toggle_transpose_window)
+ imap <buffer> <C-y> <Plug>(unite_narrowing_path)
+ nmap <buffer> <C-y> <Plug>(unite_narrowing_path)
+ nmap <buffer> <C-j> <Plug>(unite_toggle_auto_preview)
+ nmap <buffer> <C-r> <Plug>(unite_narrowing_input_history)
+ imap <buffer> <C-r> <Plug>(unite_narrowing_input_history)
+ nnoremap <silent><buffer><expr> l
+ \ unite#smart_map('l', unite#do_action('default'))
+
+ let unite = unite#get_current_unite()
+ if unite.buffer_name =~# '^search'
+ nnoremap <silent><buffer><expr> r unite#do_action('replace')
+ else
+ nnoremap <silent><buffer><expr> r unite#do_action('rename')
+ endif
+
+ nnoremap <silent><buffer><expr> cd unite#do_action('lcd')
+ nnoremap <buffer><expr> S unite#mappings#set_current_filters(
+ \ empty(unite#mappings#get_current_filters()) ? ['sorter_reverse'] : [])
endfunction"}}}
let g:unite_source_file_mru_limit = 200
@@ -2714,6 +2753,19 @@ EXAMPLES *unite-examples*
" For optimize.
let g:unite_source_file_mru_filename_format = ''
+ if executable('jvgrep')
+ " For jvgrep.
+ let g:unite_source_grep_command = 'jvgrep'
+ let g:unite_source_grep_default_opts = '--exclude ''\.(git|svn|hg|bzr)'''
+ let g:unite_source_grep_recursive_opt = '-R'
+ endif
+
+ " For ack.
+ if executable('ack-grep')
+ " let g:unite_source_grep_command = 'ack-grep'
+ " let g:unite_source_grep_default_opts = '--no-heading --no-color -a'
+ " let g:unite_source_grep_recursive_opt = ''
+ endif
<
==============================================================================
USER DEFINED SOURCES *unite-user-sources*
@@ -2741,6 +2793,9 @@ A: You can use below mappings.
==============================================================================
CHANGELOG *unite-changelog*
+2012-10-17
+- Added examples.
+
2012-10-16
- Fixed choose action for vimfiler.
- Added host check in file_point.

0 comments on commit cb27af0

Please sign in to comment.