海关总署制定5方面25项措施 支持四川自贸试验区建设

15,269 questions
Filter by
Sorted by
Tagged with
2 votes
1 answer
22 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 ...
yousefx0's user avatar
1 vote
1 answer
10 views

synID() on treesitter highlighting

My script includes synID() but does not work on a help file after nvim 0.10.0. It is because nvim starts to use treesitter highlighting and does not set the syntax option. Is there any alternative ...
Rick Howe's user avatar
  • 403
0 votes
1 answer
58 views

How to highlight text inside [...] differently than text inside ![...]!

The goal is to highlight text inside [...] with a different color than text inside ![...]! Also everything should be nestable such that [...] could contain ![...]! inside of it or vice versa and the ...
yousefx0's user avatar
0 votes
0 answers
48 views

How could I improve my game about learning Vim? [closed]

I've developed BobaVim, a browser-based game designed to help people learn and practice Vim motions through interactive challenges and competitive gameplay. After months of development and testing ...
Goplo's user avatar
  • 11
1 vote
1 answer
28 views

Why are TypeScript files with shebang in nvim rendered in gray?

I have installed the up-to-date tree-sitter-typescript, and it works well in typescript files without shebang. I searched online but couldn't find any particularly similar questions. Some people ...
WeariTraveller's user avatar
1 vote
1 answer
26 views

Map equal to gq in Neovim

The title says it all. I'm trying to map <Equal> to gq behavior in Neovim both when in Normal mode (in that case do gqq) and in Visual mode (in that case do gq) but somehow this is not working. ...
Rom's user avatar
  • 13
1 vote
3 answers
314 views

Writing a visually-selected couple of files out to a file with an open buffer

This is vim 9.1 on arm64 macOS 15.5. Let's say I open file1.txt with: vim file1.txt but some of the lines I want to write into another file. If I open that file in a buffer with: :split file2.txt or:...
Harv's user avatar
  • 241
1 vote
1 answer
58 views

How to highlight across regions?

I have a special format in .html.specialext, it is basically an HTML file with special regions delimited by {{ and }}, containing Lua code. Here is my syntax file (specialext.vim): if exists("b:...
TummaLumi's user avatar
3 votes
2 answers
650 views

Why do I need to reopen Vim to have the auto-commands in .vimrc in effect even after sourcing it?

Whenever I make modifications in auto-commands in ~/.vimrc, I need to reopen all the buffers to have the effect of those modifications. Sourcing the ~/.vimrc either by :source ~/.vimrc or :source $...
Somudro Gupto's user avatar
1 vote
1 answer
328 views

Is there a way to move the cursor specifically to the beginning of the visually selected region (not just toggle like `o`)?

When in a visual selection you can press o to have the cursor jump between the start and end of the selection without affecting what is actually selected. Is there a way to do a similar thing, but in ...
Pak's user avatar
  • 1,154
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 = ...
Irdis's user avatar
  • 113
5 votes
5 answers
510 views

Copy last word of each line as an independent line

I want to copy the last word of each line, including the new line character. For example This a line This is another line to copy And one more The result should be line copy more So far, I have %...
William Ardila's user avatar
0 votes
0 answers
67 views

VTSLS language server looks attached at output of :LspInfo, but it does not function except basic diagnostics

Here is :LspInfo output: - vtsls (id: 5) - Version: 0.2.9 - Root directory: ~ - Command: { "vtsls", "--stdio" } - Settings: { vtsls = { tsserver = { ...
Cccccccc's user avatar
0 votes
1 answer
40 views

How do you externally write to vim's register, that an active session will seemlessly pick it up?

Backstory: Creating a TUI in Qt/C++. Much of its functionality is designed mimic vim idioms. Headless environment via qputenv( "QT_QPA_PLATFORM", "eglfs" ); EGLFS is a platform ...
Anon's user avatar
  • 1,005
1 vote
1 answer
51 views

Change settings when using vimdiff

I have a function that changes settings for diff mode (usually activated by using vimdiff). Manually calling this function works as expected. However, I would like this function to be called ...
MERM's user avatar
  • 113

15 30 50 per page
1
2 3 4 5
1018