JumpToTrailingWhitespace : Motions to locate unwanted whitespace at the end of lines.
script karma |
Rating 2/2,
Downloaded by 2050 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Ingo Karkat |
|
script type |
utility |
|
description |
DESCRIPTION
This plugin provides movement commands to quickly go to whitespace at the end
of each line. (Usually in order to remove it).
SEE ALSO
This plugin leverages the superior detection and customization facilities of
the companion ShowTrailingWhitespace.vim plugin (vimscript #3966), though it
can also be used without it if you're not interested in highlighting and
customizing.
Instead of jumping and deleting each occurrence manually, you can use the
companion DeleteTrailingWhitespace.vim (vimscript #3967) plugin to strip off
the trailing whitespace with one command, or even have this done automatically
on each write.
USAGE
]$ Go to [count] next occurrence of trailing whitespace.
[$ Go to [count] previous occurrence of trailing
whitespace.
Normal, operator-pending, and visual mode mappings are defined, even though
the latter two are typically less useful that the normal mode mappings. The
'wrapscan' setting applies. |
|
install details |
INSTALLATION
This script is packaged as a vimball. If you have the "gunzip" decompressor
in your PATH, simply edit the *.vmb.gz package in Vim; otherwise, decompress
the archive first, e.g. using WinZip. Inside Vim, install by sourcing the
vimball or via the :UseVimball command.
vim JumpToTrailingWhitespace*.vmb.gz
:so %
To uninstall, use the :RmVimball command.
DEPENDENCIES
- Requires Vim 7.0 or higher.
- Requires the CountJump plugin (vimscript #3130), version 1.70 or higher.
- The ShowTrailingWhitespace.vim plugin (vimscript #3966) complements this
script, but is not required. With it, the jumps consider the whitespace
exceptions for certain filetypes.
CONFIGURATION
For a permanent configuration, put the following commands into your vimrc:
To change the default mappings from ]$ to ]x, use:
let g:JumpToTrailingWhitespace_Mapping = 'x'
To also change the [ / ] prefix to something else, follow the instructions for
CountJump-remap-motions. (This requires CountJump 1.60.) |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.97.14.81
|