Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [vim-windows]

A Vim window is a view of a buffer. A tab page comprises one or more windows. For questions about interaction with the Microsoft operating system, use [microsoft-windows]. For questions about interaction with the desktop windowing system, use [window-management].

Filter by
Sorted by
Tagged with
1 vote
0 answers
15 views

Open a window with output of an external command [duplicate]

When editing a file, i sometimes run external commands - such as validating and formatting - and instead of capturing the external command's output and processing it in vimscript, i'd like to open an ...
user avatar
0 votes
0 answers
22 views

Overriding syntax highlighting for LaTeX defaults in vim

I am currently using default syntax highlighting for LaTeX in vim on a Windows machine. Here are the contents of my _vimrc file: set number set belloff=all syntax on set backspace=indent,eol,start set ...
user avatar
  • 111
0 votes
0 answers
11 views

How to window leftcol without switching to the window

winsaveview() returns multiple details about the window including the leftcol which is the amount of horizontal scroll. However you need to switch to the window to get that. getwininfo() returns ...
user avatar
  • 254
1 vote
0 answers
27 views

How to detect split window resized?

I'm aware that the VimResized event happens the main vim window is resized. Is there any event that happens when a split subwindow is resized? I'm looking for something like WinResized. I'd like to ...
user avatar
  • 451
0 votes
1 answer
34 views

Prevent subwindow height from shrinking to zero

Working from home on a travel laptop makes one very stingy with screen space. I often have Vim taking up the right-most third of the screen and split up into 2-3 vertically stacked subwindows. ...
user avatar
0 votes
1 answer
34 views

Backslashes being removed from file paths when changing terminal to wsl on Windows gvim

On gvim for Windows I wanted to change the termial from cmd to wsl, so I added this to my gvimrc. which I got from an answer on another StackExchange site: " Use WSL as terminal on Windows if has(...
user avatar
  • 105
1 vote
1 answer
63 views

In a vimrc, how do you preload a register with a string containing Special characters, like a newline?

In a vimrc file I want to preload register C with a string I regularly need when coding. The string has a newline in it but no success in getting it to work properly. Here is an example vimrc snippet ...
user avatar
0 votes
1 answer
50 views

How do I use the \+ quantifier?

Running Windows 10 (Home) and VIM - Vi IMproved 8.1 (2018 May 18, compiled May 18 2018 18:36:07) MS-Windows 32-bit GUI version with OLE support Included patches: 1 Compiled by mool@tororo. I have ...
user avatar
0 votes
0 answers
144 views

Getting Server languageserver.ccls failed to start: error, when ever I open cpp file inside neovim

I get the following error: Server languageserver.ccls failed to start: Launching server "languageserver.ccls" using command ccls failed. I have installed coc-ccls, and I have pasted this ...
user avatar
0 votes
1 answer
38 views

Auto resize vim focused window when open it the first time

I'm using vim-autoresize for resize windows. It uses: augroup _vim-autoresize autocmd! autocmd WinEnter * call autoresize#resize() augroup end But WinEnter just changes behavior when your ...
user avatar
1 vote
0 answers
15 views

Vader for testing plugin that eases window navigation

Some time ago I wrote a plugin for easy window navigation, and now I was trying to write some test for it, using Vader, which I knew nothing about until a few hours ago. Basically, with my plugin ...
user avatar
  • 1,572
1 vote
1 answer
160 views

How do I open an existing file in a floating window?

For a plugin, I want to open an existing file situated in lua/myPlugin/ in a floating window, so whatever the actual working directory is, this file is always the one to be opened. It sounded easy, ...
user avatar
  • 21
2 votes
1 answer
192 views

What's the difference between `BufWinEnter` and `BufEnter`?

I need an example to differentiate the two events in Vim, as I'm having a hard time understanding them.
user avatar
  • 731
1 vote
1 answer
45 views

preventing extra window split

:help in vim will do a window split if there is no help window. If there is a single window, this is fine. But when there is already a split (vertical or horizontal), I would like to see the help in a ...
user avatar
1 vote
1 answer
33 views

BufDelete running after window is closed

For some reason, the BufDelete autocommand is being executed right after a window is created, instead before, and i think it shouldn't be like that, according to the docs: Before deleting a buffer ...
user avatar
0 votes
1 answer
32 views

Meta-Model: Shrinking In Correct Direction

This questions sounds ridicolous, but is there any (mental?!) aid for my struggle when resizing windows? Since the earliest days of my vi/m usage, I have struggle shrinking windows in the correct ...
user avatar
  • 31
2 votes
1 answer
211 views

Plugin conflicts over BufWinEnter Autocommands

I have vim-markdown and nerdtree installed. And everything was working fine until I added the following to my .vimrc (verbatim from the nerdtree readme) " Open the existing NERDTree on each new ...
user avatar
0 votes
1 answer
31 views

Applying command to window under cursor

By using the following code map <c-ScrollWheelUp> :resize +3^M map <c-ScrollWheelDown> :resize -3^M map <1-c-ScrollWheelUp> :resize +3^M map <1-c-ScrollWheelDown> :resize -3^M ...
user avatar
0 votes
2 answers
49 views

How can I suppress a CMD terminal window when running an external command in gVim?

Running a python script from gVim on Windows keeps popping up a terminal window (cmd), even when adding the silent parameter to the command: execute 'silent !python script.py'. Basically the script ...
user avatar
0 votes
0 answers
29 views

Inserting Visual Blank Space Without Modifying Buffer

Question In vim 8, is it possible to insert visually blank regions into a window without modifying the underlying buffer? Backstory I am writing a plugin (my first!) to assist me in updating patch ...
user avatar
0 votes
0 answers
40 views

How to change cursor type when runing :bo terminal powershell?

I prepared a .bat file with only two lines @echo off vim -c "bo terminal powershell ipython" but the cursor that I have in the powershell is the Legacy Style whereas I want the Underscore. ...
user avatar
  • 121
0 votes
1 answer
88 views

Vundle: how change plugin location from ~/.vim to ~/vimfiles in Windows?

My home is H:/. The output of :set rtp? gives runtimepath=H:\vimfiles,H:\.vim\bundle\Vundle.vim,H:\.vim\bundle\ale,H:\.vim\bundle\SimpylFold,H:\.vim\bundle\ctrlp,C:\Program Files (x86)\Vim/vimfiles,C:\...
user avatar
  • 121
0 votes
1 answer
67 views

Favor existing window of an active buffer when opening that file/buffer from a different window

I have a tab with the following window structure within: ________________________________ a | | x | ...
user avatar
  • 155
0 votes
0 answers
84 views

What is the reason to specify ':cANSI' (or another character set) for a font

I often see that fonts intended to be used on Windows are defined with :cANSI. set guifont=Consolas:h11:cANSI The help is, of course, provide some explanation, but I don't really understand it. cXX -...
user avatar
0 votes
1 answer
130 views

Is it possible to open a browser as a new vim window? (embededding the markdown-preview plugin)

I just found the very nice markdown-plugin which opens a new tab in browser, displaying the markdown edited in the current vim window. My question is, is it possible to make it work more like NerdTree ...
user avatar
1 vote
1 answer
46 views

why does COC extension changes the displayed name of vim windows

I have recently installed COC extension to vim and I am enjoying so far, but I started to have a problem once I had installed the COC extension for java and clang. So after the very moment after I ...
user avatar
1 vote
1 answer
93 views

Display left margin visually starting from specified nonzero column

I am beginning to use Vim for C++ development. Many of my lines are within deep for loops or if conditions that with indenting and wrapping disallowed gives a structure that looks like this. x here is ...
user avatar
  • 155
2 votes
2 answers
48 views

Why does E443 exist?

(Related to this other question of mine.) Is there a concrete reason to why rotating the windows u, v, and [x,y,z] is not allowed? Or is it just a limitation that could be lifted in future versions of ...
user avatar
  • 1,572
0 votes
2 answers
42 views

Querying for the list of windows in the same column/row of the current window

Consider a window layout as this (which I've set up esentially at random). ┌───────┬───────┬───────┬────────┐ │ │ │ │ │ │ x │ y │ z │ │ │ │ │ ...
user avatar
  • 1,572
2 votes
0 answers
31 views

Vim command line bigger when tagbar is open

Vim's command line is bigger when TagBar is opened. I am using windows terminal but this happens in Command Prompt as well. What am I doing wrong? Or is there an option that I missed?
user avatar
1 vote
1 answer
102 views

Setting 'viewdir' does not work with :mkview

I'm trying to use :mkview with 'viewdir'. I set 'viewdir' as the help page said: set viewdir='C:/Users/MyPC/vimfiles/view' and made sure that C:/Users/MyPc/vimfiles/view exists, but I still get error ...
user avatar
3 votes
1 answer
19 views

What are the propagation rules for local window settings defined in .vimrc?

In my .vimrc I have :set number. This window-local setting is applied for new windows (e.g., when running :split some_new_file). However, when I open a help window with :help, there are no line ...
user avatar
  • 432
0 votes
1 answer
29 views

Is nvim's documentation corrupting my windows installation?

I recently decided to try out nvim, after using vim for a few years. I started following these instructions I noticed after running these two commands :call mkdir(stdpath('config'), 'p') :exe 'edit '....
user avatar
0 votes
0 answers
22 views

GoToDefinition used to show result in a split window, but now uses buffer

I have this mapping in my .vimrc: nnoremap gd :YcmCompleter GoToDefinitionElseDeclaration nnoremap gf :tab split \| YcmCompleter GoToDefinition<CR> When I press gd, it writes the command :...
user avatar
  • 133
0 votes
1 answer
109 views

Always show top bar with files names

When I open more than one tab, in the top appears a bar with the names of the focused files: but when I close the second tab the bar disappears: How can I keep that top bar always open? I also want ...
user avatar
  • 137
1 vote
1 answer
69 views

Redirect output to a persistent window that respect window layout

So this is a continuation of my adventures into creating my first plugin ;-) Today's issue is that I want to execute some shell command, and redirect the output to a separate window that respects my ...
user avatar
0 votes
0 answers
37 views

How can vim show multiple files are changed on disk?

How can vim tell me which buffer is changed on disk among multiple buffers? related to this thread, @b-layer helped me my current vimrc code: set autoread autocmd FocusGained,BufEnter,CursorHold,...
user avatar
  • 111
0 votes
1 answer
39 views

How can vim tell me which buffer is changed on disk among multiple buffers?

I am using this code in my vimrc if a file is changed outside vim, it shows File changed on disk. Buffer reloaded. set autoread autocmd FocusGained,BufEnter,CursorHold,CursorHoldI * if mode() != 'c' |...
user avatar
  • 111
1 vote
1 answer
27 views

How to move backwards between windows?

Ctrl-w w moves to next window. Ctrl-w p is not the symmetrical of Ctrl-w w, it moves to last window at first, but then moves back to where it was.
user avatar
0 votes
1 answer
95 views

vim netrw problems on Windows 10

The weird behaviour I was seeing included: :Ex might open an empty window Use of - as a shortcut to go up to the parent directory in netrw, would make the entire shell non-responsive (or at least, ...
user avatar
  • 163
2 votes
2 answers
677 views

Why does my lightline status line not show up right away?

Currently when I open a file (NerdTree appears automatically as well), the light line status line plugin I installed does not show up right away. It only shows up after I switch tabs into NerdTree and ...
user avatar
0 votes
1 answer
151 views

Vim Formatter vs VsCode Formatter Problem with GIT

I am using Vim (neovim) for the past couple of weeks now. I am facing one problem with the way vim formats the code. My other team members uses vscode which formats JS file on Save something like this:...
user avatar
0 votes
0 answers
27 views

How may I setup a consistent shortcut to switch to the right pane, even the pane is in another Terminal?

I have 2 screens of difference sizes, and I am a Neovim user (with Tmux, iTerm2). I would like to hack a way so that I can have a consistent way to "switch to the pane on the right of this pane&...
user avatar
  • 432
0 votes
1 answer
112 views

Useful script to manage buffer and window?

I want to create a vertical split from current buffer for reference another file/the same file. After I've done with this split I don't want to see this buffer-for-reference in the split, but: If ...
user avatar
  • 731
0 votes
1 answer
96 views

Focus on window of target buffer

Let's say I have a way of identifying (through name or number) a buffer which is already open in a window somewhere. How can I focus on the window that hosts said buffer? Can this be generalizable so ...
user avatar
  • 105
0 votes
3 answers
116 views

How to automatically re-apply max window height + width upon terminal resize?

I often use the <C-w>_ and <C-w>| commands in Vim to maximize the current pane to fill the entire window (I have it keymapped to <C-w>0). And I've recently started using a tiling ...
user avatar
0 votes
1 answer
383 views

Change default window layout of Vimspector

When debugging with Vimspector, I would love to customize the default window layout. I mainly want to have a wider view of the vimspector.Watches window on the left. I can do this after firing up a ...
user avatar
  • 151
1 vote
2 answers
75 views

I need two windows on the same file but screen too small for split

I'd like to modify a file at two different places but without having to go from one location to another in the same file. So I learned about windows but it seems they only work by splitting. My screen ...
user avatar
  • 165
4 votes
1 answer
91 views

Buffers that are neither active nor hidden

Both :ls and :buffers display a list with buffer information, giving indicators for each buffer. For example, # means the alternate buffer, and % means the current buffer. The meaning of each ...
user avatar
  • 255
3 votes
1 answer
69 views

How to determine which window cursor will move to after closing preview window?

I am trying to fix a bug that goes like this: [cursor in ordinary window] open preview window and move to it [cursor in preview window] close preview window expected: cursor moves to where it was in ...
user avatar
  • 1,013

1
2 3 4 5 6