update OpenNetrw, CloseNetrw
This commit is contained in:
parent
eed3099cc0
commit
399d897858
|
@ -1,4 +1,4 @@
|
||||||
nmap <buffer><silent> o <CR>:call CloseNetrw(1)<CR>
|
nmap <buffer> o <CR>
|
||||||
nmap <buffer><silent> q :call CloseNetrw(0)<CR>
|
nmap <buffer><silent> q <CR>:call CloseNetrw(1)<CR>
|
||||||
|
nmap <buffer><silent> Q :call CloseNetrw(0)<CR>
|
||||||
setl bufhidden=wipe
|
setl bufhidden=wipe
|
||||||
setl rnu nu
|
|
||||||
|
|
3
vimrc
3
vimrc
|
@ -466,6 +466,7 @@ command! -nargs=1 -complete=command Redir silent call Redir(<q-args>)
|
||||||
"}}}
|
"}}}
|
||||||
function! OpenNetrw() abort "{{{
|
function! OpenNetrw() abort "{{{
|
||||||
Texplore
|
Texplore
|
||||||
|
setl rnu nu
|
||||||
endfunction
|
endfunction
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
|
@ -474,7 +475,9 @@ function! CloseNetrw(keep_buffer) abort "{{{
|
||||||
let l:current_buffer = bufnr("%")
|
let l:current_buffer = bufnr("%")
|
||||||
tabclose
|
tabclose
|
||||||
tabprevious
|
tabprevious
|
||||||
|
if bufexists(l:current_buffer) > 0
|
||||||
execute "buffer" l:current_buffer
|
execute "buffer" l:current_buffer
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
tabclose
|
tabclose
|
||||||
tabprevious
|
tabprevious
|
||||||
|
|
Loading…
Reference in New Issue