Questions tagged [vim9]

To flag questions about features introduced with vim9 that are not vim9script questions

Filter by
Sorted by
Tagged with
2 votes
3 answers
444 views

How can I avoid built-in filetype detection?

I have a plugin for detecting and syntax highlighting *.k - source files in a given programming language. My ~/.vimrc contains only: se nocp rtp+=~/k/vim-k " the language plugin sy on And ...
ngn's user avatar
  • 163
-1 votes
2 answers
45 views

Prevent <c-w>q to quit Vim when there is only one window left

I wish to close windows and wipe out the associated buffers with <c-w>q but at the same time I want to prevent to quit Vim when there is only one window left. My attempt is as follows: ...
Barzi2001's user avatar
  • 438
1 vote
1 answer
39 views

Is there any way to automatically adjust OS specific environment variables, path, etc. format?

Often in my scripts I have some ugly snippets like the following: vim9script var bin = "" if has("win32") bin = "\\bin" else bin = "/bin" endif g:...
Barzi2001's user avatar
  • 438
0 votes
1 answer
23 views

How to change the internal vim python sys.path?

I have learned that py3eval('print(sys.path)') return the sys.path used internally by Vim. Say that i want add a new_path to the current sys.path. How shall I do? I would appreciate solutions that ...
Barzi2001's user avatar
  • 438
0 votes
1 answer
41 views

Block comment syntax colouring being lost while moving, but redraw will fix

I frequently use block comments to disable sections of terraform code using /* to start disabling and */ to complete. As expected, the code will turn "grey" and lose syntax highlights. ...
Peter McEvoy's user avatar
0 votes
3 answers
192 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
0 answers
49 views

Vim 9.0.1420 update: opening the same file twice without warning message is unfortunately now possible?

I observed that in the recent update for Vim, specifically vim 9.0.1420, it is now possible to create a text file, open it, and then open the same file through another terminal window without ...
DavidC.'s user avatar
  • 101
0 votes
1 answer
25 views

Vim doesn't display my echo if it's 2 characters

On Vim 9 linux running this code: inoremap <C-n> <C-o>:echo "aa"<CR> doesn't display anything whereas: inoremap <C-n> <C-o>:echo "aaaa"<CR> ...
Hamster's user avatar
0 votes
0 answers
39 views

How to highlight all the columns of a window?

Consider the following snippet: vim9script var winid = win_getid() var winwidth = winwidth(winid) var range = [] for lnum in range(10, 20) add(range, [lnum, 0, winwidth(winid)]) endfor var m = ...
Barzi2001's user avatar
  • 438
0 votes
2 answers
63 views

Vim9script commands from command line result in E1124. Is it normal?

If I run e.g. :var a = 1 from the command line I end up in E1124: "var" cannot be used in legacy vimscript. Running on MacVim 9.0.1276. Is it normal behavior?
Barzi2001's user avatar
  • 438
9 votes
2 answers
848 views

Syntax highlighting for shell scripts broken

Since recently my syntax highlighting for ft=sh (also syn=sh is set) is broken: Why is that? How can I fix it? Edit: I'm using Vim 9.0 with patches 1-1302. I add here the code from the screenshot. ...
pfnuesel's user avatar
  • 674
0 votes
0 answers
75 views

Different behaviour after upgrade Vim from v7.4.326 to 9.0.813

I have 2 Linux servers (SLES 12.5): On the first server I have vim version 7.4.326, On the other vim version 9.0.813. If I open the same file on both servers, Vim behaves differently. On server with ...
filipdgr's user avatar
1 vote
1 answer
51 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
42 views

Some Normal mode mappings not working in vim9 anymore

I have the following in my configuration: nnoremap µ iii nnoremap ° ioo I'm using gvim, on Windows 10, using an azerty keyboard (so µ is <S-*> and ° is <S-)). The mappings work in vim8, but ...
Minh-Tâm TRAN's user avatar
0 votes
1 answer
68 views

How can I make 'quickfixtextfunc' work with cfilter using a vim9's "def" function?

On Windows 10, using gvim, when editing a file like the following example: foo foobar baz As long as I use a function and not a def, I can do the following and Cfilter will work as expected: :...
Minh-Tâm TRAN's user avatar
0 votes
0 answers
143 views

gVim 9.0 32-bit on Windows 10 not accepting High DPI settings

This is for gvim.exe 9.0.0.0 32-bit on Windows 10 Enterprise 21H2 on an HP ZBook 15 G6 with high DPI display running 3840x2160. It's what's shipping nowadays for developer laptops. Makes every app an ...
Scot Harkins's user avatar
2 votes
1 answer
340 views

Vim appimage can't run on Ubuntu 22.04

Vim has a official AppImage (cool). But I can't run it on Ubuntu 22.04. I suppose that some dependencies are lost. My problem is that I can't identify what exactly are. I see the terminal output when ...
Moqtite's user avatar
  • 33
1 vote
2 answers
101 views

Gvim Python loading issue (despite being correctly installed)

I found a lot of questions about it, some problem was about 32 or 64 bit, other was about python support compiled in vim, etc. None was my case. Preamble: Software installed I installed Python on ...
Antonio's user avatar
  • 221
2 votes
1 answer
1k views

Using Github Copilot with Regular Vim [closed]

I'm not finding much out there in terms of docs about using copilot with regular vim (everything I've come across is about using it with nvim / neovim) The copilot.vim docs mention it should support ...
kjones's user avatar
  • 153
4 votes
1 answer
350 views

How can I convert vim8 function mapping to vim9?

I have a function in vim8 as: function! BSkipQuickFix(command) let start_buffer = bufnr('%') execute a:command while &buftype ==# 'quickfix' && bufnr('%') != start_buffer execute ...
BaRud's user avatar
  • 471
1 vote
1 answer
436 views

How do I :let a global variable in my vimrc in vim9script?

I am trying to change my vimrc to vim9script. For inbuilt fortran help, (:h fortran) we have: :let fortran_free_source=1 This is giving an error: E1126: Cannot use :let in Vim9 script If I remove ...
BaRud's user avatar
  • 471
1 vote
1 answer
367 views

How to unlet a variable in Vim 9 script?

In Vim9 script :let cannot be used. An existing variable is assigned to without any command. The same for global, window, tab, buffer and Vim variables, because they are not really declared. Those ...
user90726's user avatar
0 votes
1 answer
399 views

'Undefined variable' error: why?

vim9script set laststatus=2 set statusline= var separator = ' ' set statusline+=%{expand('%:p')} set statusline+=%{separator} set statusline+=%l:%v Error: Undefined variable: separator Why is ...
john c. j.'s user avatar
2 votes
1 answer
306 views

How can I enable .xml syntax highlighting for .xaml files?

I am trying to enable .xml syntax highlighting in Vim for .xaml files since .xaml files don't have syntax highlighting of its own. I came across a post on Stack Overflow which recommended to use au ...
Jose Membreno's user avatar
5 votes
1 answer
530 views

Vim9: How will '#' characters be handled in colors/* files now?

Vim9 now interprets '#' as the start of comment, but I use this character in color setting files. For instance: hi Todo guifg=#d14a14 guibg=#1248d1 ctermfg=red ctermbg=darkblue
al-'s user avatar
  • 53
2 votes
2 answers
2k views

How to get vertical wild menu using wildoptions=pum on Vim 9?

I would like to test the new vertical wildmenu of Vim 9. I read that set wildoptions=pum should provide it. But I'm not successful. Is there another setting to set to get it?
Vivian De Smedt's user avatar