This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/contrib/evil-snipe
2015-02-27 22:06:52 -05:00
..
img Add evil-snipe layer 2015-02-27 21:40:50 -05:00
config.el Add evil-snipe layer variable evil-snipe-enable-alternate-f-and-t-behaviors 2015-02-27 22:06:52 -05:00
packages.el Add evil-snipe layer variable evil-snipe-enable-alternate-f-and-t-behaviors 2015-02-27 22:06:52 -05:00
README.md Add evil-snipe layer variable evil-snipe-enable-alternate-f-and-t-behaviors 2015-02-27 22:06:52 -05:00

evil-snipe contribution layer for Spacemacs

logo

Table of Contents

Description

The package evil-snipe

  • enables more efficient searches with f/F/t/T.
  • adds a new, more precise search with s/S

evil-snipe changes s/S behavior in order to search forward/backwards in the buffer with two chars.

Install

Layer

To use this contribution add it to your ~/.spacemacs

(setq-default dotspacemacs-configuration-layers '(evil-snipe))

Alternate behavior for f/F and t/T

This alternate behavior is disabled by default, to enable it set the layer variable evil-snipe-enable-alternate-f-and-t-behaviors to t:

(setq-default dotspacemacs-configuration-layers
  '(evil-snipe :variables evil-snipe-enable-alternate-f-and-t-behaviors t ))

Instead of repeating searches with ,/; you can just press f/t again to continue the search (F/T to go the opposite direction).

Evil-snipe also adds several scope options for searches (set evil-snipe-scope and evil-snipe-repeat-scope to one of these, the default value is buffer):

Value Description
buffer search in the rest of the buffer after the cursor (vim-sneak behavior)
line search in the current line after the cursor (vim-seek behavior)
visible search in the rest of the visible buffer only
whole-line same as line, but highlight matches on either side of cursor
whole-buffer same as buffer, but highlight all matches in buffer
whole-visible same as 'visible, but highlight all visible matches in buffer

If you do not want to replace the regular f/F/t/T behavior, just remove this line from evil-snipe/packages.el: (evil-snipe-replace-evil)

Key bindings

TODO