-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
How to show buffer number with filename? #58
Labels
Comments
let g:lightline = {
\ 'component': {
\ 'filename': '%n:%t'
\ }
\ } |
Thanks for the quick reply. I forgot to add that I'm using your sample setting with named components. What do I need to modify to add the buffer number?
|
function! MyFilename()
let fname = expand('%:t')
let nr = bufnr('')
return nr . ':' . (fname == 'ControlP' ? g:lightline.ctrlp_item :
\ ('' != MyReadonly() ? MyReadonly() . ' ' : '') .
\ ('' != fname ? fname : '[No Name]') .
\ ('' != MyModified() ? ' ' . MyModified() : ''))
endfunction |
Thanks! :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do I make lightline display buffer number together with filename e.g. 3:filename.txt in both active and inactive windows?
The text was updated successfully, but these errors were encountered: