-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output format #412
Comments
You can change output format by unite-filters. |
As I understood |
No. |
Any hints or small example, please? |
It is converter_file_directory in autoload/unite/filters/converter_file_directory.vim. It changes candidates' abbr. |
Like this? let s:filters = {
\ "name" : "my_converter",
\}
function! s:filters.filter(candidates, context)
for candidate in a:candidates
let bufname = bufname(candidate.action__buffer_nr)
let filename = fnamemodify(bufname, ':p:t')
let path = fnamemodify(bufname, ':p:h')
" Customize output format.
let candidate.abbr = printf("[%s] %s", filename, path)
endfor
return a:candidates
endfunction
call unite#define_filter(s:filters)
unlet s:filters
call unite#custom#source('buffer', 'converters', 'my_converter') |
Yes. |
Great! Thanks. |
@osyo-manga, after a year, your code is useful for me too! Just wanted to say thank you! |
Is it possible or is it planned to change the output format of the plugin.
Example:
Now I have each line like
<buffer number> <some flags> <path>/<filename> (<time>)
Is it possible to change this patter, for example, to
[<filename>] <path>
?Thanks,
The text was updated successfully, but these errors were encountered: