-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmini_harpoon.txt
85 lines (58 loc) · 2.8 KB
/
mini_harpoon.txt
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
" File: doc/mini_harpoon.txt
*mini_harpoon.txt*
How to install and use the mini-harpoon plugin.
1. Installation |mini-harpoon-installation|
2. Commands and Usage |mini-harpoon-commands|
3. Configuration |mini-harpoon-configuration|
4. License |mini-harpoon-license|
==============================================================================
1. Installation *mini-harpoon-installation*
To install mini-harpoon, you can use a Vim plugin manager such as vim-plug,
Vundle, or Pathogen. Here's how you can install using vim-plug:
1. Add the following line to your Vim configuration file (usually ~/.vimrc
or ~/.config/nvim/init.vim):
```vim
Plug 'YanivZalach/mini-harpoon'
```
2. Reload your Vim configuration or restart Vim.
3. Run the `:PlugInstall` command to install the plugin.
mini-harpoon will now be installed and ready to use.
==============================================================================
2. Commands and Usage *mini-harpoon-commands*
mini-harpoon provides the following commands:
- `SaveLocation`: Save the current cursor position for future navigation.
- `GoToLocation {index}`: Navigate to the location saved at the specified index.
- `OpenLocationFile`: Open the file containing the saved locations in a split window.
To save the current location, use the `:SaveLocation` command.
To navigate to a saved location, use the `:GoToLocation {index}` command.
To open the file containing the saved locations, use the `:OpenLocationFile` command.
==============================================================================
3. Configuration *mini-harpoon-configuration*
mini-harpoon can be configured with key mappings for ease of use:
- **Saving file with ease**:
```vim
" Adding Location to mini-harpoon
nnoremap <leader>ha :SaveLocation<CR>
```
- **Going to wanted location**:
```vim
" Going to location by index (start from 1 - easier with the keyboard)
nnoremap <leader>hg :GoToLocation<space>
```
- **Opening the editable file list**:
```vim
" Opening the file list
nnoremap <leader>hj :OpenLocationFile<CR>
```
- **Opening the first 4 locations**:
```vim
nnoremap <leader>h1 :GoToLocation 1<CR>
nnoremap <leader>h2 :GoToLocation 2<CR>
nnoremap <leader>h3 :GoToLocation 3<CR>
nnoremap <leader>h4 :GoToLocation 4<CR>
```
Customize these mappings according to your preferences.
==============================================================================
4. License *mini-harpoon-license*
mini-harpoon is distributed under the MIT License. See the LICENSE file for
details.