From 2cd1dea577939568632bbe5966bcc6ed5569c2dc Mon Sep 17 00:00:00 2001 From: doyle Date: Sun, 15 Oct 2023 20:19:15 +1100 Subject: [PATCH] Fix vim dispatch forwarding build script as argument to build script --- Internal/os_nvim_init.vim | 42 ++++++++++++++------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/Internal/os_nvim_init.vim b/Internal/os_nvim_init.vim index 5d88f4e..8c21470 100644 --- a/Internal/os_nvim_init.vim +++ b/Internal/os_nvim_init.vim @@ -1,5 +1,4 @@ -" Plugins -" ============================================================================== +" Plugins ========================================================================================== call plug#begin(stdpath('config') . '/plugged') " nerdtree provides a file tree explorer " vim-dispatch allows running async jobs in vim (i.e. builds in the background) @@ -51,16 +50,14 @@ call plug#begin(stdpath('config') . '/plugged') " lsp-zero end call plug#end() -" Lua Setup -" ============================================================================== +" Lua Setup ======================================================================================== lua <(leap-forward-to)') - vim.keymap.set({'n', 'x', 'o'}, 'F', '(leap-backward-to)') + vim.keymap.set({'n', 'x', 'o'}, 'r', '(leap-forward-to)') + vim.keymap.set({'n', 'x', 'o'}, 'R', '(leap-backward-to)') - -- LSP Setup - -- =========================================================================== + -- LSP Setup ===================================================================================== local lsp = require('lsp-zero') local devenver_root = vim.fn.getenv('devenver_root') lsp.preset('recommended') @@ -80,8 +77,7 @@ lua < :silent! let &guifont = substitute( @@ -344,8 +336,7 @@ nnoremap RemedyBGStopDebugging nnoremap RemedyBGAddBreakpointAtFile nnoremap RemedyBGRunToCursor -" FZF -" ============================================================================== +" FZF ============================================================================================== " Empty value to disable preview window altogether let g:fzf_preview_window = [] @@ -361,8 +352,7 @@ command! -nargs=* -bang FzfCustomRG call RipgrepFzf(, 0) command! -bang -nargs=? -complete=dir FzfCustomFiles \ call fzf#vim#files(, {'options': ['--layout=reverse', '--info=inline', '--preview', 'cat {}']}, 0) -" General Key Bindings -" ============================================================================== +" General Key Bindings ============================================================================= " FZF Bindings nnoremap h FzfHistory nnoremap f FzfCustomFiles @@ -414,15 +404,13 @@ nnoremap s :vs nnoremap :cn nnoremap :cp -" Vim Dispatch -" ============================================================================== +" Vim Dispatch ===================================================================================== let s:running_windows = has("win16") || has("win32") || has("win64") if s:running_windows - set makeprg=build - nnoremap :Make ./build.bat + set makeprg=./build.bat else " Set vim terminal to enter normal mode using escape like normal vim behaviour tnoremap - nnoremap :Make ./build.sh set makeprg=./build.sh endif +nnoremap :Make