diff --git a/nvim.configlink/settings/custom.vim b/nvim.configlink/settings/custom.vim index 8495606..2d1aef9 100644 --- a/nvim.configlink/settings/custom.vim +++ b/nvim.configlink/settings/custom.vim @@ -75,11 +75,28 @@ nnoremap gp :Git push nnoremap gr :!gh repo view -w " Split window -nnoremap ws :vsplit +nnoremap wv :vsplit +nnoremap wh :split " Close all other splits nnoremap wm :only +" Zoom / Restore window. +" https://stackoverflow.com/a/26551079 +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() +nnoremap z :ZoomToggle + " Exit terminal mode (requires Alacritty escape) tnoremap @@ -91,9 +108,9 @@ nnoremap rp :Refresh :PlugInstall noremap ft :Fern . -drawer -width=35 -toggle= " Tabularize -nnoremap ta :Tabularize / -nnoremap t# :Tabularize /# -nnoremap t" :Tabularize /" +noremap ta :Tabularize / +noremap t# :Tabularize /# +noremap t" :Tabularize /" " Read todo comments nnoremap td /# \?TODO:\? diff --git a/nvim.configlink/settings/plugins.vim b/nvim.configlink/settings/plugins.vim index 679c1e9..592130e 100644 --- a/nvim.configlink/settings/plugins.vim +++ b/nvim.configlink/settings/plugins.vim @@ -29,6 +29,7 @@ Plug 'airblade/vim-rooter' " Change directory to git route Plug 'tpope/vim-fugitive' " Other git commands Plug 'machakann/vim-highlightedyank' " Highlight text when copied Plug 'itchyny/lightline.vim' " Status bar +Plug 'tpope/vim-eunuch' " File manipulation in Vim Plug 'tpope/vim-vinegar' " Fixes netrw file explorer Plug 'lambdalisue/fern.vim' " File explorer / project drawer Plug 'christoomey/vim-tmux-navigator' " Hotkeys for tmux panes diff --git a/nvim.configlink/settings/vimwiki.vim b/nvim.configlink/settings/vimwiki.vim index 8574ce9..b42b5ae 100644 --- a/nvim.configlink/settings/vimwiki.vim +++ b/nvim.configlink/settings/vimwiki.vim @@ -14,6 +14,7 @@ let g:vimwiki_key_mappings = \ 'all_maps': 1, \ 'mouse': 1, \ } -let g:vimwiki_auto_chdir = 1 " Set local dir to Wiki when open -let g:vimwiki_create_link = 0 " Don't automatically create new links -let g:vimwiki_listsyms = ' x' " Set checkbox symbol progression +let g:vimwiki_auto_chdir = 1 " Set local dir to Wiki when open +let g:vimwiki_create_link = 0 " Don't automatically create new links +let g:vimwiki_listsyms = ' x' " Set checkbox symbol progression +let g:vimwiki_table_mappings = 0 " VimWiki table keybinds interfere with tab completion