Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jiaxing Liu
spacemacs
Commits
da719adf
Commit
da719adf
authored
10 years ago
by
syl20bnr
Browse files
Options
Download
Email Patches
Plain Diff
Add evil-snipe layer variable evil-snipe-enable-alternate-f-and-t-behaviors
parent
07d668b6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
31 deletions
+51
-31
contrib/evil-snipe/README.md
contrib/evil-snipe/README.md
+23
-15
contrib/evil-snipe/config.el
contrib/evil-snipe/config.el
+16
-0
contrib/evil-snipe/packages.el
contrib/evil-snipe/packages.el
+12
-16
No files found.
contrib/evil-snipe/README.md
View file @
da719adf
...
...
@@ -19,7 +19,29 @@ The package [evil-snipe](https://github.com/hlissner/evil-snipe)
-
enables more efficient searches with
`f/F/t/T`
.
-
adds a new, more precise search with
`s/S`
### Improved f and t searches
`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`
```
elisp
(
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`
:
```
elisp
(
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).
...
...
@@ -40,20 +62,6 @@ 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)`
### Improved precision search
Now you can press
`s/S`
to search forward/backwards in the buffer with two chars.
This greatly improves the precision of the search and is much more useful than it
might sound at first.
## Install
To use this contribution add it to your
`~/.spacemacs`
```
elisp
(
setq-default
dotspacemacs-configuration-layers
'
(
evil-snipe
))
```
## Key bindings
TODO
This diff is collapsed.
Click to expand it.
contrib/evil-snipe/config.el
0 → 100644
View file @
da719adf
;;; config.el --- evil-snipe Layer configuration File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;; Variables
(
defvar
evil-snipe-enable-alternate-f-and-t-behaviors
nil
"if non nil f/F/t/T behaviors are replaced by evil-snipe behavior."
)
This diff is collapsed.
Click to expand it.
contrib/evil-snipe/packages.el
View file @
da719adf
...
...
@@ -2,24 +2,20 @@
"List of all packages to install and/or initialize. Built-in packages
which require an initialization must be listed explicitly in the list."
)
(
defvar
evil-snipe-excluded-packages
'
()
"List of packages to exclude."
)
(
defun
evil-snipe/init-evil-snipe
()
(
require
'evil-snipe
)
(
global-evil-snipe-mode
t
)
;; (
evil-snipe-
enable-sS)
(
evil-snipe-
replace-evil
)
;; or 'buffer, 'whole-visible or 'whole-buffer
(
setq
evil-snipe-s
cope
'whole-buffer
)
(
setq
evil-snipe-
repeat-scope
'whole-buffer
)
(
setq
evil-snipe-
scope
'whole-buffer
evil-snipe-
enable-highlight
t
evil-snipe-enable-incremental-highlight
t
evil-snipe-enable-half-cursor
nil
evil-snipe-s
how-prompt
nil
evil-snipe-
smart-case
t
)
(
setq
evil-snipe-enable-highlight
t
)
(
setq
evil-snipe-enable-incremental-highlight
t
)
(
setq
evil-snipe-enable-half-cursor
nil
)
(
setq
evil-snipe-show-prompt
nil
)
(
setq
evil-snipe-smart-case
t
)
)
(
defvar
evil-snipe-excluded-packages
'
()
"List of packages to exclude."
)
(
when
evil-snipe-enable-alternate-f-and-t-behaviors
(
evil-snipe-replace-evil
)
(
setq
evil-snipe-repeat-scope
'whole-buffer
)))
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment