view runtime/doc/pi_spec.txt @ 34548:db67c09ccd53 v9.1.0175

patch 9.1.0175: wrong window positions with 'winfix{width,height}' Commit: https://github.com/vim/vim/commit/5866bc3a0f54115d5982fdc09bdbe4c45069265a Author: Sean Dewar <6256228+seandewar@users.noreply.github.com> Date: Wed Mar 13 20:17:24 2024 +0100 patch 9.1.0175: wrong window positions with 'winfix{width,height}' Problem: winframe functions incorrectly recompute window positions if the altframe wasn't adjacent to the closed frame, which is possible if adjacent windows had 'winfix{width,height}' set. Solution: recompute for windows within the parent of the altframe and closed frame. Skip this (as before) if the altframe was top/left, but only if adjacent to the closed frame, as positions won't change in that case. Also correct the return value documentation for win_screenpos. (Sean Dewar) The issue revealed itself after removing the win_comp_pos call below winframe_restore in win_splitmove. Similarly, wrong positions could result from windows closed in other tabpages, as win_free_mem uses winframe_remove (at least until it is entered later, where enter_tabpage calls win_comp_pos). NOTE: As win_comp_pos handles only curtab, it's possible via other means for positions in non-current tabpages to be wrong (e.g: after changing 'laststatus', 'showtabline', etc.). Given enter_tabpage recomputes it, maybe it's intentional as an optimization? Should probably be documented in win_screenpos then, but I won't address that here. closes: #14191 Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 13 Mar 2024 20:30:03 +0100
parents 4635e43f2c6f
children
line wrap: on
line source

*pi_spec.txt*   For Vim version 9.1.  Last change: 2006 Apr 24

by Gustavo Niemeyer ~

This is a filetype plugin to work with rpm spec files.

Currently, this Vim plugin allows you to easily update the %changelog
section in RPM spec files.  It will even create a section for you if it
doesn't exist yet.  If you've already inserted an entry today, it will
give you the opportunity to just add a new item in today's entry.  If you
don't provide a format string (|spec_chglog_format|), it'll ask you an
email address and build a format string by itself.

1. How to use it	|spec-how-to-use-it|
2. Customizing		|spec-customizing|

==============================================================================
1. How to use it				*spec-how-to-use-it*

The spec_chglog plugin provides a map like the following:

	:map <buffer> <LocalLeader>c <Plug>SpecChangelog

It means that you may run the plugin inside a spec file by pressing
your maplocalleader key (default is '\') plus 'c'.  If you do not have
|spec_chglog_format| set, the plugin will ask you for an email address
to use in this edit session.

Every time you run the plugin, it will check to see if the last entry in the
changelog has been written today and by you.  If the entry matches, it will
just insert a new changelog item, otherwise it will create a new changelog
entry.  If you are running with |spec_chglog_release_info| enabled, it will
also check if the name, version and release matches.  The plugin is smart
enough to ask you if it should update the package release, if you have not
done so.

Setting a map					*spec-setting-a-map*
-------------

As you should know, you can easily set a map to access any Vim command (or
anything, for that matter).  If you don't like the default map of
<LocalLeader>c, you may just set up your own key.  The following line
shows you how you could do this in your .vimrc file, mapping the plugin to
the <F5> key:

	au FileType spec map <buffer> <F5> <Plug>SpecChangelog

Note: the plugin will respect your desire to change the default mapping
      and won't set it.

This command will add a map only in the spec file buffers.


==============================================================================
2. Customizing					*spec-customizing*

The format string				*spec_chglog_format*
-----------------

You can easily customize how your spec file entry will look like.  To do
this just set the variable "spec_chglog_format" in your .vimrc file like
this: >

	let spec_chglog_format = "%a %b %d %Y My Name <my@email.com>"

Note that "%a %b %d %Y" is the most used time format.  If you don't provide
a format string, when you run the SpecChangelog command for the first
time, it will ask you an email address and build the |spec_chglog_format|
variable for you.  This way, you will only need to provide your email
address once.

To discover which format options you can use, take a look at the strftime()
function man page.

Where to insert new items			*spec_chglog_prepend*
-------------------------

The plugin will usually insert new %changelog entry items (note that it's
not the entry itself) after the existing ones.  If you set the
spec_chglog_prepend variable >

	let spec_chglog_prepend = 1

it will insert new items before the existing ones.

Inserting release info				*spec_chglog_release_info*
----------------------

If you want, the plugin may automatically insert release information
on each changelog entry.  One advantage of turning this feature on is
that it may control if the release has been updated after the last
change in the package or not.  If you have not updated the package
version or release, it will ask you if it should update the package
release for you.  To turn this feature on, just insert the following
code in your .vimrc: >

	let spec_chglog_release_info = 1

Then, the first item in your changelog entry will be something like: >

	+ name-1.0-1cl

If you don't like the release updating feature and don't want to answer
"No" each time it detects an old release, you may disable it with >

	let spec_chglog_never_increase_release = 1


Good luck!!

vim:tw=78:ts=8:noet:ft=help:norl: