Rnvimr is highly customizable via global variables (g:rnvimr_*).
Common Configuration Options
g:rnvimr_enable_ex: Set to 1 to make Ranger replace Netrw as the default file explorer.g:rnvimr_enable_picker: Set to 1 to hide the window automatically after picking a file.g:rnvimr_hide_gitignore: Set to 1 to hide files included in .gitignore.g:rnvimr_enable_bw: Set to 1 to automatically wipe Neovim buffers corresponding to files deleted in Ranger.g:rnvimr_draw_border: Set to 0 to disable the floating window border.g:rnvimr_border_attr: Define border colors (e.g., {'fg': 14, 'bg': -1}).g:rnvimr_vanilla: Set to 1 to use default Ranger configuration.
Layout and Preset Customization
g:rnvimr_layout: A dictionary defining the initial window size, position, and style.g:rnvimr_presets: A list of dictionaries defining multiple preset window layouts that :RnvimrResize cycles through.g:rnvimr_ranger_views: A list of dictionaries to help Ranger adapt its view to the floating window size (using minwidth, maxwidth, and ratio).
Action Mapping
Use g:rnvimr_action to map Ranger keys to Neovim commands. This is useful for fixing macOS split-window issues.
let g:rnvimr_action = {
'<C-t>': 'NvimEdit tabedit',
'<C-x>': 'NvimEdit split',
'<C-v>': 'NvimEdit vsplit',
'gw': 'JumpNvimCwd',
'yw': 'EmitRangerCwd'
}
" Example: Enable Ranger as default explorer and hide gitignored files
let g:rnvimr_enable_ex = 1
let g:rnvimr_hide_gitignore = 1
" Example: Customizing the initial layout
let g:rnvimr_layout = {
'relative': 'editor',
'width': float2nr(round(0.7 * &columns)),
'height': float2nr(round(0.7 * &lines)),
'col': float2nr(round(0.15 * &columns)),
'row': float2nr(round(0.15 * &lines)),
'style': 'minimal'
}