let g:mapleader="," let g:maplocalleader="," " Zoom / Restore window. function! s:ToggleZoom() 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 function! s:TogglePrettier() if g:ale_fix_on_save == 0 let g:ale_fix_on_save = 1 echomsg "Prettier fixing is now enabled!" else let g:ale_fix_on_save = 0 echomsg "Prettier fixing is now disabled!" endif endfunction " shortcust for functions command! ToggleZoom call s:ToggleZoom() command! TogglePrettier call s:TogglePrettier() " zoomwindow nnoremap z :ToggleZoom " ale nnoremap e :ALENext nnoremap f :TogglePrettier " 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