Skip to content

Commit

Permalink
Follow up change of denite api
Browse files Browse the repository at this point in the history
  • Loading branch information
ta1kt0me committed Jun 3, 2019
1 parent 5afe7af commit 4b4d6ad
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
13 changes: 10 additions & 3 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,16 @@ nnoremap <silent> [unite]gp :<C-u>Denite<Space>grep<Return>
nnoremap <silent> [unite]l :<C-u>Denite<Space>line<Return>
nnoremap <silent> [unite]u :<C-u>Denite<Space>-resume<Return>
call denite#custom#map('insert', '<C-j>', '<denite:move_to_next_line>', 'noremap')
call denite#custom#map('insert', '<C-k>', '<denite:move_to_previous_line>', 'noremap')
call denite#custom#map('insert', '<C-x>', '<denite:input_command_line>', 'noremap')
" Define mappings
autocmd FileType denite call s:denite_my_settings()
function! s:denite_my_settings() abort
nnoremap <silent><buffer><expr> <CR> denite#do_map('do_action')
nnoremap <silent><buffer><expr> d denite#do_map('do_action', 'delete')
nnoremap <silent><buffer><expr> p denite#do_map('do_action', 'preview')
nnoremap <silent><buffer><expr> q denite#do_map('quit')
nnoremap <silent><buffer><expr> i denite#do_map('open_filter_buffer')
nnoremap <silent><buffer><expr> <Space> denite#do_map('toggle_select')
endfunction

" Use 'ag' instead of 'grep' if available
if executable('ag')
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,10 @@ Denite.nvim is to unite all interfaces for NeoVim/Vim.
A few things at least you have to know about Denite are:

- It requires Neovim or Vim 8.0+ with if_python3
- `<C-j>` : to move to next line
- `<C-k>` : to move to previous line
- `j` : to move to next line
- `k` : to move to previous line
- `q` : to close "denite" window
- `i` : to move to filter buffer
- `<Leader>ur` : to "denite" recently opened files
- `<Leader>ub` : to "denite" buffers
- `<Leader>ufp` : to "denite" find files in the project (e.g. for files in git repository)
Expand Down

0 comments on commit 4b4d6ad

Please sign in to comment.