vim-smartsplit : You're lazy. Let Vim decide your split directions.
script karma |
Rating 0/0,
Downloaded by 451 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Daniel Moch |
|
script type |
utility |
|
description |
Yeah, you're aware of split/vsplit, new/vnew and the like. You use them
because you have to, but you know there must be a better way. This is it.
Vim, given it's old pedigree, tacitly assumes a standard terminal width of
around 80 characters. In this environment it makes sense for Vim to assume any
command that divides the current window should divide horizonally. But our
monitors are often capable of more than twice the width of an old terminal, so
this doesn't make sense any more.
One sensible option, which this plugin adopts, is to make a best-guess at the
width of the text displayed in the current window (see 'textwidth'. Then
operations should default to vertical if there is enough horizonal room to
display two splits side-by-side.
This plugin provides :Help, :Split, :New, and :Buffer commands to replace
their lower-case counterparts. It also sets 'diffopt' to split in either a
horizontal or vertical direction, again depending on the horizontal space
available.
Only releases are made available at Vim.org. The latest source code is always available at https://github.com/djmoch/vim-smartsplit |
|
install details |
It's 2019, and the only sensible option for package management in Vim's
built-in manager. If you've never used it before, here's the summary
(adapted from :help packages).
cd .vim
mkdir -p pack/foo/start
cd pack/foo/start
unzip /tmp/vim-smartsplit.zip
If you're stuck on an old version of Vim without support for packages,
then I recommend using Pathogen (https://github.com/tpope/vim-pathogen)
to fill the gap, in which case the installation is the same. |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.191.103.248
|