Vim change titlebar to match file in tab - vim

If I open a file in vim, the titlebar displays the file and path of what I opened. Great. But if I open another tab, and switch to that new tab, the title bar never changes. Even if I completely change files, such as by doing :edit <newfile>, the title bar never changes.
I have set the status bar to correctly match the file that is open, however I would like the title bar to do the same. Its confusing sometimes seeing different information displayed at the top and bottom of my window. How can I set the title bar to display the new file that is currently displayed?

:set titlestring=%F seems to have fixed it for me. I guess this was a simple one
You can find more info with
:help titlestring

Related

How to switch between tabline and buffers view in vim airline?

I've been using vim-airline on vim-8.0 and it displays tabs in the tabline and when I mouse left-click (with mouse input enabled) on filename on the far right hand side of the tabline the view switches to buffers (if I have enabled the option: let g:airline#extensions#tabline#show_buffers = 1).
But so far I can't seem to find a way to get back to tab view again? This may just be a standard vim tab navigation issue as even with show_buffers disabled when I click on the right hand side of the tabline I get stuck with viewing just that file.
A solution using the mouse would be preferable but a vim command would be fine too.

How to refresh a file in vi without it moving to the viewing window to the top of the file?

I am sometimes frustrated by vi's ability to refresh files. Say I have a file open, call it afile.txt. Then I do :vsplit to split the file vertically.
I scroll down to the bottom of the file in the left pane. Then, I scroll down to the bottom of the file in the right pane.
My cursor is still in the right pane. Next, I want to refresh the file. So I do :e like a normal person would. The problem with that is, it always moves my view of the file in the left pane back to the top.
How do I refresh the file in vi without it moving the opposite pane back to the top?
Thanks.

Change tab bar width for pages in VIM

I usually work with a lot of pages at the same time in VIM, and some of them are less relevant than others. Is it possible to adjust the width of some tabs, like the "pin tab" feature in Chrome?
You could use the taboo.vim plugin to change a tab label. Once it's installed, run:
:TabooRename <tabname> " auto-adjusts the tab's width
You can also use the tabline option. This is more complicated, since you need a single expression that includes labels for all the open tabs. See setting-tabline for a complete example.
To move a tab to the beginning of the tab list use :tabmove 0.

Sublime text 3 open folder option not working

When I go to open the folder in Sublime Text 3 and open some folder, instead of creating a sidebar and opening the folder, it just opens a window with the name of the window set to the name of the folder. And the window will be empty! So, for example, I opened a folder called Shopping Cart tutorial. Instead of creating a sidebar and opening the folder, it will create a window with Shopping Cart Tutorial as the name of the window. Again, it will be empty, unless I open some file. Any ideas on how to fix that?
The issue you're seeing here is either that the side bar is not currently being told to be visible, or it's set to be visible but it has nothing to display.
The fix in the first instance is to select View > Side Bar > Show Side bar from the menu, select View: Toggle Side Bar from the command palette, or press Ctrl+KCtrl+B.
The visibility of the side bar is a window by window setting, so if you have this option turned off initially you'll have to perform this step in all current windows to get it to be visible everywhere. Once it's visible, the state is saved and will be used for new windows.
You may notice that this either has no effect, or the menu item in question isn't available and says Hide Side Bar instead. The reason for this is second item I mentioned above; it has nothing to display.
Sublime tries to be as minimal as possible with its UI Chrome so that there's as much room as possible for editing text. For that reason, it will hide the side bar if it thinks that it doesn't need it to be visible.
The side bar can display two things: the list of folders you have open/in your project and the list of files that are currently open. The display of currently open files is controlled by the View > Side Bar > Show Open Files menu item (or the associated toggle command in the command palette).
No matter what you do, the side bar will remain invisible if you have no folders or files open, so regardless of any setting a newly created window that has no folders open and no files open will always have no side bar.
If you turn on the option to show open files, the side bar will appear even in windows where there are no folders open, so long as there is a file open (even an unsaved new file).

GVim - How to hide / "undecorate" the top bar by default?

If we look at this post: How to hide the menu/tool bar of gvim? it shows us how to hide the menu and toolbar. What I want to do is to be able to hide the bar on the top (the bar which has the current files name on it - in the post I linked to, the bar says 'sponsor.txt' on it) by default when opening up Gvim. To do it manually, I have to right click the bar and click "Undecorate". Is there anyway for me to add an option on my .vimrc file which allows me to undecorate / hide it by default?

Resources