Comments (6)
Ah okay. In my case I often use knitr child documents to break up analyses into modular chunks, so when I open one of them in a new buffer, I usually still want to run commands from them in the console.
In case anyone else finds it useful, here are a couple other init.vim
tweaks which make the terminals behave more like they did in vim-r + tmux:
" Use vim-bufkill to preserve splits when closing buffers
cabbrev bd :BD
map <C-w> :BD<cr>
" Automatically enter insert mode
autocmd BufWinEnter,WinEnter term://* startinsert
" Exclude from buffer list
autocmd TermOpen * set nobuflisted
from nvim-r.
After :bd
, the terminal becomes the only visible buffer. This is what I expected. If I split the window again (<c-w>s
) and open test.R
again, I can keep sending lines and other commands to the R buffer. If instead of splitting the window again, I quit R, then test.R
is displayed. I think this also is what is described by
:help :bd
If buffer [N] is the current buffer, another buffer will be displayed instead.
from nvim-r.
In that case, can you think of any work-around to preserve the split even after a buffer is closed?
I would much rather use the native Neovim terminal if possible, but the behavior of tmux with respect to the console is much more ideal: since the console was completely separate from Vim, :bd
could be used to close buffers, and switching between buffers did not including the terminal window like it does in Neovim.
from nvim-r.
Sorry, but I don't know how to do what you want. Currently, the terminal buffer is already started as a new buffer and not simply as a split of the script buffer. We have this in R/nvimbuffer.vim:
silent below right new
If you can found a sequence of Vim commands that does what you want, I can implement the procedure in the plugin. For example, to get the current behavior, the sequence of Normal mode commands is:
:below right new
:terminal R
If you can't get the desired behavior, you may want to open an issue in Neovim, requesting the new feature. But if indeed it is necessary to change Neovim, the change will not be trivial.
I like the way that Neovim terminal works, and I guess that if it was exactly like Tmux, Neovim developers would not have been motivated to develop it.
from nvim-r.
Thanks for the suggestions - I think perhaps I just need some more time to get used to working with the Neovim terminal.
Do you often use multiple buffers along-side of the R console? If so, are there any strategies that work well for you?
In the meantime, I found vim-bufkill which get's me most of the way to the behavior I am used to.
from nvim-r.
When I need to open another buffer, I almost always use :tabnew
because I prefer each buffer occupying the whole screen.
from nvim-r.
Related Issues (20)
- Regression: prompt with ANSI escape sequences HOT 6
- Autocomplete with non-loaded library HOT 5
- Nvim-R requires Tmux >=3.0 but 3.3a version installed HOT 6
- SendLineToR fails with error "unexpected numeric constant" HOT 3
- Fresh LunarVim install with Nvim-R exits with SIGABRT HOT 7
- `R_app`, `R_cmd` options are not respected in LunarVim HOT 7
- Large objects don't seem to be able to fill secondary lists with completions (<C-n><C-o>) HOT 5
- Autocomplete for function parameters stops working when R opens HOT 2
- `RQuarto()` should escape Windows path seperator before sending to R HOT 2
- Unknown function: nvim_set_option_value HOT 2
- No new features in Nvim-R
- Is it possible to change the indentation behavior after parenthesis to be the same as curly brace? HOT 3
- How to use Python in Quarto with Nvim-R HOT 3
- Announcement: stable and oldstable branches deleted
- Problem with roxygen commands HOT 4
- Error on keyword completion HOT 2
- Incorrect Rendering of Tufte Style Output in R Markdown Document HOT 5
- Nvimcom fails to install on FreeBSD HOT 5
- Cannot start R: nvimrserver not running HOT 5
- neovim 0.10 version startup issue HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-r.