~yerinalexey/dotfiles

ref: 3bb7991839c26fe59674184fc6822f7477751f93 dotfiles/nvim/mappings.vim -rw-r--r-- 552 bytes
3bb79918Alexey Yerin river: decrease wob height 5 months ago
                                                                                
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
" Key mappings

" Strip whitespace
command! StripWhite
      \ let _s=@/    <Bar>
      \ %s/\s\+$//ge <Bar>
      \ let @/=_s    <Bar>
      \ noh

" Fix Y
nmap Y y$

" I don't want to play with you, Ex mode
nmap Q gqgq
xmap Q gq

" Clear highlighting
nmap <silent> <leader><leader> <Cmd>noh<cr>

" Copy to system clipboard
nmap <A-y> "+y
xmap <A-y> "+y

" Paste from system clipboard
nmap <A-p> "+p
cmap <A-p> <C-r>+
imap <A-p> <Cmd>norm "+p<cr><right>
xmap <A-p> <Cmd>norm "+p<cr><right>

" Toggle spell checking
nmap <leader>s <Cmd>setl spell!<cr>