diff --git a/vim/.config/nvim/lua/mappings.lua b/vim/.config/nvim/lua/mappings.lua index e7863a5..2382bbf 100644 --- a/vim/.config/nvim/lua/mappings.lua +++ b/vim/.config/nvim/lua/mappings.lua @@ -1,7 +1,7 @@ local function map(mode, lhs, rhs, opts) local options = { noremap = true } if opts then options = vim.tbl_extend('force', options, opts) end - vim.api.nvim_set_keymap(mode, lhs, rhs, options) + vim.keymap.set(mode, lhs, rhs, options) end local function nmap(lhs, rhs, opts) @@ -69,8 +69,8 @@ nmap('gb',':Git blame') nmap('a', ':A') -- test -nmap('r', ':TestFile') -nmap('R', ':TestSuite') +nmap('r', function() os.execute("tmux send-keys -t '{down-of}' 'bundle exec rspec '" .. vim.fn.expand("%") .. " Enter") end) +nmap('R', function() os.execute("tmux send-keys -t '{down-of}' 'bundle exec rspec .' Enter") end) -- CtrlSF nmap('', 'CtrlSFPrompt') diff --git a/vim/.config/nvim/lua/plugins/init.lua b/vim/.config/nvim/lua/plugins/init.lua index 9d11024..283e433 100644 --- a/vim/.config/nvim/lua/plugins/init.lua +++ b/vim/.config/nvim/lua/plugins/init.lua @@ -85,10 +85,6 @@ packer.startup(function() use 'tpope/vim-rhubarb' use 'tpope/vim-repeat' - -- tests - use 'vim-test/vim-test' - use 'benmills/vimux' - -- TODO: find lua replacement / or learn :grep / cfdo use 'dyng/ctrlsf.vim'