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
3answers
59 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
23 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
36 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
26 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
55 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
68 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
113 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
29 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
32 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
112 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
180 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
25 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
vote
1answer
23 views

How can I alter the window to which ctrl+w, ctrl+p will jump to?

What I'm looking for is a programmatic way of changing which window Ctrl+w, Ctrl+p will jump to. The reason why I want to do this is that I have an autocmd like the following autocmd BufEnter ...
0
votes
0answers
206 views

A problem regarding the fragility of multiple windows viewing the same buffer

Problem Statement (concise, but inexact, version) Windows viewing the same buffer are fragile in the following sense. Consider a complex arrangement of tens or hundreds of windows, distributed amongst ...
0
votes
0answers
80 views

Change cursor shape in Vim PowerShell

I have looked through the web but I have found no answer to this. https://vim.fandom.com/wiki/Change_cursor_shape_in_different_modes The above website mentions ways to do it in terminals but not when ...
3
votes
1answer
50 views

How to make gf behave like :drop

When I'm in a python file and I go to the imports, put the cursor on one of them, and type gf, it opens the corresponding file in a new buffer in the same window, even if the file is already open in ...
2
votes
3answers
484 views

How to scroll in another window without switching to it?

There is a keybinding in Emacs that lets you scroll in another window that you're not currently working on (C-M-v to scroll-other-window-down and C-M-V to scroll-other-window-up). For example, in a ...
0
votes
0answers
16 views

saving a .v file triggers it to be opened in another window and gets E:325 in neovim

After trying to save a .v file, it triggers a new window to be opened with e:325 error with swap file already exists. This only happens to .v files. This only happens when neovim is opened from that ...
0
votes
0answers
39 views

NERDTree causes Vim exiting when open two buffers on same window

Here is what is happening: I open one file, either with o in NERDTree or with :edit file_a. I open another file, again with o in NERDTree or with :edit file_b, and the file opens at the same window ...
0
votes
2answers
21 views

Vim misses a few files when opening multiple files

I use vim -o a* to open 25 files (filenames starting with 'a') together and search & replace (:windo %s/old/new/gcI) some common word in these files. Later I found that not all of them have been ...
1
vote
1answer
98 views

How to populate the preview window?

Let me give a bit of context to the question: 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-...
0
votes
1answer
21 views

Window sizes do not stay the same if a new window is spawned

I use Vim to do some C coding and for this I installed the YouCompleteMe extension. This extension, among other things, provides source code autocompletion and when I select an item within the menu, a ...
1
vote
1answer
68 views

How do I set a final size to a split in vim

I fond out how to resize a split on the fly in Vim but I would like to have a fixed size to some split (like the NERDTree split it always has the same size). So basically I am using Vim Plug as a ...
3
votes
0answers
57 views

How to preview Markdown in a Vim buffer?

I'm aware of some of the Markdown plugins for Vim, but I want the functionality VS Code and Atom provide, namely being able to split the editor screen and render a live Markdown preview in an adjacent ...
1
vote
0answers
52 views

How do I make the contents shift less when vertically resizing a vim window?

If I open a long file in vim or neovim, and my cursor is not on the first line, and I make the window shorter by either resizing the terminal, or adding another split with <C-W>s or :sp<cr>...
2
votes
2answers
57 views

Move to window if specified buffer is opened

I am currently trying to write myself a function the will let me show or hide (toggle) the :terminal window. The only way to hide it, as far as I currently know, is to just navigate to that window and ...
1
vote
3answers
152 views

How to open multiple file with single split command?

I can open and split multiple file like this :split file1 :split file2 :split file3 But is there any way to open multiple files in a single command? Something like this :split file1 file2 file3
0
votes
0answers
34 views

Is it possible to make some animation in vim

This issue may be a kind of nonsense but I still want to know if it is possible to make some dynamic stuff in vim 7 or vim 8. For example, load a file and make if move from left to right (just like ...
0
votes
0answers
15 views

Any way to raise a dialog similar to `z=`?

z= on misspelled words shows a dialog (set spelling before). Can I get the dialog by a function?
1
vote
1answer
248 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: ----...
0
votes
1answer
21 views

How to display MiniBufExpl window on the top

instead of the default display of the MiniBufExpl window on the bottom, I would like to have it on the top, is this possible?
1
vote
1answer
36 views

How to open a new window and edit it in an automated fashion?

Consider the following function function! Exp() call feedkeys(":new ~/.vimrc\<CR>") call search('F') endfunction My expectation from Exp() was that if I call Exp() then 1) I see my ...
1
vote
2answers
193 views

How to manage windows properly

I've used two plugins with vim: Nerdtree and Taglist. However, if I quit the opened file and open another file in the Nerdtree, it will become: Which means that the new opened file is displayed at ...
1
vote
0answers
18 views

Get/set window line, column without navigating to window

I'm looking for three functions (line, col, cursor) in nvim that takes an extra parameter window number so that I don't need to first navigate to the window and then navigate away. The reason is if I ...
4
votes
4answers
257 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 ...
29
votes
1answer
4k 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 ...
0
votes
1answer
38 views

Is it possible to have a “quick edit” (inline-editing of another file, nested buffers) feature through plugins?

I wanted to know if it's possible through plugin mechanism to insert another "pane" in the middle of the buffer I'm editing. The ultimate feature that I want is inlining piece code which exists in ...
1
vote
1answer
39 views

Set option on window without going to the window and come back

I want to set some options on a particular window number. What I've been doing is go to the window by {winnr} wincmd w, set some options and do some work then come back. But this creates a UI flash (...
1
vote
2answers
202 views

How to close the netrw buffer/window from any other window

I would like to have the behavior where I can run :Vex<CR> when pressing <Tab> in normal mode: nnoremap <Tab> :Vex<CR> ... to open the netrw file tree window and then I would ...
1
vote
1answer
109 views

How to move the cursor out of the terminal

I'm now using Vim 8 and its new feature: :term. Well, it's great but I don't know how to move the cursor out of the terminal without the mouse. In Vim 7, we can type <C-w><C-h>, <C-w&...
2
votes
1answer
178 views

Remapping keys doesn't seem to work in the terminal-buffer [closed]

I'm a total beginner that sees vim as a potential simple IDE, (as well as a text editor). I had several questions, but that was confusing, so I'll stick with just one already answered. I like using ...
1
vote
1answer
81 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)...
5
votes
1answer
190 views

Parsing winlayout() For Toggling Multiple Windows At Once

When working in vim, I like to have a toggle-able terminal window that I can bring with me from tab to tab. This works by tracking a buffer, and opening it in a new bot split (if it isn't visible), or ...
4
votes
0answers
56 views

gvim: Make the mouse follow CTRL-W_j and CTRL-W_k

I run a Linux/GNOME laptop where the focus follows the mouse, and I have vim's mousefocus feature turned on, so the selected viewport follows the mouse, too. But when I try to switch viewports using ...
6
votes
1answer
122 views

How to force which border shifts when resizing windows?

Is there some way to resize windows without using the mouse, such that I can control which border moves? It seems like it's ordinarily the bottom border or right border that moves, relative to the ...
1
vote
1answer
169 views

Split window vertically and edit visually selected file

I like what the shortcut Ctrl+Wf does, but I want to have a vertical split instead of horizontal. I managed to achieve this by defining the following mapping: nnoremap <c-w>f :vertical wincmd ...
2
votes
0answers
90 views

What is a pop_up windows? [closed]

Vim 8.2 has been released a couple of days ago and as I was reading I see that you can display somehow functions prototype, I am pretty exciting about this I hope documentations come pretty soon, ...
2
votes
1answer
397 views

How to work with multiple project folders in Vim?

I am often working with multiple projects at the same time. For example one main project and 5 related librairies. I have some issue to properly search in one project or multiple. I would like to: Be ...
1
vote
1answer
38 views

Why does :! open -a terminal or :! start cmd create totally new “applications”?

Edit: on Windows, looks like it's opening in sysWOW64 instead of system32. Any ideas why? Title. Basically, both of these commands are supposed to open a new console, the former on my mac and the ...
1
vote
1answer
29 views

How to close file/buffer/tab after cerain time of inactivity?

Is there a way to close file after certain amount of time of user inactivity? Lets say I have a encrypted file and I want to close it after 10 min. Is it possible in Vim?

1
2 3 4 5