You are not logged in. Login Now
 0-22   22-46   47-59        
 
Author Message
25 new of 59 responses total.
mcnally
response 22 of 59: Mark Unseen   Feb 23 18:56 UTC 2006

 Spelling it out a little more clearly, here's how lijun can try
 it out using vim.

 Start by editing a file, for example foo.c:

    vim foo.c

 Now make a few changes to the file (just to prove we can have
 more than one modified file open at a time, just as you asked..)

 Now use the vim windowing commands to create a new window:

    ^Wn  (that's control-W, followed by n.)

 Your cursor will be moved to the new window.  Open a second file
 for editing in that window, e.g.:

     :e bar.c

 Now you'll have foo.c open for editing in the bottom half of the
 screen and bar.c open for editing in the top half.  You can switch
 between the two using ^W^W and when you're done you can save
 either or neither.
naftee
response 23 of 59: Mark Unseen   Feb 23 21:54 UTC 2006

can anyone give me a good reason for using vi on a normal system ?
twenex
response 24 of 59: Mark Unseen   Feb 23 21:58 UTC 2006

OK, I'll bite.

Because once you've learnt it's quick to use and doesn't get in the way. (Who
REALLY needs all those instructions at the bottom of a nano window once
they've used it for the billionth time?)
kingjon
response 25 of 59: Mark Unseen   Feb 23 21:59 UTC 2006

Because once you've passed the learning curve, it's the easiest editor to use.

naftee
response 26 of 59: Mark Unseen   Feb 23 22:15 UTC 2006

oh.  but it mustn't be the BEST editor, because here you guys are recommending
emacs for the job.
remmers
response 27 of 59: Mark Unseen   Feb 23 22:24 UTC 2006

I'm the only one I've noticed recommending emacs.  But I'm quite serious
about it.  I prefer it for serious code development.  I like vi for
quick editing jobs like editing config files or posting responses here.

"Best" is inherently a subjective judgement when it comes to editors, in
any case.
mcnally
response 28 of 59: Mark Unseen   Feb 23 22:43 UTC 2006

re #23:  Because it's efficient, lightweight, powerful, and can be found
already installed on a very wide array of systems.

However, I have to admit that when an improved vi alternative such as vim
or nvi are available, I generally use those instead.
twenex
response 29 of 59: Mark Unseen   Feb 23 22:44 UTC 2006

Yeah. But friends don't let friends use nano! (shudder)
marcvh
response 30 of 59: Mark Unseen   Feb 23 22:59 UTC 2006

I pretty much go along with Remmers's thoughts in #27.  I would not try
to write a 10,000 line class library in vi; vi is for writing a 10 line
email message, or for editing /etc/foo.conf.
mcnally
response 31 of 59: Mark Unseen   Feb 23 23:21 UTC 2006

 re #30:  There are modern vi variants with syntax highlighting, 
 code folding, and other programmer power features.  I'll admit
 that emacs has very nice integration with gcc and gdb but I'd
 have no problems with using vi for the *editing* part of a large
 project.  The problem only comes in when you compare it to 
 options that provide a lot more functionality than just editing.
kingjon
response 32 of 59: Mark Unseen   Feb 24 01:38 UTC 2006

Vi is my editor of choice for all pure-text word processing I do, except
perhaps entering responses in Picospan (because it erases the last responses in
my scroll-back buffer). The only reason I might not try to write a 10,000 line
library in vi is that jumping around would take minutes per jump due to the
immense size of the file -- and emacs would probably be worse on that score.

marcvh
response 33 of 59: Mark Unseen   Feb 24 04:27 UTC 2006

It would be silly to put 10,000 lines of code into a single file, but I do
regularly open text files of that size in both vi and emacs, usually log
files for viewing.  As long as the machine in question has sufficient memory
it's not a big deal.
jep
response 34 of 59: Mark Unseen   Feb 24 19:14 UTC 2006

I use vi for viewing huge log files, too.

I have vim installed on my Windows machines at work and home.  I need 
it.  I can do case-sensitive and pattern based searches in vi or vim 
which I cannot do in any other editor available to me.  I can also do 
find and replace operations in vi or vim much more easily than in any 
other editor available to me.

I don't use vi/vim for every situation, but I use Wordpad, Notepad and 
MS Word (or 602Text) as required for different things.  But I like vi 
or vim the best and use them the most often.
remmers
response 35 of 59: Mark Unseen   Feb 24 22:11 UTC 2006

I'll agree that vi excels at repetitive find-and-replace.  If I'm in
emacs and want to do something like that, I switch emacs to vi-emulation
(by a single keystroke), do my find-and-replaces via the usual vi
keystrokes, then switch back to native emacs mode (also via a single
keystroke).
mcnally
response 36 of 59: Mark Unseen   Feb 25 00:50 UTC 2006

 What John doesn't tell you is that that "single keystroke" requires
 a chord combination using six different modifier keys, plus the 
 EditMode key, a seventh key that isn't available on consumer-grade
 keyboards produced for sale in the western hemisphere.

 John can manage it because he's a concert-quality ragtime pianist
 but if any of you were to try it without proper training your fingers
 would snap like twigs.

remmers
response 37 of 59: Mark Unseen   Feb 25 13:42 UTC 2006

Foof.  The keystroke I'm talking about is control-Z.
mcnally
response 38 of 59: Mark Unseen   Feb 25 19:34 UTC 2006

 Well, you must've remapped it then..  :-p
naftee
response 39 of 59: Mark Unseen   Feb 25 21:54 UTC 2006

poof
remmers
response 40 of 59: Mark Unseen   Feb 26 21:31 UTC 2006

Re #38:  Nope, control-Z is the DEEfault.

I should mention that another reason I use emacs these days is that by
installing the nxml plugin, you get the world's greatest XML (and hence
XHTML) editor.  Color syntax highlighting, on-the-fly well-formedness
checking -- and if you've specified a RelaxNG schema, it checks schema
conformance on the fly too.  Awesome!
mcnally
response 41 of 59: Mark Unseen   Feb 26 22:43 UTC 2006

 re #40:
 > Nope, control-Z is the DEEfault.

 Aha!  Proof of a sinister conspiracy by the authors to render their 
 editor invulnerable to job control, thus preventing their hapless
 victims from suspending the emacs process.  Eeeeeevil!     :-p
fudge
response 42 of 59: Mark Unseen   Feb 27 10:22 UTC 2006

I already pepper my files with ":w" 's when in gui editors... if I started
using something like emacs I'd be f**ked
remmers
response 43 of 59: Mark Unseen   Feb 28 14:11 UTC 2006

Re #41: When ctrl-z is bound to vi mode switching, you can suspend emacs
by typing ctrl-x ctrl-z.

Re #42: Emacs' file-save command is ctrl-x ctrl-s, which is easier to
type than vi's :w.
twenex
response 44 of 59: Mark Unseen   Feb 28 14:12 UTC 2006

<twenex raises one eyebrow>
fudge
response 45 of 59: Mark Unseen   Feb 28 14:35 UTC 2006

hmm yeah but most of those key presses could do something potentially much
more nasty than putting a ":w" in a file, given that most control-##
combinations are mapped to commonly used functionality like copy/cut/paste,
undo, print... maybe 15 years ago, but today, I'm quite reluctant to embrace
an app that works completely different from the rest of the OS/Desktop/apps
gull
response 46 of 59: Mark Unseen   Mar 4 00:30 UTC 2006

I don't like vi for that reason.  The modal design is too different 
from every other app I use. 
 0-22   22-46   47-59        
Response Not Possible: You are Not Logged In
 

- Backtalk version 1.3.30 - Copyright 1996-2006, Jan Wolter and Steve Weiss