X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Newsgroups: comp.os.msdos.djgpp Date: Wed, 22 Apr 2009 14:50 GMT From: "A. Wik" Subject: Re: Which editor do you use? In-Reply-To: Message-ID: References: Mail-To-News-Contact: abuse AT dizum DOT com Organization: mail2news AT dizum DOT com Lines: 52 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 2 Apr 2009, Rugxulo wrote: > Okay, so I'm curious as to what the regulars here use for text > editing. I don't know if I can be regarded as a regular, but I tend to prefer VIM (http://vim.org/) these days. Before that, I used JOE (get it from my FTP site at ftp.narpes.com:/pub), and before that I used the Borland Pascal IDE. On a daily basis, I also need to use more primitive tools, like "cat > file.c", and old nvi and sh lacking command line history. VIM works very well under DOS, especially if you run smartdrv, VCACHE or similar and a LFN provider such as the Win9x IFSMGR. The DJGPP-compiled DOS-executable always displays DOS files correctly. The GUI (win32) version, called GVIM, is not bad either, if you use settings like the following: (From %HOME%/.gvimrc:) " This will fix proper CP437 at least on Win9x: set guifont=Courier_New:h10:cOEM set encoding=cp437 set termencoding=latin1 set fileformats=unix,dos colorscheme borland2 set lines=64 set formatoptions=q The fileformats=unix,dos causes the single line feed format of text files to be preferred. I've found that you almost never need the CR-LF format. Only some dumb apps like Notepad.exe and the builtin "type" command of command.com don't understand such basics. The DJGPP implementation of less(1) would be a replacement for "type" and "more", except that it tends not to display high or low CP437-characters properly, and in fact, VIM tends to do a better job: cat file.txt | vim - (By the way, did you know that Unix ttys typically require CR-LF just as much as the DOS console to avoid the staircase effect? The secret is that the terminal driver inserts a CR automatically, so you won't have to, unless you change the settings. Take a look at stty(1),. You can use it to set EOF to ^Z too, at least on some systems; not that one would'd want to.) -aw PS. This was delayed by a number of days due to dead mail2news gateways.