Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,11 @@ let g:any_jump_search_prefered_engine = 'rg'
" - 'filename_last'
let g:any_jump_results_ui_style = 'filename_first'

" Any-jump window size & position options
" Any-jump window options
let g:any_jump_window_width_ratio = 0.6
let g:any_jump_window_height_ratio = 0.6
let g:any_jump_window_top_offset = 4
let g:any_jump_window_border = 'none' " currently only supported in Neovim

" Show / hide Help section
let g:any_jump_show_help_section = 1
Expand Down
3 changes: 2 additions & 1 deletion doc/any-jump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,11 @@ let g:any_jump_search_prefered_engine = 'rg'
" - 'filename_last'
let g:any_jump_results_ui_style = 'filename_first'

" Any-jump window size & position options
" Any-jump window options
let g:any_jump_window_width_ratio = 0.6
let g:any_jump_window_height_ratio = 0.6
let g:any_jump_window_top_offset = 4
let g:any_jump_window_border = 'none' " currently only supported in Neovim

" Show / hide Help section
let g:any_jump_show_help_section = 1
Expand Down
5 changes: 4 additions & 1 deletion plugin/any-jump.vim
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ call s:set_plugin_global_option('any_jump_search_prefered_engine', 'rg')
" Disable default keybindings for commands
call s:set_plugin_global_option('any_jump_disable_default_keybindings', v:false)

" Any-jump window size & position options
" Any-jump window options
call s:set_plugin_global_option('any_jump_window_width_ratio', str2float('0.6'))
call s:set_plugin_global_option('any_jump_window_height_ratio', str2float('0.6'))
call s:set_plugin_global_option('any_jump_window_top_offset', 2)
call s:set_plugin_global_option('any_jump_window_border', 'none')

" Show / hide Help section (default: 1)
call s:set_plugin_global_option('any_jump_show_help_section', v:true)
Expand Down Expand Up @@ -205,6 +206,7 @@ fu! s:CreateNvimUi(internal_buffer) abort
let width = float2nr(&columns * g:any_jump_window_width_ratio)
let horizontal = float2nr((&columns - width) / 2)
let vertical = g:any_jump_window_top_offset
let border = g:any_jump_window_border

let opts = {
\ 'relative': 'editor',
Expand All @@ -213,6 +215,7 @@ fu! s:CreateNvimUi(internal_buffer) abort
\ 'width': width,
\ 'height': height,
\ 'style': 'minimal',
\ 'border': border,
\ }

let winid = nvim_open_win(buf, v:true, opts)
Expand Down