Skip to content

From v0.1.0 to v0.5.0 dev

Alisue edited this page Dec 2, 2016 · 1 revision

The prompt part of denite.nvim has changed from original to lambdalisue/neovim-prompt implementation by PR #79.

Migration

Users need to modify them custom mappings as

  1. Remove backslash from mapping ("\<C-s>" become '<C-s>')
  2. Use new mapping action name ('suspend' become '<denite:suspend>')
  • See [Mapping action differences] (#mapping-action-difference) for the corresponding names)
  1. Add 'noremap' to the fourth argument if mapping target is a mapping action
" v0.1.0
call denite#custom#map('_', "\<C-s>", 'suspend')

" v0.5.0
call denite#custom#map('_', '<C-s>', '<denite:suspend>', 'noremap')
" Or use exiting map
call denite#custom#map('_', '<C-s>', '<C-z>')

New features

  • Caret (cursor) has supported. Users can move the caret by <Left>, <Right>, <Home>, <End>, etc. and insert/overstrike text into the caret position.
    • Some colorscheme does not define Cursor highlight. In that case, users need to define Cursor highlight by themselves like highlight default link Cursor IncSearch
  • Insert mode toggle has supported. Users can toggle insert/overstrike by <Insert>
  • Command-line history has supported. Users can recall the history by <Up>, <Down>, <C-p>, <C-n>, etc.
  • Paste text from a specific register has supported. Users can paste a text by <C-R>
  • Copy text to a specific register has supported. No default mapping is defined
  • Copy text to a default register has supported. No default mapping is defined
  • Digraph has supported. Users can enter a digraph by <C-K>
  • Inprintable characters has supported. Users can enter a digraph by <C-Q>
  • Multiple keys has supported for custom mappings
  • iskeyword option has respected for caret movement (include deleting text)
  • timeout and timeoutlen option has respected
  • noremap mapping has supported. In other word, without noremap param, the mapping is recursively resolved
  • nowait mapping has supported. Similar to the native Vim's nowait feature
  • expr mapping has supported. Similar to the native Vim's expr feature

Backward incompatible changes

  • The behaviour of a raw input feture via <C-J> has changed because of the presence of the caret feature
    • Before: Entered text in denite.nvim prompt has copied into a raw input prompt and users can modify it. After user accpet the change, the modified text replace the entered text in denite.nvim prompt
    • After: Entered text in denite.nvim prompt is no longer available in a raw input prompt. The entered text in a raw input prompt will be inserted/overstriked into the caret position of the denite.nvim prompt
  • Mapping action name such as suspend or do_action:preview has changed into <denite:suspend> or <denite:do_action:preview>. Additionally, some mapping action name has completely changed due to the neovim-prompt builtin mapping actions. Users can confirm the corresponding name at the end of this migration note.
  • <C-R> is defined as "Paste text from a specific register" like a native Vim does. Users have to define a custom mapping if they like the previous behaviour

Mapping action difference

The following shows the difference of mapping actions. Bold text indicate the complete change.

v0.1.0 v0.5.0 Remarks
choose_action <denite:choose_action>
delete_backward_char <denite:delete_char_before_caret>
delete_backward_line <denite:delete_text_before_caret>
delete_backward_word <denite:delete_word_before_caret> New implementation respect iskeyword
do_action:{action} <denite:do_action:{action}>
enter_mode:{mode} <denite:enter_mode:{mode}>
input_command_line <denite:input_command_line> The behaviour has changed
insert_word:{word} <denite:insert_word:{word}> If you just need a mapping for 'insert' mode, call denite#custom#map('insert', '<F2>', 'helloworld') works.
jump_to_next_source <denite:jump_to_next_source>
jump_to_prev_source <denite:jump_to_previous_source>
leave_mode <denite:leave_mode>
move_to_next_line <denite:move_to_next_line>
move_to_prev_line <denite:move_to_previous_line>
move_to_first_line <denite:move_to_first_line>
move_to_last_line <denite:move_to_last_line>
paste_from_register <denite:paste_from_default_register>
redraw <denite:redraw>
quit <denite:quit>
scroll_window_downwards <denite:scroll_window_downwards>
scroll_window_upwards <denite:scroll_window_upwards>
scroll_page_forwards <denite:scroll_page_forwards>
scroll_page_backwards <denite:scroll_page_backwards>
suspend <denite:suspend>

Note that v0.5.0 defines a lot more mapping actions. See :help denite-key-mappings for more detail.

Clone this wiki locally