[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Python Mode, managing and converting TABS
From:
Tim Johnson
Subject:
Python Mode, managing and converting TABS
Date:
2014年5月28日 11:13:45 -0800
User-agent:
Mutt/1.5.21 (2010年09月15日)
I'm currently using
GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10 on
Ubuntu 12.04, but expect to have to also use --no-window-system
("console mode") on occassion.
I have used emacs extensively in the distant past (up 'til 2008), so
am re-acquainting myself with the system.
I have much legacy python code that has "hard tabs" and to meet
the python style guides, will have to be converted to "soft tabs".
I.E. TAB => " "
I also need to configure emacs so that TAB (or Ctrl-i) inserts four
spaces instead of the TAB character.
I currently have this in my .emacs [code]
(add-hook 'python-mode-hook
'(lambda ()
(turn-on-font-lock)
(setq default-tab-width 4)
(setq tab-width 4)
(imenu-add-menubar-index)
(setq imenu-sort-function 'imenu--sort-by-name)))
[/code]
I'd welcome any and all advice, pointers to previous discussion
would are solicited.
thanks
--
Tim
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com
- Python Mode, managing and converting TABS,
Tim Johnson <=