update netrw settings and behaviour

This commit is contained in:
Ray Elliott 2020-03-20 18:00:10 +00:00
parent 0784302e62
commit 73489becd0
2 changed files with 1 additions and 29 deletions

View File

@ -1,4 +1 @@
nmap <buffer> o <CR>
nmap <buffer><silent> q <CR>:call CloseNetrw(1)<CR>
nmap <buffer><silent> Q :call CloseNetrw(0)<CR>
setl bufhidden=wipe
setl bufhidden=hide

View File

@ -329,34 +329,9 @@ let g:mta_filetypes = {
let g:netrw_list_hide=netrw_gitignore#Hide()
let g:netrw_preview = 1
let g:netrw_winsize = 40
" let g:netrw_browse_split = 4
let g:netrw_altfile = 1
let g:netrw_mousemaps = 0
nnoremap <space>nn :call OpenNetrw()<CR>
" nnoremap <space>ee :e .<CR>
" nnoremap <space>eq :Rex<CR>
function! OpenNetrw() abort "{{{
Texplore
" setl rnu nu
endfunction
"}}}
function! CloseNetrw(keep_buffer) abort "{{{
if a:keep_buffer == 1
let l:current_buffer = bufnr("%")
tabclose
tabprevious
if bufexists(l:current_buffer) > 0
execute "buffer" l:current_buffer
endif
else
tabclose
tabprevious
endif
endfunction
"}}}
"}}}
" #Obsession{{{
" fork of tpope/vim-obsession