after :vert sba hide all windows again except the active on

2006-06-22 Thread Johannes Schwarz
I just realized the :sba   or even better the  :vert sba   command.

Is it possible to hide all windows again except the active one, which
the cursor is in?

And another question:
When I set the all windows to scrollbind and make jump to a special
line, I want each window to show that line and not the offset to the
original line.
One solution is to do  :windo normal gg  and then  :windo set
scrollbind   but is there an easier way?




Re: after :vert sba hide all windows again except the active on

2006-06-22 Thread A.J.Mechelynck

Johannes Schwarz wrote:

I just realized the :sba   or even better the  :vert sba   command.

Is it possible to hide all windows again except the active one, which
the cursor is in?


Method 1: To close all windows except the current one:

:only

Method 2: To squash all non-current windows to their status line and 
nothing else:


:set noequalalways winminheight=0 winheight=



And another question:
When I set the all windows to scrollbind and make jump to a special
line, I want each window to show that line and not the offset to the
original line.


'scrollbind' is to have several windows, which may or may not show the 
same file, to move up and down by the same amount. You would normally 
set 'scrollbind' once the windows are synchronised to corresponding 
lines, which may or may not be at the same position in their respective 
files.



One solution is to do  :windo normal gg  and then  :windo set
scrollbind   but is there an easier way?






If there is some particular data for which you can search all files to 
synchronise them, you can do


:silent windo normal /pattern/
:windo normal z.
:windo setlocal scrollbind

or on a single line

	:exe silent windo normal /pattern/ | exe windo normal z. | windo 
setlocal scrollbind


(in this last example, disregard any line breaks added by my mailer or 
by yours.)




Best regards,
Tony.


RE: after :vert sba hide all windows again except the active on

2006-06-22 Thread Jansen of Lorkeers, Richard
Hello,

I am a beginning user of vim and I just tried to create a .vimrc file. It is
oke when I use 1 command but if I use two commands I get a error. Any one
knows what the problem is. I can't find it in the documentation and neither
in the example.

Richard


Re: after :vert sba hide all windows again except the active on

2006-06-22 Thread Johannes Schwarz


 Jürgen Krämer [EMAIL PROTECTED] 22.06.2006 10:22 


Hi,

Johannes Schwarz wrote:

 I just realized the :sba   or even better the  :vert sba   command.
 
 Is it possible to hide all windows again except the active one, which
 the cursor is in?

have a look at

  :help :only

This is exactly what I was looking for.

 And another question:
 When I set the all windows to scrollbind and make jump to a special
 line, I want each window to show that line and not the offset to the
 original line.
 One solution is to do  :windo normal gg  and then  :windo set
 scrollbind   but is there an easier way?

Does

  :set scrollopt+=jump

help?

No, it still jumps only to the offset of the original line, but I can live with 
:window normal gg

Thanx a lot for your help

Ciao

Johannes




Re: after :vert sba hide all windows again except the active on

2006-06-22 Thread Gerald Lai

On Thu, 22 Jun 2006, Johannes Schwarz wrote:





J?rgen Kr?mer [EMAIL PROTECTED] 22.06.2006 10:22 




Hi,



Johannes Schwarz wrote:



I just realized the :sba   or even better the  :vert sba   command.

Is it possible to hide all windows again except the active one, which
the cursor is in?



have a look at



 :help :only


This is exactly what I was looking for.

[snip]

I believe ZoomWin would also do what you want:

  http://www.vim.org/scripts/script.php?script_id=508

HTH.
--
Gerald

Re: after :vert sba hide all windows again except the active on

2006-06-22 Thread A.J.Mechelynck

Jansen of Lorkeers, Richard wrote:

Hello,

I am a beginning user of vim and I just tried to create a .vimrc file. It is
oke when I use 1 command but if I use two commands I get a error. Any one
knows what the problem is. I can't find it in the documentation and neither
in the example.

Richard




For :set and friends, omit the verb:

:set nobackup writebackup

For most commands, separate them with a | bar:

:if tenc ==  | let tenc = enc | endif | set enc=utf-8

Some commands see the bar as part of their arguments, see :help :bar. 
If you still want to use another command on the same line, wrap the 
first one in an :exe[cute] command (see :help :exe).


In most cases though, one command per line is the way to go:

-8 ~/.vimrc -
set nocompatible
if has(multi_lang)
  if has(unix)
language messages C
  else
language messages en
  endif
endif
runtime vimrc_example.vim
filetype indent off
set autowriteall nobackup writebackup
if has(wildmenu)
  set wildmenu
endif
if has(gui_running)
  if has(gui_gtk2)
set guifont=BH\ LucidaTypewriter\ 12
  elseif has(gui_kde)
set guifont=BH\ LucidaTypewriter/12
  elseif has(x11)
set guifont=*-lucidatypewriter-medium-r-normal-*-*-160-*-*-m-*-*
  else
set guifont=Lucida_Console:h12:cDEFAULT
  endif
  winpos 0 0
  set lines= columns=
endif
if has(multi_byte)
  if termencoding == 
let termencoding = encoding
  endif
  set encoding=utf-8
endif
-8-
etc.


Best regards,
Tony.