@@ -6,11 +6,11 @@ A minimalist plugin to interact with CLIs of programming languages like `R` and
66
77This package aims to integrate with the usual vim workflow.
88The basic setup is to open, e.g., an ` R ` script and a nvim terminal running ` R ` in split view.
9- Now you can send arbitrary text from the script to the terminal with ` <leader>ts ` and a * motion* .
9+ Now you can send arbitrary text from the script to the terminal with ` <leader>ts ` and a * vim motion* .
1010
1111Additional shortcuts are
1212
13- * ` <leader>tf ` for focusing a terminal, e.g., I you use several at once.
13+ * ` <leader>tf ` for focusing a terminal, e.g., if you use several ` R ` instances at once.
1414* ` <leader>tr ` for re-sending the last code selection.
1515
1616## Installation
@@ -32,27 +32,27 @@ Here are some some shortcuts I would recommend for ease of use.
3232vim.opt.splitright = true
3333vim.opt.splitbelow = true
3434
35- -- alt + vim direction split navigation (normal mode)
35+ -- alt + " vim direction" split navigation (normal mode)
3636vim.keymap.set('n', '<M-h>', '<C-w>h', {noremap = true})
3737vim.keymap.set('n', '<M-j>', '<C-w>j', {noremap = true})
3838vim.keymap.set('n', '<M-k>', '<C-w>k', {noremap = true})
3939vim.keymap.set('n', '<M-l>', '<C-w>l', {noremap = true})
4040
41- -- alt + vim direction split navigation (insert and terminal mode)
41+ -- alt + " vim direction" split navigation (insert and terminal mode)
4242vim.keymap.set({'i', 't'}, '<M-h>', '<C-\\><C-n><C-w>h', {noremap = true})
4343vim.keymap.set({'i', 't'}, '<M-j>', '<C-\\><C-n><C-w>j', {noremap = true})
4444vim.keymap.set({'i', 't'}, '<M-k>', '<C-\\><C-n><C-w>k', {noremap = true})
4545vim.keymap.set({'i', 't'}, '<M-l>', '<C-\\><C-n><C-w>l', {noremap = true})
4646
47- -- terminal vi mode -> normal mode
47+ -- ctrl + esc for terminal mode -> normal mode
4848vim.keymap.set('t', '<C-esc>', '<C-\\><C-n>', {noremap = true})
4949
50- -- open terminal
50+ -- open terminal, stay on the script
5151vim.keymap.set('n', '<leader>tT', ':vsp<bar>vertical resize 85<bar>term<cr><C-w>h', {noremap = true})
5252
5353-- open terminal with R
5454vim.keymap.set('n', '<leader>tR', ':vsp<bar>vertical resize 85<bar>term<cr>:set syntax=r<cr>iR<cr><C-l><C-\\><C-n><C-w>h', {noremap = true})
5555
56- -- open terminal with Python
56+ -- open terminal with Python and poetry environment
5757vim.keymap.set('n', '<leader>tP', ':vsp<bar>vertical resize 85<bar>term<cr>:set syntax=python<cr>isource $(poetry env info --path)/bin/activate && python<cr><C-l><C-\\><C-n><C-w>h', {noremap = true})
5858```
0 commit comments