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
0
votes
0answers
26 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 ...
0
votes
0answers
19 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. ...
0
votes
1answer
25 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:\...
0
votes
1answer
56 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 | ...
0
votes
0answers
36 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 -...
0
votes
1answer
43 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 ...
1
vote
1answer
40 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 ...
1
vote
1answer
35 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 ...
2
votes
2answers
46 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 ...
0
votes
2answers
36 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 │ │ │ │ │ ...
2
votes
0answers
22 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?
1
vote
1answer
41 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 ...
3
votes
1answer
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 ...
0
votes
1answer
25 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 '....
0
votes
0answers
11 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 :...
0
votes
1answer
53 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 ...
1
vote
1answer
54 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 ...
0
votes
0answers
33 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,...
0
votes
1answer
31 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' |...
1
vote
1answer
24 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.
0
votes
1answer
31 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, ...
2
votes
2answers
212 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 ...
0
votes
1answer
68 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:...
0
votes
0answers
23 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&...
0
votes
1answer
63 views

Useful script to manage buffer and window?

Given the scenario: 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 ...
0
votes
1answer
37 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 ...
0
votes
3answers
69 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 ...
0
votes
1answer
158 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 ...
1
vote
2answers
72 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 ...
3
votes
1answer
45 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 ...
3
votes
1answer
63 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 ...
1
vote
1answer
31 views

Forcing integrated terminal to scroll down after relayed command

I have a plugin which integrates a terminal that I can send commands through using a custom command I made. The only issue I'm having is that sometimes after the terminal gets clogged, it tends not to ...
1
vote
3answers
358 views

Don't show grey boundaries between windows

I am using vim as a book reader. For this purpose I have three windows open as shown ________________________________________ |~ ||The book I'm||~ | |~ ||reading ...
1
vote
1answer
36 views

Is it possible to have zero width window separator?

I want to remove the split separators without any leftover empty space. Is such functionality exposed?
0
votes
2answers
37 views

Automatically resize window based on filetype

I have a nifty autocommand in my vimrc that automatically maximizes any :help window: augroup LargeHelpWindow autocmd! autocmd BufWinEnter * if &l:buftype ==# 'help' | wincmd _ | endif ...
1
vote
1answer
192 views

Vim autoload doesn`t work

I've created a ~/.vimrc file that uses plug.vim. call plug#begin('~/.vim/plugged') Plug 'something' call plug#end() I also downloaded plug.vim and put in the folder ~/.vim/autoload. But when I open ...
3
votes
1answer
35 views

Get the position of a split window inside of vim

Is there any way to get the position of the top left corner of a split window relative to the entire vim window? For example, if there was only one window, and the tabline was inactive, the position ...
0
votes
1answer
112 views

Substitution replaces only current line?

I have a block of of text which contains variables whose name I want to change, but not all. I want to be able to choose which variables get replaced by the substitution and which do not. I tried ...
0
votes
3answers
119 views

Efficient copy->paste onto mark

I typically write all my software in the same way (omitting the TDD parts): Iterate pseudo code until it is granular enough that each part can be written in, hopefully, under 20 minutes. Implement ...
1
vote
0answers
40 views

How can I overlap windows, use non-rectangular windows, or dock a window in the corner?

I'm working on a text file (my notes/todo document), and I want to have the to-do list part of the document open in one Vim window (to check things off), with another to look at the rest of the ...
0
votes
1answer
41 views

How can one open a file from a directory window into an existing window?

In a directory window (:Explore or :Vexplore) every 'o' or 'v' creates a new window, I just want 1 directory view window on the left and 1 file view window on the right like a classic IDE. When ...
2
votes
1answer
237 views

Move cursor back to previous window after splitting

After running a command that opens a new split (e.g. :botright 10new), how can I have the cursor move back to its previous position? A use case would be to show a message in a scratch buffer without ...
1
vote
1answer
141 views

c-w suddenly not working to switch panes

sorry, I don’t know if this is a problem at the VIM level, terminal emulator or with KDE. I'm running vim-gtk3 in Debian Netrunner 20.01 which is KDE, and normally using Konsole, but also Terminator ...
0
votes
3answers
74 views

Does a plugin exist which allows moving (across) the windows and split them without having to press Ctrl+w before each action?

I'm kind of fine with moving across windows using Ctrl+w followed by (sometimes a counter and) h, j, k, l, p, t, b, and I'm also fine with the similar key combinations to split the windows or to move ...
-1
votes
1answer
764 views

Colorscheme displayed wrongly with Neovim

Hello I am new to vim and only used it via plugin in my IDE and now I wanted to change to the consol. I use the build : NVIM v0.5.0-727-gc10c2fab5\ OS: Windows 10 Terminal: Windows Terminal with ...
0
votes
1answer
42 views

Adapt side panels to different screen resolution (aspect ratio)

How can I adopt side panel plugins (TagBar, TagList, NerdTree, etc) width to current screen aspect ratio? Using Vim with many different computers makes me a bit trouble to write one portable config ...
0
votes
0answers
52 views

Why session in Vim did not save buffer from other folder rather than ~?

I use gVim on windows and save my current working files to session. However, when openning old session, it did not load files from other folder except home folder ~ (where I store my _vimrc file). My ...
2
votes
1answer
139 views

Why it enters 'replace mode' automatically even with '--clean' flag in WSL?

To demonstrate the whole reproducing process, I make a video: https://youtu.be/UD38-wnwGnw As you can see, I enter my vim with '--clean' flag. No vimrc, no plugins, but it still enter the 'replace ...
1
vote
2answers
572 views

Check if a specific window is open

I have a window in vim opened (current file) and another one in split called [Scratch]. I want to check if the [Scratch] is open or not. Any example is appreciated.
2
votes
0answers
27 views

Can I define window position/contents via command line arguments ? Maybe a sort of parameterised session file? [duplicate]

I would like to open, say, 4 files and then have windows arranged in a grid so that the first file was in top left, second bottom left, third top right and fourth bottom right. So a command like this (...

1
2 3 4 5 6