ソースコードのフォーマットでは、4つタブでのスペーシングを使用しています。 (タブはスペースで拡張できません。)
emacsに関しては、~/.emacs初期化ファイルに 下記のようなものを追加して下さい。
;; check for files with a path containing "postgres" or "pgsql"
(setq auto-mode-alist (cons '("\\(postgres\\|pgsql\\).*\\.[ch]\\'" . pgsql-c-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\(postgres\\|pgsql\\).*\\.cc\\'" . pgsql-c-mode) auto-mode-alist))
(defun pgsql-c-mode ()
;; sets up formatting for Postgres C code
(interactive)
(c-mode)
(setq-default tab-width 4)
(c-set-style "bsd") ; set c-basic-offset to 4, plus other stuff
(c-set-offset 'case-label '+) ; tweak case indent to match PG custom
(setq indent-tabs-mode t)) ; make sure we keep tabs when indenting
viに関しては、~/.vimrc、 またはその類のファイルに下記の内容が含まれている必要があります。
set tabstop=4
または、vi内で下記のようにコマンドを実行して下さい。
:set ts=4
テキストを読むためのツール、moreと lessは下記のようにすれば実行できます。
more -x4
less -x4