let g:mapleader="," let g:maplocalleader="," " Zoom / Restore window. function! s:ZoomToggle() abort 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 command! ZoomToggle call s:ZoomToggle() " open new vertical split and change to split nnoremap \ vl nnoremap - sj " open a new split and edit the vimrc // easy sourcing vimrc nnoremap ve vl :e ~/.config/nvim/init.vim nnoremap vs :source ~/.config/nvim/init.vim " Opens an edit command with the path of the currently edited file filled in nnoremap o :e =expand("%:p:h") . "/" " Yank to clipboard with clipper -- see https://github.com/wincent/clipper nnoremap y :call system('nc localhost 8377', @0) " Find merge conflict markers nnoremap gf /\v^[<\|=>]{7}( .*\|$) " paste keeping indentation nnoremap p p`[v`]= " toggle wrapping nnoremap w :set wrap! wrap? " reload files when set autoread is active with F5 nnoremap r :checktime " zoomwindow nnoremap z :ZoomToggle