I have the following files in directory:
" ============================================================================
" Netrw Directory Listing (netrw v149)
" /home/.../content
" Sorted by name
" Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$...
" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:exec
" ============================================================================
../
./
.swo
1
10-1
10-2
10-3
10-4
10-5
10-6
2
3
4
5
6
7
8-1
8-2
8-3
9-1
9-2
9-3
9-4
9-5
Having 10-2 buffer opened, how can I open for editing the next file (10-3)?
What about going back?
Right now I do :Ex and then go to the next file.
:EditNext and :EditPlus commands.[f / ]f mappings to go to the previous / next fileYou can load all the files:
:args *
Then use :bn and :bp to switch.
EDIT: Okay, macro time... use these mappings:
nmap <leader>[ :Ex<CR>k<CR>
nmap <leader>] :Ex<CR>j<CR>
Note that this kind of depends on <CR> mapping from netrw, so you can't use nnoremap.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With