after :vert sba hide all windows again except the active on
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
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
Loop through all lines in a file
Hello, I'm trying to write my first vim-plugin, but I got stucked. I managed to execute an external command, which gives me back a list of filenames. One filename per line. For each of the filenames I want to execute another command. I tried it with code: let line=getline(.) while (strlen(line)!=0) do sth. here -- construct the external command and so on j let line=getline(.) endwhile When I execute the code, it runns into an infinite loop, because the lines are joined together with each loop file: text1.txt text2.txt text3.txt after interrupting the loop the looks like text1.txt text2.txt text3.txt it seems j is interpreted as a J (join line) here. And by the way, I think this is a bad solution anyway. Can someone give me a hint how to do it in a clean way?
execute macro in bufdo command
Hi all, I recorded a macro (search for line and paste 3 lines out of the clipboard*p ) I want to execute the macro in 15 different buffers and tried it with the bufdo - Command, without success :bufdo @a | update Vim prints 30 lines (every first line the filename and every second line the search-criterium), then it waits for me pressing a key. But nothing changed in the files. Does someone can give me a hint?