Skip to main content

Questions tagged [terminal]

A terminal emulator (or terminal, for short) displays characters, colours, and the cursor on the screen. Vi & Vim are run inside of a terminal, gVim is not.

Filter by
Sorted by
Tagged with
0 votes
1 answer
9 views

How to make <C-CR> not sending 13;5u to the terminal (on Windows)?

On Windows if I hit Ctrl+Enter on a terminal emulation triggered by the :terminal command I get the 13;5u string and not the behavior of Ctrl+Enter Context: If I run ipython in a terminal, when I type ...
Vivian De Smedt's user avatar
0 votes
1 answer
35 views

How do I cleanly set highlight colors based on the number of terminal colors?

My standard terminals have 256 colours, but I regularly have to use 8-colour terminals as well. For the terminals with more than 8 colours, I prefer highlight Comment ctermfg=DarkGrey, but on an 8-...
cjs's user avatar
  • 367
1 vote
3 answers
38 views

How to get the last non-blank line of a terminal buffer running a specific program?

As per text. I have a terminal buffer running ipython and I want capture the last non-blank line. I tried the following: var bufnr = bufnr('IPYTHON') term_getline(bufnr, line('$')) term_getline(bufnr, ...
Barzi2001's user avatar
  • 640
0 votes
1 answer
26 views

Perplexing character: ^V in a terminal used by Neovim

Just found out or seen that a file opened is displaying: ^V in a terminal utilized by Neovim editor and it really is a single character! Proven by its distinct colorizing So wondering how can one ...
user17227456's user avatar
1 vote
1 answer
15 views

Paste and enter insert mode at the beginning of line, terminal bash Lunarvim

When editing a text file, p and I pastes what I copied and gets me to enter insert mode at the beginning of line. But in terminal (executed by term bash) this not works. p pastes somthing, but I or i ...
Crispy13's user avatar
  • 113
1 vote
0 answers
33 views

Is there an equivalent to tmux clear-history in vimterminal?

In tmux there is a command which clears any additional history that may have shown up in the buffer. Does vim have a similar function for clearing out a vim terminal?
leeand00's user avatar
  • 3,601
1 vote
0 answers
40 views

`term_start` fails to have `-m` option for shell like bash when using the shell path to invoke

I uses vim 9.1 shipped with bash 5.2.26(1)-release (x86_64-pc-msys) both installed by git-bash. :h terminal-use says :term will start one "terminal emulator" and ran the job. Then when I ...
An5Drama's user avatar
  • 125
0 votes
1 answer
33 views

Backspaces in script are not interpreted in playback

I recently learned of the -w option to record inputs. Trying to "play them back" with -s, it seems the playback doesn't perfectly reproduce the edits in at least one way backspaces, <80&...
Adam's user avatar
  • 103
1 vote
2 answers
100 views

delete using command in terminal mode of nvim

In terminal mode, commands like d or dd are not applicable for deleting texts. I think this would be useful since it is common to edit a command line. For example, if I open a terminal vim :term and ...
Iris's user avatar
  • 13
0 votes
1 answer
209 views

Conditional Key Mapping in Neovim Based on File Type

How can I do in nvim if the file type is js do this: vim.api.nvim_set_keymap('n', '<A-1>', [[:w | split term://node % <CR>]], { noremap = true, silent = true}) else if file type is lua do ...
user50451's user avatar
2 votes
1 answer
83 views

What is set_opfunc?

I'm configuring toggleterm.nvim, and in particular I'm putting this keybinding in my config file, as suggested by the plugin author here: -- Send motion to terminal vim.keymap.set("n", "...
robertspierre's user avatar
0 votes
0 answers
36 views

Where is my terminal?

I installed iron.nvim. I open two Python files with nvim m1.py m2.py. When I send over some lines to the REPL and then close the first buffer with :bd, I'm left with the terminal window. I go to the ...
robertspierre's user avatar
0 votes
0 answers
62 views

Why is the buffer being overwritten with the commands I use in normal mode?

I am using Alacritty terminal on MacOS and when I am type commands in Normal mode sometimes it writes them over the text. For example, when moving with l, it prints the l in an empty space it finds in ...
Miguel Cortes's user avatar
0 votes
0 answers
100 views

How do I allow higher function keys (F13-F24) in Vim?

My vim sessions use term=win32 and my F13-24 keys do not work, but they are permitted I believe from checking :help t_ku. I've gained shallow insight on how to connect vim keycodes to term keys via &...
Kasz's user avatar
  • 1
0 votes
0 answers
33 views

Termdebug won't show messages back from openocd

I am working with a microcontroller (stm32f4) and I am attempting to debug it by connecting Termdebug to openocd. Everything works nicely with the exception that the messages sent back from openocd (...
Barzi2001's user avatar
  • 640
3 votes
1 answer
179 views

What are the differences between built-in terminals in Neovim and Vim?

AFAIK the main difference is that Vim has this :terminal feature as optional. Could you mention another other important differences?
sebelk's user avatar
  • 335
1 vote
1 answer
54 views

Can I map Alt+j without mapping Escape followed by j to the same thing?

If in insert mode I do Ctrl+v and then press Alt+j, I see ^[j inserted, with ^[ being actually a single character. That's the same I get if I press Escape followed by j instead of Alt+j. I've known ...
Enlico's user avatar
  • 2,224
1 vote
1 answer
73 views

Run "+normal <leader>?" when starting vim on the command line

Context vimrc: maps <leader> to , maps ',?' to an action From a terminal, vim '+normal ,?' runs the action just fine. Problem Run the same terminal command without hardcoding the character ...
David Andreoletti's user avatar
1 vote
1 answer
97 views

How to start Neovim terminal in full window?

I know the equivalent command in Vim is: :terminal ++curwin How do I do the same thing in Neovim?
Homo Antiquum's user avatar
1 vote
0 answers
75 views

How can I handle whitespace of the path with nvim_buf_get_name?

I am using Neovim and I use this code to get the full path of the current file. local currnetPath=vim.api.nvim_buf_get_name(0) I want to use this variable for opening the current HTML file, so I need ...
mohamadi_arch's user avatar
0 votes
0 answers
175 views

How to automatically close a terminal popup window if a python script run in it didn't return any error?

I am wondering if there is a way to automatically close a popup window running a terminal if the execution of the last program didn't report any error and to keep it open if the execution of the last ...
Barzi2001's user avatar
  • 640
1 vote
2 answers
143 views

How can I disable the terminal statusline in gVim?

I want to disable the terminal statusline in gVim as it seems quite useless and I usually have the windows at a relatively small size when using gVim, so it takes up too much space. I've tried quite a ...
paradroid's user avatar
  • 377
0 votes
0 answers
90 views

How to set TMUX window using set title option?

In neovim source code title option is set as follows at https://github.com/neovim/neovim/blob/73c7a0d58e6358d35fe2d5a11b3e807a625a0001/src/nvim/tui/tui.c#L1460 : void tui_set_title(TUIData *tui, ...
KamilCuk's user avatar
  • 265
1 vote
1 answer
85 views

Text shifts one character to the left when moving upwards

When I move the cursor upwards, the whole line (including the number) shifts one character to the left. The GIF explains it the best. I'm using Neovim installed in Windows but opened through WSL ...
vvenk's user avatar
  • 33
2 votes
2 answers
352 views

See Last Commands Output from the Terminal Buffer

Lets say I run the external very_long_taking_command like this: :!very_long_taking_command and I get the output in this Vim Terminal where it says "Press ENTER or type command to continue". ...
Bog's user avatar
  • 509
0 votes
1 answer
31 views

rightbelow not exhibiting the correct behavior

I am not seeing the correct behavior when I use the rightbelow command. If I run :vertical term then a terminal opens in a vertical split (terminal on the left, existing pane on the right), but the ...
Tyler Durden's user avatar
  • 2,131
1 vote
1 answer
241 views

Making a shortcut for compiling in C

I've changed my code a million times and can't get it right. I want to compile the file I have open with whatever its name is minus the .c that comes after and I want to do it on a second terminal to ...
Baguaguy's user avatar
1 vote
2 answers
307 views

How can I make Neovim kill ongoing processes when I quit?

I'm setting up a nice development environment in Neovim. If I have a Docker container running inside a terminal in Neovim, I want that command to exit when I quit Neovim with :qall. Currently, I can ...
tsvallender's user avatar
0 votes
0 answers
82 views

How to change the terminal that launches Neovim?

When I double click a text file, the file is opened with Neovim in an xfce4-terminal. How to change xfce4-terminal to kitty? I tried to uninstall xfce4-terminal and then ln -s /usr/bin/kitty /usr/...
aj3423's user avatar
  • 199
0 votes
0 answers
48 views

Query terminal colors via OSC11

Is it possible to query the terminal colors via OSC-11 used in highlight groups? Similar to what is done here https://github.com/neovim/neovim/blob/5d8ab32f3871b0232972cac1116ac7cba98389e5/src/nvim/...
crawl_soever's user avatar
0 votes
1 answer
129 views

Can't use `:wqa` with open terminal buffers

I have next problem: When I use :term buffers the :wqa command produces error: Which is quite expected because terminal buffers isn't writable. BUT the :wa and :q separatly work. This is strange. To ...
Vladyslav Rehan's user avatar
1 vote
1 answer
399 views

How can I run a java file from a neovim terminal using a remap

For a bit of background, I'm trying to set up a function that runs a java file in Neovim, I've tried using the following autocmd: vim.api.nvim_create_autocmd( { "FileType" }, { ...
Nico Elbers's user avatar
0 votes
1 answer
262 views

How to make zsh detect if terminal session is run inside nvim's :term

I were following the Modern Vim book by Drew Neil. In tip 20 he writes: At a glance, you may not be able to tell whether a shell is running within a terminal buffer or outside of Neovim. In this tip, ...
Vladyslav Rehan's user avatar
0 votes
1 answer
99 views

How to set the terminal for shell in gvim

In gvim (started from WSL2), when I am executing a command, for example :! ls -lha the colors are not supported. Also when the :!man is executed, the following is reported: WARNING: terminal is not ...
John's user avatar
  • 33
0 votes
0 answers
69 views

Switch terminal emulators

I mainly use st terminal for its fast startup time compared to other terminals. However, sometimes, I find myself in need for better UTF-8 support and want to switch terminal emulator of currently ...
AvidSeeker's user avatar
1 vote
2 answers
181 views

Vim with terminal inside, I have to quit using a vim cmd as the terminal will prevent me from exiting, so I can't do :wq

Since I have a terminal inside vim I can't do :wq or I get 'job' running. I got around this using: vim --clean "+term" "+qa!" Then I'd have to do :w then :qa! In my ~/.vimrc I then ...
Nickotine's user avatar
  • 200
0 votes
1 answer
67 views

Is saving a terminal Vim split session possible?

I'm new to Vim I only know how to navigate and save sessions with :mksession so far but I'm unsure of how I could save my splits this is what my settup looks like. https://imgur.com/a/2BGkbSP One side ...
DudlyDog's user avatar
0 votes
1 answer
110 views

NeoVim - Interact with the thing that pop ups when you type in a command

Questions How can I type something in there? What even is the name of this thing? Problem If you type in for example :!echo 'Hello World' This kinda terminal thing pops up I want to interact with ...
Bog's user avatar
  • 509
1 vote
1 answer
466 views

What is the most convenient window splitting strategy for Vim users when using Terminal Multiplexer and Tiling Window Managers? [closed]

I use Vim/Neovim mostly inside Wezterm, with I3 as my window manager. Also all of them offer tabbed interface. Shortcuts to cycling through the different layers is difficult, even with ergonomic ...
Aviik's user avatar
  • 23
0 votes
3 answers
380 views

Switch focus to :terminal buffer

I am trying to recreate the functionality of the very old conque plugin via terminal in modern vim. So far I have found a few plugins that send code to a terminal buffer. However, these do not update ...
shabbychef's user avatar
0 votes
1 answer
48 views

Making certain buffers invisible to commands involving "all" or bufdo

For my projects I generally open several tabs some of which might involve terminals or directory trees or quickfix (since ShellCheck sends its error messages there for instance). When I want to use ...
Sina's user avatar
  • 115
1 vote
1 answer
32 views

How to use tmap with <Plug>?

I am wondering how shall I use tmap along with <Plug>. Here is a snippet of the context where I am using it: vim9script import autoload "../lib/foo.vim" noremap <unique> <...
Barzi2001's user avatar
  • 640
1 vote
0 answers
115 views

any idea how to change default location of .vimrc for droidvim on unrooted android ver.10?

I wonder if it is possible/how to change the .vimrc location to a different location (eg: my sync folder), so that i can back it up often and easily to manjaro pc using ssh or rsync. The original ...
andrew_ysk's user avatar
1 vote
1 answer
607 views

What does \_. means in Vim?

what does \_. means in vim ? explain to me character by character Response from chatgpt: In Vim regular expressions, \_. is a sequence that represents any character including a newline. Here is an ...
andrew_ysk's user avatar
0 votes
0 answers
40 views

Why does Vim search for the word under the cursor when pressing "i" after running an external command?

I stumbled on a behaviour which I don't understand. I'm using Bash and Vim 8.2.2434 in Debian 11. To reproduce it, I created two new files in an empty directory: foo.py class Foo: def __init__(...
mkrieger1's user avatar
  • 135
1 vote
1 answer
88 views

term_start won't open terminal in the desired position

If I run term_start('zsh', {'term_name': 'MYTER','vertical': v:true}) I get the expected behavior, but if I run term_start('zsh', {'term_name': 'MYTER','belowright': v:true}) will produce E475: ...
Barzi2001's user avatar
  • 640
0 votes
0 answers
423 views

Why doesn't ctrl+left and ctrl+right work by default in alacritty?

As in the title. I run vim in xterm and ctrl-left and ctrl-right does work (skips over one word in the text by default -- this is likely the intended behavior, also because it works the same way in ...
user202729's user avatar
1 vote
1 answer
122 views

How can I control the color of my Vim terminal?

I'm using the nord theme on gVim 9.0. My Vim terminal appear with Black color: Here in console mode: Here in normal mode: How could I control it? Remark: I had a different behavior using Vim 8.2
Vivian De Smedt's user avatar
0 votes
1 answer
312 views

Come out of terminal output in Neovim

In nvim how can I come out of the terminal mode without closing the nvim overall?! In Vim I just do :!python script.py, when I'm done reading the output I can hit enter to come out of the python shell....
Student's user avatar
  • 121
2 votes
1 answer
571 views

Cannot open terminal ini nvim

I installed Plugin terminal using the vim-terminal plugin and try to execute :TerminalSplit bash but before the terminal open I got a warning message. Python 2 interface is not installed, using Python ...
Muhammad Fhadli's user avatar

1
2 3 4 5
10