From owner-freebsd-questions@FreeBSD.ORG Sun Jul 26 03:56:38 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A51601065670 for ; Sun, 26 Jul 2009 03:56:38 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from poseidon.ceid.upatras.gr (poseidon.ceid.upatras.gr [150.140.141.169]) by mx1.freebsd.org (Postfix) with ESMTP id 1F15B8FC13 for ; Sun, 26 Jul 2009 03:56:37 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from mail.ceid.upatras.gr (unknown [10.1.0.143]) by poseidon.ceid.upatras.gr (Postfix) with ESMTP id 89419EB4FA3; Sun, 26 Jul 2009 06:32:46 +0300 (EEST) Received: from localhost (europa.ceid.upatras.gr [127.0.0.1]) by mail.ceid.upatras.gr (Postfix) with ESMTP id 77D9245088; Sun, 26 Jul 2009 06:32:46 +0300 (EEST) X-Virus-Scanned: amavisd-new at ceid.upatras.gr Received: from mail.ceid.upatras.gr ([127.0.0.1]) by localhost (europa.ceid.upatras.gr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qm0r0dIYz4+f; Sun, 26 Jul 2009 06:32:46 +0300 (EEST) Received: from kobe.laptop (adsl129-11.kln.forthnet.gr [77.49.248.11]) by mail.ceid.upatras.gr (Postfix) with ESMTP id 2728A4503F; Sun, 26 Jul 2009 06:32:46 +0300 (EEST) Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n6Q3Wi8I046806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 26 Jul 2009 06:32:45 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n6Q3WhUY046805; Sun, 26 Jul 2009 06:32:43 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Steve Bertrand References: <4A6A72A6.1030009@ibctech.ca> Date: Sun, 26 Jul 2009 06:32:32 +0300 In-Reply-To: <4A6A72A6.1030009@ibctech.ca> (Steve Bertrand's message of "Fri, 24 Jul 2009 22:49:10 -0400") Message-ID: <871vo4p19r.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: "questions@freebsd.org" Subject: Re: A question for developers X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jul 2009 03:56:38 -0000 --=-=-= On Fri, 24 Jul 2009 22:49:10 -0400, Steve Bertrand wrote: > Forgive the verbosity. > > Before anything else, I'd appreciate it if my requirements were actually > read before providing any feedback. I know that there are qualified > persons here to legitimately answer my question, so if a flame war does > ensue, I ask that you refrain from responding. > > I'm looking for a new editor. > > I continue to claim that I am not a programmer, but I'm getting to the > point where my current editor can not do what I need it to do for the > programming I have been doing (90% Perl, a bit of C and the rest is > shell/awk stuff if you want to call that programming). > > Currently, I use "ee". The ONLY reason I have outgrown it, is due to the > fact that I can't find an easy way to change my \t to four chars instead > of eight. Both editors/vim and editors/emacs can do what you describe and a *LOT* more. You should at least try them for a while and see which one of the two fits your style of work better. To get you started by a sneak preview of what they can do, here's a short example of how my .vimrc and .emacs files set options that apply only to C sources. First the ~/.vimrc options: " .vimrc options that apply to all files set softtabstop=8 "how much to indent when TAB is typed set tabstop=8 "how many columns a literal TAB buffer byte indents set textwidth=0 "where do we wrap lines? " vim options that apply only to C sources if !exists("format_keramida_cmode") let format_keramida_cmode = 1 " formatting C code autocmd BufNewFile,BufRead *.c,*.h set autoindent showmatch autocmd BufNewFile,BufRead *.c,*.h set formatoptions=tcq2l textwidth=74 autocmd BufNewFile,BufRead *.c,*.h set shiftwidth=8 softtabstop=8 tabstop=8 noexpandtab endif When using VIM, you can get an indentation style of 4 columns that uses only spaces (no TABs at all) by setting `softtabstop=4' and `expandtabs'. Then the ~/.emacs options for GNU Emacs: (defun keramida/cc-mode/setup () "Configure cc-mode and derivatives for KNF style." (interactive) ;; Basic indent is 8 columns (make-local-variable 'c-basic-offset) (setq c-basic-offset 8) ;; Continuation lines are indented 4 spaces (make-local-variable 'c-offsets-alist) (c-set-offset 'arglist-cont 4) (c-set-offset 'arglist-cont-nonempty 4) (c-set-offset 'statement-cont 4) ;; Fill column (make-local-variable 'fill-column) (setq fill-column 74) ;; Indenting to a tab stop always inserts TAB characters (setq indent-tabs-mode t) (setq c-tab-always-indent t)) ;; Install my own hook for C/C++ mode. (add-hook 'c-mode-common-hook 'keramida/cc-mode/setup) When using Emacs, you can get an indentation style that uses 4 columns and only spaces by setting `indent-tabs-mode' to `nil' and then tweaking `c-basic-offset' to 4: (setq indent-tabs-mode nil) (setq c-basic-offset 4) There are _tons_ of other features in both editors. I lean towards Emacs, because I like the way it works, but you can do so many things with both editors that I have been using both for more than 16 years now. I like both of them :-) --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkprzlsACgkQ1g+UGjGGA7aX1QCgoXIqIgnV3tbsC0dycf0RWHMe oYwAnRITQSVZV6CNNJc2l+G3o5swnxHN =v5L8 -----END PGP SIGNATURE----- --=-=-=--