call defx#custom#option('_', { \ 'columns': 'mark:filename:type:size:time', \ }) call defx#custom#option('_', { \ 'columns': 'indent:git:icons:filename', \ 'show_ignored_files': 1, \ }) call defx#custom#column('icon', { \ 'directory_icon': '▸ ', \ 'file_icon': ' ', \ 'opened_icon': '▾ ', \ 'root_icon': ' ', \ }) call defx#custom#column('mark', { \ 'readonly_icon': '✗', \ 'selected_icon': '✓', \ }) let g:defx_icons_enable_syntax_highlight = 1 let g:defx_icons_column_length = 3 let g:defx#_python_version_check = 1 nnoremap f :Defx `expand('%:p:h')` -search=`expand('%:p')` autocmd FileType defx call s:defx_my_settings() function! s:defx_my_settings() abort " Define mappings nnoremap \ defx#do_action('open') nnoremap c \ defx#do_action('copy') nnoremap m \ defx#do_action('move') nnoremap p \ defx#do_action('paste') nnoremap l \ defx#do_action('open') nnoremap E \ defx#do_action('open', 'vsplit') nnoremap P \ defx#do_action('open', 'pedit') nnoremap o \ defx#do_action('open_or_close_tree') nnoremap K \ defx#do_action('new_directory') nnoremap N \ defx#do_action('new_file') nnoremap M \ defx#do_action('new_multiple_files') nnoremap C \ defx#do_action('toggle_columns', \ 'mark:filename:type:size:time') nnoremap S \ defx#do_action('toggle_sort', 'time') nnoremap d \ defx#do_action('remove') nnoremap r \ defx#do_action('rename') nnoremap ! \ defx#do_action('execute_command') nnoremap x \ defx#do_action('execute_system') nnoremap yy \ defx#do_action('yank_path') nnoremap . \ defx#do_action('toggle_ignored_files') nnoremap ; \ defx#do_action('repeat') nnoremap h \ defx#do_action('cd', ['..']) nnoremap ~ \ defx#do_action('cd') nnoremap q \ defx#do_action('quit') nnoremap i \ defx#do_action('toggle_select') . 'j' nnoremap * \ defx#do_action('toggle_select_all') nnoremap j \ line('.') == line('$') ? 'gg' : 'j' nnoremap k \ line('.') == 1 ? 'G' : 'k' nnoremap \ defx#do_action('redraw') nnoremap \ defx#do_action('print') nnoremap cd \ defx#do_action('change_vim_cwd') endfunction " }}}