Hacker News new | ask | show | jobs
by wenbert 6135 days ago
I have tried to use Vim a few weeks back. It works great. I have the minibuffexplorer and NERDTree installed. So it was basically like an IDE for me.

BUT everything goes downhill when the "window" arrangements are messed up. I am like, WTF did this open in the upper window. HTF do I move this "window/screen" from A to B. When this happens, I restart Vim and then open the files again. Really annoying. I wonder how expert Vim users go about this issue? Any tips?

2 comments

:h windows

I prefer using tabs with Vim. Here's a short overview:

* :tabnew to open a new tab.

* :tabe <FILENAME> to edit a file in a new tab.

* :q or :close to close a tab.

* :tabnext and :tabprevious to move between tabs.

* Ctrl+PgUp and Ctrl+PgDown are bound to :tabnext and :tabprevious. On my MacBook, I bind those to Cmd+[ and Cmd+].

* And, of course, :h tabs to find help.

I have added these line in my .vimrc.

map th :tabnext<CR> map tl :tabprev<CR> map tn :tabnew<CR> map td :tabclose<CR>

Why th and tl? You already have gt and gT.
Well just binding it to h/l combination. Easy to follow.
I use my window manager for managing windows, unlike a lot of vim users. Most ppl don't think about it too much, but maybe your window manager is the problem? Maybe it should do what you want vim to do. Have a look at a tiled wm like dwm, wmii or awesome.. etc...