2017-12-26 12:00:00 +00:00
|
|
|
let g:mapleader=","
|
|
|
|
let g:maplocalleader=","
|
2015-05-05 11:18:25 +00:00
|
|
|
|
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()
|
2020-10-04 10:58:09 +00:00
|
|
|
nnoremap <leader>z :ToggleZoom<cr>
|
2019-01-17 17:25:50 +00:00
|
|
|
|
2015-05-05 11:18:25 +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
|
2020-10-04 10:58:09 +00:00
|
|
|
nnoremap <leader>o :e <C-R>=expand("%:p:h") . "/" <cr>
|
2015-05-05 11:18:25 +00:00
|
|
|
|
|
|
|
" Yank to clipboard with clipper -- see https://github.com/wincent/clipper
|
2020-10-04 10:58:09 +00:00
|
|
|
nnoremap <leader>y :call system('nc localhost 8377', @0)<cr>
|
2015-05-05 11:18:25 +00:00
|
|
|
|
|
|
|
" Find merge conflict markers
|
2020-10-04 10:58:09 +00:00
|
|
|
nnoremap <leader>gf /\v^[<\|=>]{7}( .*\|$)<cr>
|
2016-12-19 21:31:29 +00:00
|
|
|
|
|
|
|
" toggle wrapping
|
2020-10-04 10:58:09 +00:00
|
|
|
nnoremap <leader>w :set wrap! wrap?<cr>
|
2017-05-30 10:08:18 +00:00
|
|
|
|
2020-10-04 10:58:09 +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>
|