1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:30:05 +08:00

Add m c key binding (#4199)

This commit is contained in:
Wang Shidong 2021-04-11 22:41:15 +08:00 committed by GitHub
parent 07f82dfafd
commit 7364584d31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 13 deletions

View File

@ -6,6 +6,10 @@
" License: GPLv3
"=============================================================================
if exists('s:CMP')
finish
endif
let s:CMP = SpaceVim#api#import('vim#compatible')
function! SpaceVim#layers#tools#plugins() abort
@ -52,6 +56,7 @@ function! SpaceVim#layers#tools#config() abort
" bootmark key binding
nnoremap <silent> mm :<C-u>BookmarkToggle<Cr>
nnoremap <silent> mc :<C-u>BookmarkClear<Cr>
nnoremap <silent> mi :<C-u>BookmarkAnnotate<Cr>
nnoremap <silent> ma :<C-u>BookmarkShowAll<Cr>
nnoremap <silent> mn :<C-u>BookmarkNext<Cr>

View File

@ -2006,25 +2006,26 @@ Bookmarks manager is included in `tools` layer, to use following key bindings, y
```toml
[[layers]]
name = "tools"
name = "tools"
```
| Key Bindings | Descriptions |
| ------------ | ------------------------------- |
| `m a` | Show list of all bookmarks |
| `m c` | Clear all bookmarks |
| `m m` | Toggle bookmark in current line |
| `m n` | Jump to next bookmark |
| `m p` | Jump to previous bookmark |
| `m i` | Annotate bookmark |
| Key Bindings | Descriptions |
| ------------ | ------------------------------------ |
| `m a` | Show list of all bookmarks |
| `m c` | Removes bookmarks for current buffer |
| `m m` | Toggle bookmark in current line |
| `m n` | Jump to next bookmark |
| `m p` | Jump to previous bookmark |
| `m i` | Annotate bookmark |
As SpaceVim use above bookmarks mappings, so you cannot use `a`, `c`, `m`, `n`, `p` or `i` registers to mark current position, but other registers should work well.
If you really need to use these registers, you can map `<Leader> m` to `m` in your bootstrap function,
then you can use `a` registers via `<Leader> m a`.
As SpaceVim use above bookmarks mappings, so you cannot use `a`, `c`, `m`, `n`,
`p` or `i` registers to mark current position, but other registers should work well.
If you really need to use these registers, you can map `<Leader> m` to `m`
in your bootstrap function, then you can use `a` registers via `<Leader> m a`.
```viml
function! myspacevim#before() abort
nnoremap <silent><Leader>m m
nnoremap <silent><Leader>m m
endfunction
```