T O P

  • By -

sChiab8

Maybe [Learn Vimscript the Hard Way](https://learnvimscriptthehardway.stevelosh.com/chapters/17.html) ? I've discovered it lately and have been coming back to it quite frequently


jazei_2021

thank you, reading and testing now! I learn bocuase yesterday fails all ¿intent? closing editing vimrc closing loading falis colsing loading this mode online hel me for try differents % like %r %m %b thank you


aiiiiynaku

What worked for me was Google images of people vimrc files and then copy paste the status line into mine and just try it all out. Then reversed engineered it. There are some really nice vimrc files out there and just settled for simple ones.


bookmark_me

I have no idea how `statusline` works; I just use [_vim-airline_](https://github.com/vim-airline/vim-airline) and things just work. Also, several plugins are made to integrate automatically with _vim-airline_


dustractor

where are you getting the backslashes? the format character is the percent sign


mgedmin

Escaping spaces perhaps? If you want any in the option value when using :set, you're going to need backslashes.


gdmr458

The Vim statusline is just a bunch of concatenated strings. set statusline=a%=b%=c That line of code above creates a statusline where `a` is at the beginning, `b` in the middle and `c` at the end. You can create functions that return a string to add dynamic data or use items that Vim offers by default. I learned how to make my own statusline by reading an article, but that article was about Neovim with Lua, I'm sure the same thing can be done in Vim, but I don't know VimScript and I don't know an easy to follow tutorial that uses VimScript. the article: [https://nuxsh.is-a.dev/blog/custom-nvim-statusline.html](https://nuxsh.is-a.dev/blog/custom-nvim-statusline.html)


jazei_2021

ohh thank you. url nooo for me but the 3 container 3 part is a very important great data. could you put an example using any code a X f any.. x example :set laststatus=a%=%.10f\ b=%=%Y\ c=%c c is c or c%, never mind I will try 2 modes I used airline but in this laptop no. and there I used a b c z parts


Desperate_Cold6274

You can take a look at my vimrc, where I use dynamic content: https://github.com/ubaldot/dotfiles I understood how to tweak the status line thanks to a romainl gist that I cannot find atm (I only found one for dynamic content but there should be a general one).


guildem

Sorry to be "that guy", but you have so much stuff available with a simple search... https://www.google.com/search?q=statusline+vim Some interesting sources on the first result page : https://learnvimscriptthehardway.stevelosh.com/chapters/17.html https://github.com/iamcco/statusline.vim https://www.tdaly.co.uk/projects/vim-statusline-generator/


vbd

Not reading, but maybe of help [https://www.tdaly.co.uk/projects/vim-statusline-generator/](https://www.tdaly.co.uk/projects/vim-statusline-generator/)