Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant close Floatwindow #639

Closed
glepnir opened this issue Jun 2, 2019 · 5 comments
Closed

Cant close Floatwindow #639

glepnir opened this issue Jun 2, 2019 · 5 comments

Comments

@glepnir
Copy link

glepnir commented Jun 2, 2019

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

HI ,i set split:floating,then i cant close floatwindow by esc.

Expected

close floatwindow by esc.

Environment Information (Required!)

  • denite version (SHA1): latest version

  • OS: macos 10.13.6

  • Vim/neovim version: neovim-0.4.0-dev

  • :checkhealth or :CheckHealth result(neovim only):

health#denite#check
========================================================================
## denite.nvim
  - OK: has("python3") was successful
  - OK: Python3.6.1+ was successful

Provide a minimal init.vim with less than 50 lines (Required!)

set runtimepath+=~/path/to/denite.nvim/
call denite#custom#option('default', {
        \ 'prompt': '❯❯❯:',
        \ 'statusline': v:false,
        \ 'highlight_matched_char': 'Underlined',
        \ 'cursor_shape': v:true,
        \ 'cursor_wrap': v:true,
        \ 'split': 'floating',
        \ })
function! s:denite_detect_size() abort
    let s:denite_winheight = 20
    let s:denite_winrow = &lines > s:denite_winheight ? (&lines - s:denite_winheight) / 2 : 0
    let s:denite_winwidth = &columns > 240 ? &columns / 2 : 120
    let s:denite_wincol = &columns > s:denite_winwidth ? (&columns - s:denite_winwidth) / 2 : 0
    call denite#custom#option('_', {
          \ 'wincol': s:denite_wincol,
          \ 'winheight': s:denite_winheight,
          \ 'winrow': s:denite_winrow,
          \ 'winwidth': s:denite_winwidth,
          \ })
  endfunction

call denite#custom#option('list', {})
call denite#custom#option('mpc', { 'mode': 'normal', 'winheight': 20 })

" MATCHERS
" Default is 'matcher/fuzzy'
call denite#custom#source('tag', 'matchers', ['matcher/substring'])
" call denite#custom#source('file/rec', 'matchers', ['matcher/fruzzy'])

if has('nvim') && &runtimepath =~# '\/cpsm'
	call denite#custom#source(
		\ 'buffer,file_mru,file_old,file/rec,grep,mpc,line,neoyank',
		\ 'matchers', ['matcher/cpsm', 'matcher/fuzzy'])
endif

" SORTERS
" Default is 'sorter/rank'
call denite#custom#source('z', 'sorters', ['sorter_z'])

" CONVERTERS
" Default is none
call denite#custom#source(
	\ 'buffer,file_mru,file_old',
	\ 'converters', ['converter_relative_word'])

" FIND and GREP COMMANDS
if executable('ag')
	" The Silver Searcher
	call denite#custom#var('file/rec', 'command',
		\ ['ag', '-U', '--hidden', '--follow', '--nocolor', '--nogroup', '-g', ''])

	" Setup ignore patterns in your .agignore file!
	" https://github.com/ggreer/the_silver_searcher/wiki/Advanced-Usage

	call denite#custom#var('grep', 'command', ['ag'])
	call denite#custom#var('grep', 'recursive_opts', [])
	call denite#custom#var('grep', 'pattern_opt', [])
	call denite#custom#var('grep', 'separator', ['--'])
	call denite#custom#var('grep', 'final_opts', [])
	call denite#custom#var('grep', 'default_opts',
		\ [ '--skip-vcs-ignores', '--vimgrep', '--smart-case', '--hidden' ])

elseif executable('ack')
	" Ack command
	call denite#custom#var('grep', 'command', ['ack'])
	call denite#custom#var('grep', 'recursive_opts', [])
	call denite#custom#var('grep', 'pattern_opt', ['--match'])
	call denite#custom#var('grep', 'separator', ['--'])
	call denite#custom#var('grep', 'final_opts', [])
	call denite#custom#var('grep', 'default_opts',
			\ ['--ackrc', $HOME.'/.config/ackrc', '-H',
			\ '--nopager', '--nocolor', '--nogroup', '--column'])

elseif executable('rg')
	" Ripgrep
  call denite#custom#var('file/rec', 'command',
        \ ['rg', '--files', '--glob', '!.git'])
  call denite#custom#var('grep', 'command', ['rg', '--threads', '1'])
  call denite#custom#var('grep', 'recursive_opts', [])
  call denite#custom#var('grep', 'final_opts', [])
  call denite#custom#var('grep', 'separator', ['--'])
  call denite#custom#var('grep', 'default_opts',
        \ ['-i', '--vimgrep', '--no-heading'])
endif

" KEY MAPPINGS
let insert_mode_mappings = [
	\  ['jj', '<denite:enter_mode:normal>', 'noremap'],
	\  ['<esc>', '<denite:enter_mode:normal>', 'noremap'],
	\  ['<C-N>', '<denite:assign_next_matched_text>', 'noremap'],
	\  ['<C-P>', '<denite:assign_previous_matched_text>', 'noremap'],
	\  ['<Up>', '<denite:assign_previous_text>', 'noremap'],
	\  ['<Down>', '<denite:assign_next_text>', 'noremap'],
	\  ['<C-Y>', '<denite:redraw>', 'noremap'],
	\  ['<BS>', '<denite:smart_delete_char_before_caret>', 'noremap'],
	\  ['<C-h>', '<denite:smart_delete_char_before_caret>', 'noremap'],
	\ ]

let normal_mode_mappings = [
	\   ["'", '<denite:toggle_select_down>', 'noremap'],
	\   ['<C-n>', '<denite:jump_to_next_source>', 'noremap'],
	\   ['<C-p>', '<denite:jump_to_previous_source>', 'noremap'],
	\   ['gg', '<denite:move_to_first_line>', 'noremap'],
	\   ['st', '<denite:do_action:tabopen>', 'noremap'],
	\   ['sg', '<denite:do_action:vsplit>', 'noremap'],
	\   ['sv', '<denite:do_action:split>', 'noremap'],
	\   ['<esc>', '<denite:quit>', 'noremap'],
	\   ['r', '<denite:redraw>', 'noremap'],
	\ ]

for m in insert_mode_mappings
	call denite#custom#map('insert', m[0], m[1], m[2])
endfor
for m in normal_mode_mappings
	call denite#custom#map('normal', m[0], m[1], m[2])
endfor

" vim: set ts=2 sw=2 tw=80 noet :

How to reproduce problems from neovim startup (Required!)

  1. set split:floating
  2. close floatwindow

Generate a logfile if appropriate

N/A

Screenshot (if possible)

denite

Upload the log file

N/A

@carlitux
Copy link
Contributor

carlitux commented Jun 2, 2019

@taigacute new UI was merged you have to define your maps. #624 see the README file for example https://github.com/Shougo/denite.nvim/pull/624/files#diff-04c6e90faac2675aa89e2176d2eec7d8R94

@glepnir
Copy link
Author

glepnir commented Jun 2, 2019

@carlitux ok thanks only change the key map to key define map? another settings doesnt need change right?

@carlitux
Copy link
Contributor

carlitux commented Jun 2, 2019

As I understood, yes.

@glepnir
Copy link
Author

glepnir commented Jun 2, 2019

thanks . it works!

@glepnir glepnir closed this as completed Jun 2, 2019
@Shougo
Copy link
Owner

Shougo commented Jun 3, 2019

@carlitux ok thanks only change the key map to key define map? another settings doesnt need change right?

Yes.

Note: Deprecated options are removed though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants