逝水流年

This is a blog to record my life, my work, my feeling …

Gvim Use Wmctrl in Ubuntu

Use the wmctrl tools could maximize the windows of gvim in ubuntu. But I find a small issue for that.

Here is the wrong script:

1
2
3
4
5
6
7
8
  if has("win32")
    au GUIEnter * simalt ~x
else
    au GUIEnter * call MaximizeWindow()
endif
function! MaximizeWindow()
    silent !wmctrl -r :ACTIVE: -b add, maximized_vert,maximized_horz
endfunction

You could see that between “,” and “maximized_vert” on line 8, there is a blank. It’s the reason why the script can’t works. So I remove the blank and it woks fine. So strange, because this scripts works well on my mac mini.

Comments