New answers tagged

0

Put this in your .vimrc for help to open in place of an unmodified empty buffer instead of alongside it: " Is a buffer an unmodified empty buffer fun! IsBufferEmptyAndUnmodified(which) return bufname(a:which) == '' && !getbufvar(a:which, "&modified") endfun " Close the last window if it contains an unmodified empty buffer ...


4

How can I keep that top bar always open? set showtabline=2 As stated in the help topic: The value of this option specifies when the line with tab page labels will be displayed: 0: never 1: only if there are at least two tab pages 2: always I also want to keep it because it helps me visualize which window is focused when more ...


2

Remove :botright as it does: :bo[tright] {cmd} Execute {cmd}. If it contains a command that splits a window, it will appear at the bottom and occupy the full width of the Vim window. When the split is vertical the window appears at the far right and occupies the full height of the Vim window. Doesn't work for |:...


0

The file that is associated with the currently executing autocommand can be retrieved with this function call: expand('<afile>') Somewhat contrived but easy to understand test... augroup AfileTest autocmd! autocmd BufWritePost * echom "I saved file " . expand('<afile>') augroup END After loading this and running :w the message ...


Top 50 recent answers are included