Home Register Members List Search Today's Posts Mark Forums Read

Go Back   TechFuels Forum > Software > Windows 7/2000/NT

Reply
 
LinkBack Thread Tools
Dexter Hogg
Member
 

Dexter Hogg is offline  
Old 07-01-2009, 12:27 PM
  #1 (permalink)
Split windows in vim

There are certain occasions when you need to work with multiple files simultaneously. Normally when you want to refer to the contents of a file while working on another file, you open two instances of editors side-by-side. But Vim is intelligent enough to open multiple files simultaneously.

To start a horizontal window by splitting the current Vim instance, use the command Ctrl+w+s, or at the command line, use :split. For a vertical split, type Ctrl+w+h, or at the command line, :vsplit. Refer to Figure 4. You can now switch between different split instances using the Ctrl+w+w shortcut. These multiple splits can be further split using the same commands. The split windows act as separate instances of Vim so that we can open and work on different files, side by side.

Name:  Split windows in vim.jpg
Views: 153
Size:  65.4 KB

To exit from a split window, use the Ctrl+w+q shortcut, or at the command line, use :q!

While we're on the subject of split windows, there is a command called vimdifffor viewing the difference between two files. Suppose you have two versions of a text file, and you want to look at the changes made and compare it with the original, use the command.

When you scroll through the file, both file instances will be scrolled. Sounds interesting, right?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How Can The Repair Of Windows Vista Home After An Attempt To Install Windows Xp Syste anna26 Windows Vista 0 03-25-2009 10:35 AM
HJ Split or split and Rejoin Program Error janess22 Programming 1 02-10-2009 05:19 AM
Split Design PS/2 Keyboard owinsh.jafonh Everything Else 0 08-19-2008 10:27 AM
As an operating system Windows Vista in dual-boot mode, in conjunction with Windows X techno23 Applications 0 02-11-2008 10:17 AM
i have a windows 98 with a celeron 535 processor, can i upgrade to windows 2000 without a bunch of problems.? billb Windows 7/2000/NT 2 01-30-2008 02:56 PM


All times are GMT +1. The time now is 05:37 PM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0
Copyright Techfuels -->
SEO by SubmitEdge


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151