spolu / dwm.vim Goto Github PK
View Code? Open in Web Editor NEWTiled Window Management for Vim
Home Page: http://www.vim.org/scripts/script.php?script_id=4186
Tiled Window Management for Vim
Home Page: http://www.vim.org/scripts/script.php?script_id=4186
:tabnew (and then opening 3 files) and then Ctrl-f copes buffer windows from all tabs into the current tab. It would be great to manage tabs as seperate workspaces.
Would be handy. Apparently suckless.vim does this, but I haven't tried it yet. Ctrl-w | Ctrl-w _ to fullscreen leaves the other windows present in a crushed form.
I use [ack.vim](https://github.com/mileszs/ack.vim plugin) it show search result in the quickfix window but with dwm.vim enabled quickfix window appears on the right instead of the bottom of current buffer.
Is there any way to fix that?
In my opinion, this feature is really usefull. When I swap vim to the left monitor I can swap the master pane and the same happens with the right monitor. Is it possible to restore this feature?
This makes more sense in how the keys are mapped, that might differ from DWM as a philosophy tho.
The project looks stellar now, nice done!
According to the Vim FAQ <C-,>
and <C-.
cannot be reliably be detected by Vim, making the rotate command unusable on certain terminals.
Perhaps alternative keybindings could be suggested which fall within the reliably detected range?
Now DWM_Focus
call in master buffer does nothing (except unwanted cursor position change in some cases, probably due to buffer resize). Suggested behaviour - switch back to previously selected buffer if any.
Hopefully, I'm just missing something here, but if I follow the following steps, I end up with three equal vertical splits rather than one focused split and the other two stacked on the right:
vim
:split
<C-Space>
:split
<C-Space>
If I then move to one of the three equal panes, and focus that pane, the correct layout is returned. It looks like it has something to do with splitting the focused pane and then focusing the new split. Similarly, if I split a non-focused pane and then focus, the correct layout is maintained.
I have tested this on MacVim, and Vim (7.3) on OSX and Ubuntu.
Edit: I've looked into this further, and it looks like this plugin makes no attempt to organize splits that are outside of it's expected layout. Would that be outside of the scope of this plugin, or a welcome improvement?
It seems that the bnext
will always call the new buffer to be the "primary buffer", which is fixed to the left edge and occupies the entire vertical split.
Is there a way to tune this? Yet maintaining the functionality of the primary buffer?
For detailed description, please refer to my posting on this link:
http://stackoverflow.com/questions/27381436/buffernext-is-distorting-the-window-layout
All the best,
Linfeng
Like the 'reflect' layout in XMonad http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-Reflect.html
I have vim on the left monitor of my dual monitor set up ... which is very far left so it is difficult to focus it all the time.
control-c is the alternate default keymap for "ESC". Some folks like me can't be bothered to reach their pinky finger all the way to that escape key. A couple times now I've closed my buffer just trying to escape insert mode with control-c. I can do a remapping in my vimrc, but I figured I'd see what the rationale is here.
I'm not familiar with dwm, are these control mappings taken from there? Why is control-c even needed? Would it be possible to hijack/alter vim's existing buffer close event?
I start with an empty buffer and hit C-n
C-n
C-n
to get a layout like in the README. I then jump to any of the side windows. When in one of the side windows, if I open a file with :e foo.txt
, it opens in the main window instead of the current window. If I then jump to any of the side windows again and :e bar.txt
, it opens bar.txt
in the main window and pushes foo.txt
into the top right side window.
This only happens for filetypes which Vim recognizes. It doesn't happen for a Netrw Directory Listing window, or a *.backup
file for instance.
Using MacVim 7.4.52. The OS X 10.9 system install of Vim 7.3 does not exhibit this behaviour.
My reduced .vimrc
:
set nocompatible
" Vundle
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'spolu/dwm.vim'
If I have http://majutsushi.github.io/tagbar/ open, DWM considers it a normal window and will move it into the stacked pane etc. I would like to have tagbar ignored and anchored on the left, and DWM to operate in the space remaining. Is this possible?
This isn't such a dwm.vim related question per-se but I accidentally bumped into it while using dwm.vim;
If I open a help file e.g. :help options.txt it will create a horizontal split. Why won't the buffer just stay in the buffer list until I delete or wipe it? If after opening the help I do any window management e.g. C-n then the temporary help buffer is gone.
Rebind to C-H instead
Thanks for sharing this awesome plugin!
I have a little question. When you create a new window, is it possible to open it in the right window, instead left window? Or add variable to open the new window to right side instead of left side?
Thanks in advance for your reply.
Hi there,
I really like dwm, thanks.
Sadly it seems to lead to problems using vimdiff with 3 or more files - i.e. using vimdiff with 'git mergetool'. Would it be ok to extend the 'exit quickly' situations to check for '&diff' also to prevent dwm in vimdiff-mode?
Kind regards,
FlashKorten
When the main pane (for lack to better term for it) is closed dwm should probably refocus the next pane that is in the stack. Instead the result is something along the line of Vims normal vertical split. I was able to produce this with three open panes, one with focus the other two stacked to the right according to dwm's tiling rules, then closing the main pane with :q
.
Hi! This is of course no real issue, but for completness sake: the guy you've quoted in the README is (or unfortunately was) Uriel, but I already saw, that he called himself luriel at ycombinator.
Anyway: Thanks for this awesome plugin!
I tried out dwm but the fact that Ctrl+J is occupied is the major reason for me to uninstall the package. Overall, I think this is a handy plugin. Thanks for the effort.
So, is there a way to re-map the ? Actually, I want to map all the local key-bindings to be . I believe this would avoid any further overlapping.
All the best,
Just a suggestion: why don't you put C-h and C-l, the commands to modify the size of the main panel, in the readme file? And also the instructions to remap those. I think they conflict with many other commonly used Vim mappings and it would be useful to know right away how to remap them.
Oauth test
I'm not able to open more than two files using Vim's -o
or -O
options when I have dwm.vim enabled.
I was able to narrow it down to dwm.vim with the help of others on my StackOverflow question. Only the first two files given are opened, with the first one being opened twice.
For reference, this is how I configure dwm.vim in my vimrc, but the problem still exists if I remove this code and leave the plugin enabled. So my custom configuration does not affect the issue.
let g:dwm_master_pane_width = 84 " Set width of master pane in dwm.vim. For percentages, use quotes.
autocmd VimResized * call DWM_ResizeMasterPaneWidth()
" Resize the width of main pane to n/4 of the full window.
nmap ,.. :call DWM_mod_align(3)<CR>
nmap .,, :call DWM_mod_align(1)<CR>
function! DWM_mod_align(n)
execute "1wincmd w"
execute "vertical resize ".(&columns * a:n) / 4
endfunction
I'm not sure if I miss something but I looked very closely and found no implementation for Fullscreen mode. I just tried it out and it didnt work. So I looked into the code and found no mapping. I then looked for a function to map and found none either. I searched the Readme and the pull request if this is mentioned somewhere and still no luck. So I guess this is a feature request 8-)
Hi,
I've been using this plugin for two years now and just switched to neovim but when I do C-N nothing happens, no new window.
Hi, i use tpope/vim-obsession
for saving and loading vim session files. After starting vim on a session file like vim -S .Session.vim
, dwm.vim
seems to respect the sizes of the windows, yet the windows contain different buffers than before. In other words: it seems to me, that one of the buffers gets moved to the master pane and hereby rearranges all buffer locations, just like Ctrl-space
.
If i move the desired window to the master pane, the layout size isn't respected any more - it seems to me like a Ctrl-W =
is done.
Hello,
first i want to say thanks for this great plugin. Well done :).
But i have a problem when using tabs with this plugin.
For example: after starting gvim i open 3 files with dwm. Then i open a new tab (:tabnew). If i press now the three files from the first tab are also opened in the second tab.
That's really annoying cause i'm used to work with tabs.
If you load a previous session saved with a layout from the dwm plugin that looks like this
=====================================
| | B |
| |====================|
| A | C |
| |====================|
| | D |
=====================================
Each window, past the third will be a copy of the third window, and the buffers will be rotated so that whatever buffer was last is now master, the second to last is now second and Master is now in the third slot Like below
=====================================
| | C |
| |====================|
| D | A |
| |====================|
| | A |
=====================================
The buffer B will still be in the bufferlist but it will no longer be open in a window.
This is something that happens on the loading of the session. If the session is loaded without plugins you can see that it will load correctly. I also tested this with no other plugins besides vim-plug and dwm active and the problem persists.
I am currently preparing a help file for dwm.vim. Now to explain the mechanics to the user, we should have a convention how to call certain things in dwm.vim. This is especially important because the idea of Vim windows is usually not easily grasped by Vim newcomers.
I'd propose the following scheme: The two sides are called master pane and stacked pane. Therefore, a focused window is located in the master pane (yes, technically they are the same) and all others in the stacked pane. A window that is not focused in the master pane but has the input focused is called active.
To my best knowledge this should only affect issue #12.
:DWM_*
not working, i.e.: E492 Not an editor command: DWM_New
<c-m>
<c-,>
<c-.>
have no affect. <c-m>
is the most important, to me anyway.I am using:
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Dec 12 2012 16:22:25)
MacOS X (unix) version
Included patches: 1-754
Know problems or am I missing something?
Is it possible to extend the mappings to Neovim's new Terminal mode?
I understand some of DWM's default key mappings like have an existing meaning the shell, but surely there is a solution...?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.