blob: bdfde9e61ba335bb5c813e52f4fde032f4e2ef28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# Buffer Bookmark Manager
Quickly store and recall buffers with F1-F4 keys.
Inspired by [ThePrimeagen/harpoon](https://github.com/ThePrimeagen/harpoon).
## Installation
Using vim-plug:
```vim
Plug 'mitjafelicijan/sniper.vim'
```
## Usage
- `Shift-F1` to store current buffer in slot 1
- `Shift-F2` to store current buffer in slot 2
- `Shift-F3` to store current buffer in slot 3
- `Shift-F4` to store current buffer in slot 4
- `F1` to recall buffer from slot 1
- `F2` to recall buffer from slot 2
- `F3` to recall buffer from slot 3
- `F4` to recall buffer from slot 4
- `F5` or `:SniperList` to view all stored buffers
## Available functions
- `sniper#StoreBuffer(BufferNumber)`
- `sniper#RecallBuffer(BufferNumber)`
- `sniper#ListBuffers()`
`BufferNumber` is a number between 1 and 4.
## Default key binds
```vim
nnoremap <silent> <S-F1> :call sniper#StoreBuffer(1)<CR>
nnoremap <silent> <S-F2> :call sniper#StoreBuffer(2)<CR>
nnoremap <silent> <S-F3> :call sniper#StoreBuffer(3)<CR>
nnoremap <silent> <S-F4> :call sniper#StoreBuffer(4)<CR>
nnoremap <silent> <F1> :call sniper#RecallBuffer(1)<CR>
nnoremap <silent> <F2> :call sniper#RecallBuffer(2)<CR>
nnoremap <silent> <F3> :call sniper#RecallBuffer(3)<CR>
nnoremap <silent> <F4> :call sniper#RecallBuffer(4)<CR>
nnoremap <silent> <F5> :call sniper#ListBuffers()<CR>
```
|