Hacker News new | comments | show | ask | jobs | submit login

I use TMUX with VIM for that.

Better yank/paste | over SSH support

Is there any way to run multiple vim windows from one vim process, with them sharing the same internal clipboard?

To me, the window manager handling the window arrangement feels like The Right Thing, but vim handling the clipboard also feels right (because it interacts with many commands). So I'd like some hybrid of the two options of: 1) running multiple WM-managed vim instances; vs. 2) running one vim with vim-internal window management. I basically agree with the goal of running vim with dwm window management, but it seems wrong to have to reimplement dwm inside of vim, instead of using dwm itself to manage vim windows.

As an aside, you should also note that you can interact with the X clipboard from within vim or gvim. It's represented by the * register, so you can do things like "[asterisk]p to paste from other programs or "*Y to yank to them. Replace [asterisk] with the actual symbol. HN thought I was trying to italicize.

I bound some keys to this and works pretty well

  nnoremap <Leader>y "+yy  
  nnoremap <Leader>d "+dd
  noremap  <Leader>p "+p
  noremap  <Leader>P "+P
  vnoremap <Leader>y "+y
  vnoremap <Leader>d "+d

If your vim is on a box with an X server, look into client/server mode. You can then specify if you want to open a file in its own process or in the server process you spawned earlier.

Also, you can set the default yank register to be your X clipboard. Look into set clipboard = unnamed+ (make sure your vim is complied with X support for both of these)

For 2) you can use tabs in Vim to provide different workspaces, with each workspace having a certain layout of windows.

I've just found out that dwm.vim doesn't work well with tabs just yet though - it copies all buffer windows to the current tab on Ctrl-f (make active window the master focus).

Yep this has to be fixed.

"Is there any way to run multiple vim windows from one vim process, with them sharing the same internal clipboard?"

Yes, though you will need a Vim with support for it built. See `:h client-server` for details. (I never really got into using it regularly)

I use XMONAD with VIM for that. :)

I got into Awesome Window Manager a couple of months ago and have been getting to know how to manage remote Vim split windows with the help of NERDTree. A remote in-Vim managed tiling aproach would be cool though. Googling around, there's also https://github.com/fabi1cazenave/suckless.vim which emulates wmii and has "[s]tacked, [d]ivided, [f]ullscreen" modes. I need to learn tabs also. Things can get busy on 1024*768!

awesome wm, urxvt, ssh, tmux, vim, dwm.vim http://i.imgur.com/fC556.png

nerdtree <cr> opens things in the active window, nerdtree i opens a split in the master window, and a dwm.vim focus tidies things up. no fullscreen mode is unhandy though (i've not learnt how to unmaximise from Ctrl-w _ and Ctrl-w | yet).

edit; silly me, doing Ctrl-f now unmaximises the window.

THAT's AWESOME!!! Please file an issue with how you would see the user interface for a fullscreen mode. I'll be happy to add it asap! -> https://github.com/spolu/dwm.vim

done. as noted there, Ctrl-w | Ctrl-w _ to fullscreen does leave the other windows crushed at the edge, but i guess there might be a better method?

Actually I have an idea... CTRL-L goes fullscreen while CTRL-H brings back to tiled mode...

yep, you just navigate where you want and focus

CtrlP + tabbar has done a lot to make this Emacs user tolerate the occasional vim outing.

Wonderful, ta, I'll check them out soon! Links for the lazy yet interested; https://github.com/kien/ctrlp.vim http://www.vim.org/scripts/script.php?script_id=1338


That looks cool!

+1 for tmux, I've been using it for a few months and loving every minute of it. One question about tmux/dwm.vim, though: Is there a way we could have the "focus"/automatic layout feature in tmux?

I'd love to press a key combo and have tmux bring my current pane to the large left panel, switching it with whatever I had there before.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact