安徽省属企业前2月利润总额同比增长57.1%
百度 这句话很厉害,我把你事情都给你公布了,蒋夫人承认我,蒋夫人对我管我是GENTLEMAN。
A terminal emulator within vim, eg created by :terminal or term_start()
163 questions
2
votes
1
answer
37
views
Prevent output of a shell command from staying in the terminal
Suppose we did something like:
launch vim with $ vim --clean
execute a shell command :!echo "hello"
After step 1, if we exit Vim the terminal will contain:
$ vim --clean
$
However after ...
1
vote
1
answer
86
views
Line numbers in terminal mode
I want to enable line numbers in terminal mode in Neovim.
I used the following snippet:
vim.api.nvim_create_autocmd("TermOpen", {
callback = function()
vim.opt_local.number = ...
0
votes
1
answer
15
views
nvim terminal nested nvim how to return focus to inner nvim
I use nvim and lazygit in the terminal, with the lazygit configuration file located at ~/.config/lazygit/config.yml.
The configuration is set as follows:
os:
edit: 'nvim {{filename}}'
editAtLine: '...
1
vote
1
answer
67
views
How to automatically close all Neovim terminal buffers, if any exists, before saving persistence.nvim sessions?
I use the plugin persistence.nvim to manage my Neovim sessions, which on exit are automatically saved in ~/.local/state/nvim/sessions. These sessions can be loaded with several commands, including :...
0
votes
1
answer
36
views
Vim embedded terminal prints '\0' as new line
I noticed that printing the '\0' character has no effect if the program that prints it is launched from Terminal, but it "prints" a new line if launched from Vim's embedded terminal. Example ...
1
vote
0
answers
35
views
Why can't I send `<C-@>` to terminal job?
In a regular bash terminal, I can send the <C-@> (null character) by Ctrl+Space. I can see that by invoking cat, and sending <C-@> yields:
^@
However, when I do this in Vim terminal, ...
1
vote
1
answer
174
views
Set cursor to a line instead of a block, in terminal insert mode?
In terminal insert mode, the cursor is a block while its a line in (regular) insert mode. I looked through :h guicursor and while it lists command-line insert mode, it doesn't say anything about ...
0
votes
1
answer
67
views
Switch terminal to "line mode" instead of "character mode"
In Neovim's default terminal emulator, every entered character gets sent immediately to a shell running in the background (instead of waiting until you press enter on an entire line). One consequence ...
1
vote
0
answers
36
views
Select coloured text in terminal-normal mode
Vim's :terminal buffers are incredibly useful. Sometimes, I run a command which produces coloured output, which highlights important information.
Is there a regex or some other method that I can use ...
1
vote
0
answers
29
views
How to distinguish between two different terminal exit statuses?
Consider the following example:
term_start(myprogram, {exit_cb: MyExitHandler})
def MyExitHandler()
if exit_status != 0
echom "Error!"
endif
enddef
The function MyExitHandler is ...
0
votes
1
answer
339
views
How can I show inline IPython plots?
I want to plot matplotlib figures inline in ipython in the (wezterm) terminal.
In the terminal proper this works:
However, in Neovim, it does not:
In this question I was told it's not possible for a ...
4
votes
1
answer
738
views
Show sixel images inside Vim terminal
I'm trying to get the img2sixel function to work from a terminal inside of the vim.
Outside of vim, the image ("Hey") appears inline as expected and wanted:
However, this does not work from ...
0
votes
0
answers
30
views
Is there an equivalent of system() for capturing commands outputs or programs running in terminal buffers?
I am aware that system() capture the output of shell commands.
I am wondering if there is a similar command for capturing the output of commands sent to other type of interpreters running in terminal ...
0
votes
1
answer
32
views
How to unlist a terminal buffer opened in a popup window?
I want to unlist a terminal buffer that I open in a popup window.
Here are my attempts:
var buf_no = term_start(&shell, {'term_name': 'foo', 'hidden': 1, 'term_finish': 'close'})
setbufvar(bufname(...
1
vote
1
answer
66
views
Ctrl+w Shift+n after :term does not start a normal window
In Vim, you can start the terminal by :term, and Ctrl+WShift+N allows you to treat the terminal window as a normal Vim window. I tried the same in NeoVim, but it does not work. Is it an expected ...