2 years agoPYENV prompt. master
Iain Patterson [Sat, 8 May 2021 09:05:41 +0000 (11:05 +0200)]
PYENV prompt.

2 years agoFix short path in prompt.
Iain Patterson [Sat, 8 May 2021 08:45:44 +0000 (10:45 +0200)]
Fix short path in prompt.

2 years agoAdded git whereami alias.
Iain Patterson [Thu, 1 Aug 2019 15:20:47 +0000 (16:20 +0100)]
Added git whereami alias.

2 years agoSilently handle the case of no *.prompt files existing.
Iain Patterson [Tue, 20 Nov 2018 16:20:59 +0000 (16:20 +0000)]
Silently handle the case of no *.prompt files existing.

2 years agoSome ps1 state variables need wider scope.
Iain Patterson [Mon, 22 Oct 2018 12:31:43 +0000 (13:31 +0100)]
Some ps1 state variables need wider scope.

2 years agoAllow running multiple PROMPT_COMMAND snippets.
Iain Patterson [Mon, 22 Oct 2018 12:27:56 +0000 (13:27 +0100)]
Allow running multiple PROMPT_COMMAND snippets.

Files matching the  .prompt.d/*.prompt glob will be sourced before printing
the prompt.

5 years agoKubernetes stuff.
Iain Patterson [Fri, 11 May 2018 10:21:09 +0000 (10:21 +0000)]
Kubernetes stuff.

5 years agoSplit PS1 components into .ps1 files.
Iain Patterson [Sat, 12 May 2018 15:06:47 +0000 (16:06 +0100)]
Split PS1 components into .ps1 files.

6 years agoFix ktmux_helper for tmux 1.8 with run_shell -b.
Iain Patterson [Wed, 18 Jul 2012 07:46:17 +0000 (08:46 +0100)]
Fix ktmux_helper for tmux 1.8 with run_shell -b.

7 years agoBetter SSH completion.
Iain Patterson [Tue, 8 Apr 2014 13:05:40 +0000 (14:05 +0100)]
Better SSH completion.

Complete based on known hosts and DSH groups as well as explicit entries
in .ssh/hosts.

7 years agoEasier to read blue colour in terminals.
Iain Patterson [Wed, 18 May 2016 15:10:05 +0000 (16:10 +0100)]
Easier to read blue colour in terminals.

7 years agoFix missing slashes in short dir.
Iain Patterson [Fri, 20 May 2016 12:15:14 +0000 (13:15 +0100)]
Fix missing slashes in short dir.

7 years agoRead existing palette colour.
Iain Patterson [Wed, 18 May 2016 15:09:42 +0000 (16:09 +0100)]
Read existing palette colour.

7 years agoAllow overriding colours in uxrvt palette.
Iain Patterson [Wed, 18 May 2016 13:02:52 +0000 (14:02 +0100)]
Allow overriding colours in uxrvt palette.

7 years agoCopy became script to target directory.
Iain Patterson [Fri, 20 May 2016 15:45:28 +0000 (16:45 +0100)]
Copy became script to target directory.

Ensure the became script can be run when the source user's home
directory is not readable, by copying the script itself to the
target directory if the -D flag is used instead of -d.

7 years agoHandle case where become script is unreadable.
Iain Patterson [Tue, 26 Apr 2016 16:28:03 +0000 (17:28 +0100)]
Handle case where become script is unreadable.

If the profile directory is not accessible to the target user it won't
be possible to run became.

Use the -d flag to specify an alternative directory in which became can
be found.

7 years agoRestore environment variables when becoming.
Iain Patterson [Wed, 20 Apr 2016 14:36:02 +0000 (15:36 +0100)]
Restore environment variables when becoming.

Environment variables listed in .become/environment/user will be passed
to the sudo shell.

7 years agoThe relativenumber option was added in Vim 7.3 not 7.0.
Iain Patterson [Wed, 4 May 2016 08:59:27 +0000 (09:59 +0100)]
The relativenumber option was added in Vim 7.3 not 7.0.

7 years agoUse relativenumber if available.
Iain Patterson [Thu, 17 Mar 2016 12:31:10 +0000 (12:31 +0000)]
Use relativenumber if available.

7 years agoHandle the case where $HOME has a trailing slash.
Iain Patterson [Wed, 16 Mar 2016 10:04:34 +0000 (10:04 +0000)]
Handle the case where $HOME has a trailing slash.

$HOME should not have a trailing slash.  But if it does we would eat it
in __ps1_short() and leave an incorrect prompt.

7 years agoAdded missing speeddating autoload.
Iain Patterson [Wed, 24 Feb 2016 13:32:06 +0000 (13:32 +0000)]
Added missing speeddating autoload.

7 years agoAdded jdaddy plugin.
Iain Patterson [Fri, 12 Feb 2016 14:12:32 +0000 (14:12 +0000)]
Added jdaddy plugin.

7 years agoAdded ykutw plugin.
Iain Patterson [Fri, 12 Feb 2016 15:14:05 +0000 (15:14 +0000)]
Added ykutw plugin.

7 years agoUpdated characterize plugin.
Iain Patterson [Fri, 12 Feb 2016 14:04:23 +0000 (14:04 +0000)]
Updated characterize plugin.

7 years agoUpdated speeddating plugin.
Iain Patterson [Fri, 12 Feb 2016 13:58:48 +0000 (13:58 +0000)]
Updated speeddating plugin.

7 years agoFind urxvt256c silently.
Iain Patterson [Fri, 12 Feb 2016 09:31:33 +0000 (09:31 +0000)]
Find urxvt256c silently.

7 years agoUse 256-colour urxvt if available.
Iain Patterson [Fri, 11 Apr 2014 10:44:04 +0000 (11:44 +0100)]
Use 256-colour urxvt if available.

7 years agoUse Undotree instead of Gundo.
Iain Patterson [Tue, 9 Feb 2016 17:14:50 +0000 (17:14 +0000)]
Use Undotree instead of Gundo.

7 years agoUndotree plugin.
Iain Patterson [Tue, 9 Feb 2016 17:13:57 +0000 (17:13 +0000)]
Undotree plugin.

7 years agoUnexpand ~ in short prompt.
Iain Patterson [Tue, 2 Feb 2016 13:53:21 +0000 (13:53 +0000)]
Unexpand ~ in short prompt.

7 years agoSet PROMPT_DIRTRIM dynamically.
Iain Patterson [Tue, 2 Feb 2016 10:59:11 +0000 (10:59 +0000)]
Set PROMPT_DIRTRIM dynamically.

Unless PROMPT_DIRTRIM is explicitly set to 0, force trimming if the
length of the prompt is guesstimated to be more than 2/3 of the
available terminal width.

7 years agoRespect PROMPT_DIRTRIM with some enhancements.
Iain Patterson [Tue, 2 Feb 2016 10:44:29 +0000 (10:44 +0000)]
Respect PROMPT_DIRTRIM with some enhancements.

Shorten the path in the prompt when PROMPT_DIRTRIM is set but do so by
truncating components lower in the path rather than replacing them with

7 years agoSlightly less vibrant standout colour in the pager.
Iain Patterson [Mon, 4 Jan 2016 15:31:41 +0000 (15:31 +0000)]
Slightly less vibrant standout colour in the pager.

7 years agoAdd some less options.
Iain Patterson [Mon, 4 Jan 2016 12:11:51 +0000 (12:11 +0000)]
Add some less options.

-A: Restore pre-441 behaviour of searching from the cursor line.
-W: Highlight scrolled lines.
-Q: Don't ring the bell.
-X: Don't initialise the terminal, so it isn't cleared.
-d: Suppress dumb terminal message.
-i: Case-insensitive search.
-m: Slightly more verbose prompt.

7 years agoFixed close indent marker.
Iain Patterson [Wed, 2 Dec 2015 12:06:11 +0000 (12:06 +0000)]
Fixed close indent marker.

7 years agoSave path to .bash_profile in PROFILE_RC variable.
Iain Patterson [Wed, 2 Dec 2015 11:53:42 +0000 (11:53 +0000)]
Save path to .bash_profile in PROFILE_RC variable.

Use PROFILE_RC to source the profile again if needed.

7 years agoEnsure the CWD precedes PROFILE_HOME in new CDPATH.
Iain Patterson [Tue, 2 Dec 2014 13:48:39 +0000 (13:48 +0000)]
Ensure the CWD precedes PROFILE_HOME in new CDPATH.

If CDPATH was set to PROFILE_HOME, as was the case when becoming a user
with no default CDPATH, we would end up in the unexpected situation of
typing, say, "cd .ssh" from the target user's home directory but
actually changing to the profile user's .ssh directory.

The new logic for CDPATH is as follows:

Do nothing if CDPATH already contains PROFILE_HOME.
Otherwise set it to . if empty then unconditionally append PROFILE_HOME.

7 years agoTry to line up tab header with columns.
Iain Patterson [Thu, 6 Nov 2014 12:06:21 +0000 (12:06 +0000)]
Try to line up tab header with columns.

Set the tab header to match numberwidth.  Extend it if signs are active.
Extend it further when in diff mode.  Note that it isn't easy (if
possible at all) to determine if a window in the leftmost column has
these settings so the width may not always be correct.

7 years agoAdd PROFILE_HOME to CDPATH.
Iain Patterson [Mon, 2 Jun 2014 09:25:17 +0000 (10:25 +0100)]

Append PROFILE_HOME to CDPATH so we can easily cd to it having become
another user.

7 years agoShow number of background jobs in the prompt.
Iain Patterson [Wed, 21 Oct 2015 12:34:06 +0000 (13:34 +0100)]
Show number of background jobs in the prompt.

If __ps1_bg is set to 1, show any background jobs in square brackets.
The format is either [r/t] or [t] where r is the number of running jobs
and t is the total number of running and stopped jobs.  The shorter
format is used when all background jobs are running.
Nothing will be shown when no background jobs are being managed by the

8 years agoFixed Pentadactyl with uBlock Origin popup.
Iain Patterson [Mon, 3 Aug 2015 10:05:43 +0000 (11:05 +0100)]
Fixed Pentadactyl with uBlock Origin popup.

Clicking the uBlock icon does not open the popup window if the
navigation bar is disabled.  Pentadactyl custom CSS can force it to be

8 years agoFixed Pentadactyl with vertical tabs.
Iain Patterson [Fri, 19 Jun 2015 09:48:48 +0000 (10:48 +0100)]
Fixed Pentadactyl with vertical tabs.

Way back in commit c245702041670b927f11bb7bf61d99f2fdc9e6e7 Pentadactly
broke vertical tabs, such as those in Tab Kit 2nd edition, by explicitly
adding CSS to set the maximum height for the tab bar:

    [dactyl-australis=true] .tabbrowser-tabs {
        min-height: 0 !important;
        max-height: 24px !important;

Rather than recompile Pentadactyl each time we can fix that with a line
of custom CSS in .pentadactylrc.

8 years agoTypo in git-commit-tree.
Iain Patterson [Wed, 25 Feb 2015 13:13:38 +0000 (13:13 +0000)]
Typo in git-commit-tree.

8 years agoEnable a background highlight for the prompt.
Iain Patterson [Fri, 20 Feb 2015 15:37:55 +0000 (15:37 +0000)]
Enable a background highlight for the prompt.

When __ps1_background is 1, set the background colour for the prompt
according to the value of PROMPT_BACKGROUND_COLOUR.

Use "prompt show background" or "prompt hide background" to control
__ps1_background and hence the highlighting.

8 years agoFixed regression in previous commit.
Iain Patterson [Wed, 4 Feb 2015 10:23:24 +0000 (10:23 +0000)]
Fixed regression in previous commit.

The check for canonoicalising the profile path inadvertently stopped it
working when sourced from the current directory.

8 years agoFixed setting PROFILE_HOME when sourcing from relative path.
Iain Patterson [Wed, 4 Feb 2015 10:11:11 +0000 (10:11 +0000)]
Fixed setting PROFILE_HOME when sourcing from relative path.

If .bash_profile was sourced from a relative path, eg ". profile/.rc",
PROFILE_HOME would not be canonicalised, resulting in many things
breaking when not run from the same directory the profile was initially
sourced from.

8 years agoAvoid bash 4 code.
Iain Patterson [Mon, 2 Feb 2015 16:51:41 +0000 (16:51 +0000)]
Avoid bash 4 code.

Before bash 4 we can't use ^^ or ,, to transform to upper or lowercase.
Use tr instead.

8 years agoSet author/committer name/email from dotfiles.
Iain Patterson [Tue, 6 Jan 2015 10:25:15 +0000 (10:25 +0000)]
Set author/committer name/email from dotfiles.

Read author name from .git_author_name and author email from
.git_author_email.  Read committer name and email from
.git_commiter_name and .git_committer_email.

Fall back to author name/email if committer name/email is undefined.

Look in HOME first then PROFILE_HOME, unlike many other profile scripts
which override settings in HOME with PROFILE_HOME.

8 years agoExport SCREENRC in become.
Iain Patterson [Tue, 2 Dec 2014 13:25:37 +0000 (13:25 +0000)]
Export SCREENRC in become.

Set SCREENRC in the environment so screen will be configured
appropriately when run under sudo.

8 years agoSave path to .profile.d in PROFILE_D variable.
Iain Patterson [Fri, 20 Jun 2014 09:34:38 +0000 (10:34 +0100)]
Save path to .profile.d in PROFILE_D variable.

Make PROFILE_D similar to PROFILE_HOME with the differences that it is
unconditionally set (PROFILE_HOME is unset if it is the same as HOME)
and never exported (PROFILE_HOME is exported under become).

8 years agoFixed symlink path leakage.
Iain Patterson [Wed, 29 Oct 2014 14:37:10 +0000 (14:37 +0000)]
Fixed symlink path leakage.

The .fonts.conf symlink was incorrectly pointing to a fully-qualified
path, making it unsuitable for use in the general case.

8 years agoShortcut .rc file.
Iain Patterson [Mon, 6 Oct 2014 10:04:05 +0000 (11:04 +0100)]
Shortcut .rc file.

Because typing ". /profile/path/.bash_profile" is too time-consuming.

9 years agoShortcut to setting PROFILE_HOME.
Iain Patterson [Fri, 26 Sep 2014 08:39:59 +0000 (09:39 +0100)]
Shortcut to setting PROFILE_HOME.

Allow sourcing .bash_profile directly to set up PROFILE_HOME.

A user can now simply run ``. /profile/path/.bash_profile'' instead of
``PROFILE_HOME=/profile/path; .  $PROFILE_HOME/.bash_profile'' to use
these scripts.

9 years agoColours for PS2 and PS4.
Iain Patterson [Tue, 24 Jun 2014 12:52:56 +0000 (13:52 +0100)]
Colours for PS2 and PS4.

9 years agoShow expandtab in the statusline.
Iain Patterson [Fri, 20 Jun 2014 10:02:27 +0000 (11:02 +0100)]
Show expandtab in the statusline.

If expandtab is unset, which is the default with this .vimrc, show a
hard tab indicator after the tab width in the statusline.

9 years agoDifferent Unicode tab indicator.
Iain Patterson [Fri, 20 Jun 2014 10:01:37 +0000 (11:01 +0100)]
Different Unicode tab indicator.

Use RIGHTWARDS ARROW TO BAR in listchars to indicate tabs.

9 years agoLess convoluted rtp setting.
Iain Patterson [Fri, 16 May 2014 10:16:50 +0000 (11:16 +0100)]
Less convoluted rtp setting.

We can add to rtp with += rather than escaping out VIMRUNTIME.

9 years agoLook in HOME then PROFILE_HOME for .become files.
Iain Patterson [Fri, 9 May 2014 11:01:15 +0000 (12:01 +0100)]
Look in HOME then PROFILE_HOME for .become files.

Propagate per-user profile files scripts by looking in $HOME/.become
then $PROFILE_HOME/.become for the <user> and "all" files.

If you explicitly don't want to include files from PROFILE_HOME, eg
because you are using another user's profile but he has incompatible
scripts, make $HOME/.become/all sticky.

9 years agoExport PROFILE_HOME.
Iain Patterson [Fri, 9 May 2014 11:00:31 +0000 (12:00 +0100)]

Export PROFILE_HOME in the environment so that become can be run from
became without losing settings.

9 years agoRework changing pane titles.
Iain Patterson [Thu, 10 Apr 2014 16:01:57 +0000 (17:01 +0100)]
Rework changing pane titles.

If PROMPT_COMMAND is set to something which tries to change a window's
title, tmux would happily override the user-supplied pane name even
though set-titles is set to off.

Setting allow-rename to off prevents titles from being set to annoying
stuff like "[root@localhost ~]#" when becoming root on a Red Hat

Previously "automatic-rename = off" was commented out because
allow-rename overrode it.  Having an automatic name based on the current
process is acceptable in case where no explicit title has been set, so
we now set it on.

9 years agoTypo.
Iain Patterson [Thu, 8 May 2014 10:37:28 +0000 (11:37 +0100)]

9 years agoStrip non-numerics from tmux version.
Iain Patterson [Tue, 1 Apr 2014 10:12:23 +0000 (11:12 +0100)]
Strip non-numerics from tmux version.

Version 1.9a was causing the major/minor comparison to barf.

9 years agoNicer space marker.
Iain Patterson [Sat, 1 Mar 2014 12:19:54 +0000 (12:19 +0000)]
Nicer space marker.

9 years agoTypo.
Iain Patterson [Fri, 28 Feb 2014 11:50:43 +0000 (11:50 +0000)]

9 years agoShow Space plugin information in the statusline.
Iain Patterson [Wed, 26 Feb 2014 10:54:42 +0000 (10:54 +0000)]
Show Space plugin information in the statusline.

The Space plugin supplies a function which prints the action performed
by the spacebar.  We now include its output in the statusline along with
the search direction marker.

9 years agoSet tab width with a function.
Iain Patterson [Wed, 26 Feb 2014 10:54:38 +0000 (10:54 +0000)]
Set tab width with a function.

Use the new Tab_Width() function to set tabstop and shiftwidth rather
than calling set for each.

9 years agoMore specific Mapping().
Iain Patterson [Wed, 26 Feb 2014 10:54:35 +0000 (10:54 +0000)]
More specific Mapping().

Add an extra argument to Mapping() to define the specific modes which it
should affect.

9 years agoUse silent mappings where possible.
Iain Patterson [Wed, 26 Feb 2014 10:54:30 +0000 (10:54 +0000)]
Use silent mappings where possible.

The Mapping() function was being called with ":<CR>" appended to every
mapping so that executing the mapping would not leave the expanded
command in the ruler.

On Vim 6 and later the correct way to execute the mapping discreetly is
to use <silent> and even on Vim 5 it is more appropriate to append the
":<CR>" within the Mapping() function.

9 years agoSet shiftwidth and tabstop together.
Iain Patterson [Wed, 26 Feb 2014 10:54:19 +0000 (10:54 +0000)]
Set shiftwidth and tabstop together.

When using <Leader>{n} to set a tabstop of {n} columns also set the

9 years agoSpace plugin.
Iain Patterson [Fri, 7 Feb 2014 17:05:25 +0000 (17:05 +0000)]
Space plugin.

9 years agoCharacterize plugin.
Iain Patterson [Fri, 7 Feb 2014 16:58:37 +0000 (16:58 +0000)]
Characterize plugin.

9 years agoRecovery plugin.
Iain Patterson [Thu, 6 Feb 2014 14:43:30 +0000 (14:43 +0000)]
Recovery plugin.

9 years agoNarrowRegion plugin.
Iain Patterson [Thu, 6 Feb 2014 14:16:41 +0000 (14:16 +0000)]
NarrowRegion plugin.

9 years agoHighlight DOS format files in the statusline.
Iain Patterson [Wed, 5 Feb 2014 10:53:38 +0000 (10:53 +0000)]
Highlight DOS format files in the statusline.

Display a note in the statusline if the fileformat is not UNIX.

9 years agoMildly more readable statusline code.
Iain Patterson [Wed, 5 Feb 2014 10:50:09 +0000 (10:50 +0000)]
Mildly more readable statusline code.

Explain what the local variables are for and make it explicitly clear
when we are changing highlight group.

9 years agoTidy up Show_Encoding().
Iain Patterson [Wed, 5 Feb 2014 09:45:36 +0000 (09:45 +0000)]
Tidy up Show_Encoding().

Show the BOM indicator before the encoding name.  It was hard to make
out after, eg utf-16le.

Show a dot indicator before the encoding when no file is loaded, rather
than the encoding in brackets.

9 years agoFixed older versions parsing .vimrc
Iain Patterson [Mon, 10 Feb 2014 16:49:36 +0000 (16:49 +0000)]
Fixed older versions parsing .vimrc

Some mappings which were supposed to be applied only for version 6 or
later, and some variables which were supposed to be applied only for
version 7 or later, were incorrectly placed outside the relevant
if..endif block.

Vim 5 doesn't understand "set fdm=marker" in the header so mark it as a
vim6 snippet.

9 years agoVim 5 fixes.
Iain Patterson [Mon, 10 Feb 2014 16:48:10 +0000 (16:48 +0000)]
Vim 5 fixes.

Trying to set viminfo+=! fails on Vim 5 if viminfo doesn't already
contain a '{N} chunk.  Set it to the Vim 6+ default.

9 years agoUse help buffers in commit and merge scripts.
Iain Patterson [Thu, 6 Feb 2014 13:27:42 +0000 (13:27 +0000)]
Use help buffers in commit and merge scripts.

The previous attempt to override Vim 7.4's window closing paranoia
didn't work that well.  Closing the scratch buffer would result in
the commit message window being lost without saving changes.

The latest scheme is to mark the scratch buffer as a help buffer,
despite the documentation saying we aren't supposed to do that.
The result is that it will automatically be closed when it's the
last buffer standing, which is very close to what we want.

9 years agoAdded git pretty alias.
Iain Patterson [Fri, 7 Feb 2014 11:23:20 +0000 (11:23 +0000)]
Added git pretty alias.

Alias git pretty to print a nicer graph with colours.

9 years agoShow marks in the statusline.
Iain Patterson [Mon, 3 Feb 2014 13:36:48 +0000 (13:36 +0000)]
Show marks in the statusline.

All marks set for the current cursorline will be indicated in the
statusline, possibly using the Unicode symbols defined for signs.

9 years agoUnicode completion plugin.
Iain Patterson [Mon, 3 Feb 2014 13:48:53 +0000 (13:48 +0000)]
Unicode completion plugin.

9 years agoShow file encoding in the statusline.
Iain Patterson [Fri, 31 Jan 2014 16:41:07 +0000 (16:41 +0000)]
Show file encoding in the statusline.

And BOM indicator if appropriate.

9 years agoShow search direction in the statusline.
Iain Patterson [Thu, 30 Jan 2014 10:53:39 +0000 (10:53 +0000)]
Show search direction in the statusline.

Show an up arrow indicator if v:searchforward is 0, indicating that the
last search was backwards.

9 years agoSeparate statusline colour for replace mode.
Iain Patterson [Thu, 30 Jan 2014 10:38:08 +0000 (10:38 +0000)]
Separate statusline colour for replace mode.

Use v:insertmode, if available, to highlight the statusline with a
slightly different colour when replacing as opposed to inserting.

9 years agoConfiguration options for gitv plugin.
Iain Patterson [Wed, 29 Jan 2014 14:54:16 +0000 (14:54 +0000)]
Configuration options for gitv plugin.

Open the view in horizontal mode if appropriate.
Tidy up windows on exit.

9 years agoDon't use cursor sign if cursorline is active.
Iain Patterson [Wed, 29 Jan 2014 13:36:52 +0000 (13:36 +0000)]
Don't use cursor sign if cursorline is active.

The sign is a poor relation as it isn't updated in real time.  Hide it
when cursorline is available.

9 years agoAlways use cursorline with a highlight.
Iain Patterson [Wed, 29 Jan 2014 13:25:33 +0000 (13:25 +0000)]
Always use cursorline with a highlight.

Use cursorline when CursorLineNr is supported, with no background
formatting on the line itself but a highlight in the number column.

9 years agoUpdate signs when the cursor is held.
Iain Patterson [Tue, 28 Jan 2014 18:18:36 +0000 (18:18 +0000)]
Update signs when the cursor is held.

Signs can be "out of date" if the cursor is held in editing mode.

9 years agoAdded cursor sign highlight.
Iain Patterson [Tue, 28 Jan 2014 18:15:18 +0000 (18:15 +0000)]
Added cursor sign highlight.

New, highest priority, sign to show the line with the cursor.

9 years agoSign precedence.
Iain Patterson [Tue, 28 Jan 2014 18:13:15 +0000 (18:13 +0000)]
Sign precedence.

Signs listed later take precedence because each sign is drawn over the
top of existing ones.  Rearrange the list such that more important signs
such as the last changed line appear later in the list and hence are
drawn later.

9 years agoMore readable sign initialisation code.
Iain Patterson [Tue, 28 Jan 2014 17:50:44 +0000 (17:50 +0000)]
More readable sign initialisation code.

Not much more, admittedly.

9 years agoMore incorrect uses of noremap.
Iain Patterson [Mon, 27 Jan 2014 16:59:04 +0000 (16:59 +0000)]
More incorrect uses of noremap.

Normal commands should be mapped with nnoremap not noremap.

9 years agoVim 7.4 won't let us quit windows from a script.
Iain Patterson [Mon, 27 Jan 2014 16:55:23 +0000 (16:55 +0000)]
Vim 7.4 won't let us quit windows from a script.

The Perforce and Subversion commit and merge scripts want to quit when
the commit message window has been closed, since the only other window
shown really should be the diff.

Vim 7.4's paranoia about scripts closing windows make quitting tricky...

9 years agoScript to get environment variables for a process.
Iain Patterson [Mon, 27 Jan 2014 14:40:23 +0000 (14:40 +0000)]
Script to get environment variables for a process.

Use "readenv <pid>" to get the full environment block for <pid>.
Use "readenv <pid> [<env> [<env> ...]]" to restrict output to the named

9 years agoScript to guess Red Hat machine's build date.
Iain Patterson [Mon, 27 Jan 2014 14:31:17 +0000 (14:31 +0000)]
Script to guess Red Hat machine's build date.

Querying RPM for the installation date of the basesystem package should
provide a decent approximation of the date the machine was (re)built.

9 years agoText formatter plugin.
Iain Patterson [Mon, 27 Jan 2014 14:01:04 +0000 (14:01 +0000)]
Text formatter plugin.

9 years agogitv plugin.
Iain Patterson [Mon, 27 Jan 2014 13:46:47 +0000 (13:46 +0000)]
gitv plugin.

9 years agoFugitive plugin.
Iain Patterson [Mon, 27 Jan 2014 13:50:31 +0000 (13:50 +0000)]
Fugitive plugin.

Git-related plugin for Vim.  Needed for gitv plugin.

9 years agoOverride "p4 diff" to handle change numbers.
Iain Patterson [Sat, 16 Apr 2011 11:43:00 +0000 (12:43 +0100)]
Override "p4 diff" to handle change numbers.

Wrapper around "p4 diff" which detects use of the -c flag and calls
p4-diffchange, thus enabling uses such as "p4 diff -c 12345" which will
show diffs only for files opened in changelist 12345.