Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Religion > Emacs > One press of Ta...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 262 of 352
Post > Topic >>

One press of Tab-key in the beginning of every line?

by Juhapekka Tolvanen <SNAFU.juhtolv@[EMAIL PROTECTED] > Oct 28, 2007 at 11:24 PM

Dear brothers and sisters of faith: Some temptations are trying to drag
me away from The One True Editor. My problem is this:

As you already know, most major modes of emacs make quite sensible
indentations. I only need to go to the beginning of each line and then
press Tab-key. But how can I have it done automatically? I mean
something like this:

1) I open some file to emacs
2) I give some line-command (via M-x or otherwise) and it runs this
   algorithm:
   2.1) Move cursor to the beginning of first line.
   2.2) Edit that line in that way how pressing Tab-key would edit it in
        current major-mode.
   2.3) Move cursor to the beginning of next line
   2.4) Edit that line in that way how pressing Tab-key would edit it in
        current major-mode.
   2.5) If we are not in the last line of buffer, go to step 2.3
   2.6) If we are in the last line of buffer, exit from this algorithm.
2) I save that file.


In addition, it would be nice, if in SGML-, XML- and HTML-modes
everything between <pre> -tags were skipped by that algorithm. It is not
fun, if some unwanted indentations are added there, because WWW-browsers
will show them, too.


-- 
Juhapekka "naula" Tolvanen * http colon slash slash iki dot fi slash
juhtolv
"S teki. S teki. S teki. S wo kakusei. S teki. S teki. S teki. S wo
umekome.
S teki. S teki. S teki. M wo setsudan. S teki. S teki. Puratonikku wo
hajimemashou."                                                   Dir en
grey




 4 Posts in Topic:
One press of Tab-key in the beginning of every line?
Juhapekka Tolvanen <SN  2007-10-28 23:24:15 
Re: One press of Tab-key in the beginning of every line?
Gian Uberto Lauri <sai  2007-10-29 09:58:56 
Re: One press of Tab-key in the beginning of every line?
Juhapekka Tolvanen <SN  2007-10-30 04:25:01 
Re: One press of Tab-key in the beginning of every line?
Gian Uberto Lauri <sai  2007-10-30 09:34:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Fri Jul 4 22:40:51 CDT 2008.