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
1answer
185 views

Buffer list per window

How could I get something like a buffer/argument list or a filter for individual windows, with a chosen subset of the buffers? So I could have a window just for header files in C (files ending in .h)...
2
votes
0answers
24 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 ...
0
votes
1answer
26 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 ...
0
votes
1answer
51 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, ...
0
votes
2answers
27 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 ...
31
votes
1answer
9k views

How do you open a new buffer in the current window?

I've got a few tabs open with different window setups. I'd like to open a new blank buffer in the current window, without having any more splits/windows or tabs Is there any way to do this? I know ...
0
votes
1answer
51 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 ...
17
votes
5answers
13k views

What is a scratch window?

Sometimes I see a window open with name scratch. I know it is some kind of temporary buffer/window. How can I create one? :h scratch returns nothing.
2
votes
2answers
1k views

How to open a terminal horizontally on the right side of vim

I'm using vim 8 and I set a shortcut to open a terminal in my vim. nnoremap <F5> :wa<CR> \| :term ++kill=term<CR> It works except that it opens a terminal vertically as below: ----...
5
votes
2answers
3k views

Vim black text on black background in command line in Windows 10 while editing git commit message

I am using git 2.7.0.windows.1 in Windows 10, with core.editor set to vim. Vim was downloaded from vim.org latest version binary: VIM - Vi IMproved 7.4.1023 (2013 Aug 10, compiled Jan 2 2016 14:24:...
0
votes
0answers
28 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
25 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
28 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
57 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
42 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
68 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
41 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 ...
0
votes
1answer
64 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 ...
1
vote
1answer
57 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 ...
32
votes
1answer
8k views

What are the new "popup windows" in Vim 8.2?

The latest version of Vim, 8.2, has a new feature called "popups" or "popup windows". They sound interesting but I'm not quite sure what they're good for. Can you enlighten me...preferably with some ...
1
vote
3answers
847 views

Unable to Open NERDTree

I'm new to Vim, and for the paste couple of weeks, I've been using NERDTree with no problems. However, I recently added a few key mappings and am now unable to open NERDTree with the <C-n> ...
1
vote
1answer
40 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
37 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 │ │ │ │ │ ...
44
votes
15answers
16k views

How to "full screen" browse Vim help?

I know I can browse Vim help with :help, but this opens a split. Sometimes, I just like to study documentation. How read documentation in a "full screen" mode?
2
votes
0answers
23 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?
5
votes
5answers
753 views

Does Vim have functionality similar to tmux's `display-panes` command for selecting (goto) a specific window by number?

Does Vim have functionality similar to tmux's display-panes command for selecting (goto) a specific window by number? Sometimes when I've many windows open, it can be a pain to navigate them by C-w ...
0
votes
1answer
26 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 '....
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 ...
15
votes
7answers
3k views

How to bind a set of buffers to a tab?

When I need to work on different projects at the same time I have the folowing workflow: I create one tab for each project. In each tab I open the files that I want to edit, which makes several ...
1
vote
1answer
424 views

How to populate the preview window?

I need to show a 'prompt' in the preview window when the user makes a selection of an item in a popup window, which is similar to the way the tern-for-vim completion plugin does in Javascript files, ...
2
votes
2answers
569 views

Quit a window by its win_getid() identifier?

I use something like zoomwintab to zoom in/out of a single window view, using tabs to simulate the effect. It exposes a toggle function to zoom in on a single window, and to zoom back out to the ...
1
vote
1answer
44 views

How do I make the current tab's windows equal width but leave their heights?

I know <C-w> = equalises window sizes but I often want to keep the heights as they are. I have set noequalalways in my .vimrc as leaving it on ruins layouts when temporary windows open (like ...
0
votes
0answers
12 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
59 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
57 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 ...
8
votes
2answers
2k views

Vertical equivalent of "control+w n"?

I often want a new empty vertical pane (vim window / viewport ...) in my current Vim tab. I know I can get a new empty horizontal pane by doing control+w n. I know I can split the current pane into ...
0
votes
0answers
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,...
0
votes
1answer
33 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' |...
21
votes
7answers
5k views

Move existing window to existing tab

Sometimes I need to move windows into an already existing tab, and I was wondering if there was a command/keyboard shortcut that could do this. I know I can close the window, switch to the tab, and ...
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.
13
votes
3answers
20k views

How to switch between buffer and terminal

I have a vim's buffer and a terminal in the same vim's window but each time switch to terminal I can only exit it to go back to vim's buffer, Is there a way to keep terminal session but be able to ...
2
votes
2answers
334 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 ...
37
votes
4answers
21k views

How can I work with splits in Vim without Ctrl-W?

My terminal doesn't allow me to type Ctrl+W, because that's a shortcut for closing a terminal tab. I like working with splits, but I can't find any way to do so without using C-W. This forced me to ...
0
votes
1answer
99 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
24 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
200 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 ...
0
votes
1answer
41 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
73 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 ...
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 ...

1
2 3 4 5 6