spolu / dwm.vim

Tiled Window Management for Vim
http://www.vim.org/scripts/script.php?script_id=4186
700 stars 76 forks source link

Files open in main window, not currently selected window #57

Open jjt opened 10 years ago

jjt commented 10 years ago

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'
spolu commented 10 years ago

Hi @jjt

To be perfectly transparent I absolutely don't have the time to track this bug down. There is definitely a bunch of places where dwm.vim does not play that well with vim functions.

I hope I'll get some time later or that a good soul (you?) find the time to look into it! :)

jjt commented 10 years ago

Only so many hours in the day!

Thanks for the reply - if I end up digging into it I'll put together a PR.

spolu commented 10 years ago

:+1: :)

TimoDritschler commented 9 years ago

Hello @spolu and @jjt ! I just now noticed that the advice I gave to @llinfeng here also seems to be fixing your issue. Can you try and reproduce it, to see if it really helps?

Sadly, I am pretty new to vim-coding and have no idea what buflisted actually does, so i can not tell for sure that my 'fix' isn't breaking anything else. However, I have not encountered any problems with it so far.

-Bests