1

scenario: I have a bunch of programs that generate output, the programs and output are open in buffers and the programs are one filetype eg .r and the output is another filetype eg .txt

I want to cycle thru buffers for a certain file type, e.g. the txt files. I want a shortcut I can press to immediately move to the next txt file in the bufferlist.

I am not sure why this doesn't work:

set wildchar=<Tab> wildmenu wildmode=full
map yy :b<space>*.txt<tab><tab><cr>

The error gVim gives: E93: More than one match for *.txt

I also tried removing other file types from the buffer list using nobl but as far as I can tell I can only remove them one at a time, I can't do, e.g. :set nobl *.r

I realize there are a lot of plugins e.g. fzf, SelectBuf, Editsimilar etc, but I'm doubtful any of them do what I want(?) and I feel there should be a simple solution. I don't want to use autocomplete or rifle thru a list. I just want to move to the next file using a shortcut. I am also aware of args but I am already restricting that list for another reason

related question: How can I keep a buffer list per window in Vim?

1 Answer 1

0

in the end i used this BufSel function here: Easier buffer switching

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.