Re: Why?? (prog question)

看板FB_chat作者時間17年前 (2009/04/06 11:06), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串16/23 (看更多)
William Gordon Rutherdale wrote: > [...] I don't think I've ever written the word "dedent" in my > life, at least until this paragraph. In fact, I'm not convinced > that it IS a word. It's a technical term, sometimes used in the context of code editors to denote the opposite of indent. For example, suppose I have this in my editor: def somefunction (myargs): if somecondition: return 42 The cursore is behind the "42". Now I press <Enter>, and the cursor goes to column 8 in the next line, right below the "r" of the return command. This feature is called auto-indent. Now I press the <Backspace> key *once*, and the cursor goes back four positions so it is below the "i" of the if command. This feature is called dedent. It doesn't actually matter whether those positions are represented with tabs or spaces internally. In fact I don't *want* to know. The editor should do the right thing if it is configured correctly. Regarding the "modern editors" that I mentioned: These features existed in editors 15 years ago already, so my definition of "modern" is not that narrow. Also, most incarnations of vi support these features today, but there are a few exceptions (for example, /usr/bin/vi on Solaris is a little bit brain-damaged, but you can easily install vim from a package). Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Gesch輎tsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M榀- chen, HRB 125758, Gesch輎tsf梶rer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Perl will consistently give you what you want, unless what you want is consistency." -- Larry Wall _______________________________________________ freebsd-chat@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-chat To unsubscribe, send any mail to "freebsd-chat-unsubscribe@freebsd.org"
文章代碼(AID): #19sN6w00 (FB_chat)
討論串 (同標題文章)
文章代碼(AID): #19sN6w00 (FB_chat)