Pinnacle provides functions for manipulating :highlight
groups in Vimscript (eg. pinnacle#italicize
) and Lua (eg. require'wincent.pinnacle'.italicize()
).
To install Pinnacle, use your plug-in management system of choice.
If you don't have a "plug-in management system of choice", I recommend Pathogen (https://github.com/tpope/vim-pathogen) due to its simplicity and robustness. Assuming that you have Pathogen installed and configured, and that you want to install Pinnacle into ~/.vim/bundle
, you can do so with:
git clone https://github.com/wincent/pinnacle.git ~/.vim/bundle/pinnacle
Alternatively, if you use a Git submodule for each Vim plug-in, you could do the following after cd
-ing into the top-level of your Git superproject:
git submodule add https://github.com/wincent/pinnacle.git ~/vim/bundle/pinnacle
git submodule init
To generate help tags under Pathogen, you can do so from inside Vim with:
:call pathogen#helptags()
Replaces newlines with spaces.
Note that this function is not implemented in the Lua API, because it is required only for support on legacy Vim versions.
Runs a command and returns the captured output as a single line.
Useful when we don't want to let long lines on narrow windows produce unwanted embedded newlines.
Note that this function is not implemented in the Lua API, because it is required only for support on legacy Vim versions.
Gets the current value of a highlight group.
Extracts a highlight string from a group, recursively traversing linked groups, and returns a string suitable for passing to :highlight
.
Extracts just the bg portion of the specified highlight group.
Extracts just the bg portion of the specified highlight group.
Extracts a single component (eg. "bg", "fg", "italic" etc) from the specified highlight group.
Returns a dictionary representation of the specified highlight group.
Returns a string representation of a dictionary containing bg, fg, term, cterm and guiterm entries.
Returns an italicized copy of group
suitable for passing to :highlight
.
Returns a bold copy of group
suitable for passing to :highlight
.
Returns an underlined copy of group
suitable for passing to :highlight
.
Returns a copy of group
decorated with style
(eg. "bold", "italic" etc) suitable for passing to :highlight
.
To decorate with multiple styles, style
should be a comma-separated list.
Source code:
- https://github.com/wincent/pinnacle
- https://gitlab.com/wincent/pinnacle
- https://bitbucket.org/ghurrell/pinnacle
Official releases are listed at:
http://www.vim.org/scripts/script.php?script_id=5360
Copyright (c) 2016-present Greg Hurrell
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Patches can be sent via mail to [email protected], or as GitHub pull requests at: https://github.com/wincent/pinnacle/pulls
At the moment the release process is manual:
- Perform final sanity checks and manual testing
- Update the
pinnacle-history
section of the documentation - Verify clean work tree:
git status
- Tag the release:
git tag -s -m "$VERSION release" $VERSION
- Publish the code:
git push origin main --follow-tags
git push github main --follow-tags
- Produce the release archive:
git archive -o pinnacle-$VERSION.zip HEAD -- .
Pinnacle is written and maintained by Greg Hurrell <[email protected]>.
Other contributors that have submitted patches include (in alphabetical order):
- Cody Buell
- Khue Nguyen
- Kyle Poole
- Taught
pinnacle#decorate()
to accept a comma-separated list of styles. - Added alternative Lua-based API (eg.
require'wincent.pinnacle'.italicize()
is equivalent topinnacle#italicize()
etc); but note: - Removed functions that aren't needed in the Lua API:
pinnacle.extract_bg()
,pinnacle.capture_highlight()
,pinnacle.extract_component()
,pinnacle.extract_fg()
,pinnacle.extract_highlight()
, andpinnacle.highlight()
. Equivalent functionality can be obtained by using the convenience functions listed below, along withpinnacle.decorate()
andpinnacle.dump()
. - Added convenience functions for common operations to the Lua API:
pinnacle.bg()
,pinnacle.clear()
,pinnacle.fg()
,pinnacle.link()
,pinnacle.merge()
, andpinnacle.set()
. - Added utility functions to the Lua API:
pinnacle.adjust_lightness()
,pinnacle.brighten()
andpinnacle.darken()
.
- Added
pinnacle#dump()
.
- Fix another bug with augmentation of existing highlights.
- Added
pinnacle#extract_bg
andpinnacle#extract_fg
. - Fixed bug that could cause existing highlights to be incorrectly augmented.
- Added
pinnacle#underline
.
- Initial release.