Commit

Add README.md
Daniel Moch committed 4 years ago (Tree)

Diffstat

 README.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++

README.md (created)

1 +# VIM-SMARTSPLIT
2 +
3 +You're lazy. Let Vim decide your split directions.
4 +
5 +## Summary
6 +
7 +Yeah, you're aware of `split`/`vsplit`, `new`/`vnew` and the like. You
8 +use them because you have to, but you know there must be a better way.
9 +This is it.
10 +
11 +Vim, given it's old pedigree, tacitly assumes a standard terminal width
12 +of around 80 characters. In this environment it makes sense for Vim to
13 +assume any command that divides the current window should divide
14 +horizonally. But our monitors are often capable of more than twice the
15 +width of an old terminal, so this doesn't make sense any more.
16 +
17 +One sensible option, which this plugin adopts, is to make a best-guess
18 +at the width of the text displayed in the current window (see
19 +`'textwidth'`). Then operations should default to vertical if there is
20 +enough horizonal room to display two splits side-by-side.
21 +
22 +This plugin provides `:Help`, `:Split`, `:New`, and `:Buffer` commands
23 +to replace their lower-case counterparts. It also sets `'diffopt'` to
24 +split in either a horizontal or vertical direction, again depending on
25 +the horizontal space available.
26 +
27 +## Installation
28 +
29 +It's 2019, and the only sensible option for package management in Vim's
30 +built-in manager. If you've never used it before, here's the summary
31 +(adapted from `:help packages`).
32 +
33 +```
34 +cd .vim
35 +mkdir -p pack/foo/start
36 +cd pack/foo/start
37 +git clone https://git.danielmoch.com/vim-smartsplit.git
38 +```
39 +
40 +If you're stuck on an old version of Vim without support for packages,
41 +then I recommend using [Pathogen](https://github.com/tpope/vim-pathogen)
42 +to fill the gap, in which case the installation is the same.
43 +
44 +## Usage
45 +
46 +There aren't any tricks here. Just use `:Help`, `:Split`, `:Buffer`, and
47 +`:New` instead of their lower-case counterparts.
48 +
49 +## License
50 +
51 +This plugin is made available under the same license as Vim itself.
52 +
53 +## Contributing
54 +
55 +This plugin will never do anything more fancy than it already does, but
56 +the current maintainer is prone to stupid mistakes, so if you find any
57 +bugs feel free to submit patches via email to the address listed in
58 +`:help vim-smartsplit`.
59 +
60 +If you're unfamiliar with the Git email workflow, I recommend
61 +[git-send-mail.io](https://git-send-email.io/) as a good place to learn
62 +the basics.