/vim-utils

Vim utilities

Primary LanguageVim ScriptOtherNOASSERTION

vim-utils

The vim-utils plug-in is a collection of Vim scripts I use daily. While useful (at least to me), they are not extensive enough to justify their own repo. The collection will be added to (slowly) as these scripts are being transitioned from a previous repo while undergoing some refactoring and general clean-up

Installation

For ease of maintenance and updates, I recommend a plug-in manager such as Pathogen or Vundle.

There is also the option of using the native Vim 8 packages loading (see: :help packages).

Documentation

Documentation has been generated by vimdoc and is located in the doc directory.

Usage

Remaps: Search

These have been modified to keep the window view during searches at the specified percentage scroll (e.g. g:vim_utils_view_pct = 50 would keep the current cursor position at 50% of the total window size much like zz). Default is a comfortable 25% (g:vim_utils_view_pct = 25).

To modify, add this line to your ~/.vimrc:

let g:vim_utils_view_pct = <number>
Key / Motion Description
n Repeat latest / or ? search
N Repeat latest / or ? search
* Search forward for next occurrence of word
# Search backward for next occurrence of word

Remaps: Display

These remaps are only active during Normal mode.

Key / Motion Description
<F1> Toggle line numbers display (off, absolute, hybrid)
'' Toggle highlight of latest search
gp Visual select latest pasted text

Contact

If you have any questions, bug reports, enhancements, suggestions, or feedback, please open an issue or pull request on GitHub.