2
0
mirror of https://github.com/webgefrickel/dotfiles synced 2024-11-19 03:25:33 +00:00
steffen-dotfiles/nvim/leaderkeys.vim

42 lines
1.0 KiB
VimL
Raw Normal View History

2017-12-26 12:00:00 +00:00
let g:mapleader=","
let g:maplocalleader=","
2018-03-14 09:39:04 +00:00
" Zoom / Restore window.
2019-01-17 17:25:50 +00:00
function! s:ToggleZoom() abort
2018-03-14 09:39:04 +00:00
if exists('t:zoomed') && t:zoomed
execute t:zoom_winrestcmd
let t:zoomed = 0
else
let t:zoom_winrestcmd = winrestcmd()
resize
vertical resize
let t:zoomed = 1
endif
endfunction
2019-01-17 17:25:50 +00:00
command! ToggleZoom call s:ToggleZoom()
nnoremap <leader>z :ToggleZoom<cr>
2019-01-17 17:25:50 +00:00
" open new vertical split and change to split
nnoremap <leader>\ <C-w>v<C-w>l
nnoremap <leader>- <C-w>s<C-w>j
" Opens an edit command with the path of the currently edited file filled in
nnoremap <leader>o :e <C-R>=expand("%:p:h") . "/" <cr>
" Yank to clipboard with clipper -- see https://github.com/wincent/clipper
nnoremap <leader>y :call system('nc localhost 8377', @0)<cr>
" Find merge conflict markers
nnoremap <leader>gf /\v^[<\|=>]{7}( .*\|$)<cr>
" toggle wrapping
nnoremap <leader>w :set wrap! wrap?<cr>
2017-05-30 10:08:18 +00:00
" reload files and redraw
nnoremap <leader>r :checktime<cr>:redraw!<cr>
2021-05-12 19:51:21 +00:00
" vim
nnoremap <Leader>ve :e $MYVIMRC<cr>
nnoremap <Leader>vr :source $MYVIMRC<cr>