Sponsored Content
Full Discussion: Auto indent in vi
Top Forums UNIX for Dummies Questions & Answers Auto indent in vi Post 23224 by sierra_aar on Wednesday 19th of June 2002 03:39:39 AM
Old 06-19-2002
Question Auto indent in vi

Hi,

I use vi for my text editing. Is there a way to use smart indentation?
that is when adding a '{' or '}' that the editor will jump and advance, or any other thing like that?

thanks
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

vim indent

I know this is not a unix question but I also know that many of you use vim editor every day. So hoping to get some help, here it goes: How can I change my vim config file so that the indentations while c programming take 4 spaces instead of 8? I want the change to apply any further uses of... (4 Replies)
Discussion started by: Virtuosso
4 Replies

2. UNIX for Dummies Questions & Answers

[non-important] Indent here-docs?

I recently coded a typical ftp script looking like ftp -n $hostname << user $user $pass <commands..> quit ! I know the code fails when you try to indent it like: ftp $hostname << user $user $pass <commands..> quit ! Just for the sake of neat code, is there a... (4 Replies)
Discussion started by: yongho
4 Replies

3. UNIX for Dummies Questions & Answers

Indent output of an UNIX command

Hi, How do I indent 4 spaces for standard UNIX commands like ls -ltr (or grep)? For example, I want ls -ltra to output as: <<spaces here>>-rw-r----- 1 a345696 rtkdevel 455 Dec 6 14:52 file1 <<spaces here>>-rw-r----- 1 a345696 rtkdevel 455 Dec 6 14:52 file2 <<spaces... (2 Replies)
Discussion started by: ssray23
2 Replies

4. UNIX for Dummies Questions & Answers

vi auto indent whole file at once

Hi, I'm working on a big project and all the CPP and header files are in mess with respect to indentation. I would like to indent whole file(s) at once (like ctrl-shift-f in eclipse). Is there anybody who knows how to do that in vi/vim? thanks (2 Replies)
Discussion started by: SaTYR
2 Replies

5. Shell Programming and Scripting

Insert Tabs / Indent text

Hi, i need replace the slash (/) with a newline (\n) and a tab (\t). With 'find -type f' in a folder i got this output: ./1999/01/file1 ./1999/01/file2 ./1999/02/file1 ./2000/04/file1 ./2000/04/file2 ./2000/04/file3 ./2000/04/file4 ./2000/06/file1 ./2000/06/file2 ./2000/06/file3... (8 Replies)
Discussion started by: Tonda
8 Replies

6. Shell Programming and Scripting

How to indent the file lines using vi?

Every now and then I have to indent the lines in my script to 4 space characters. I generally do it line by line. Is there an automated command in vi using which I can indent some set of lines to desired number of space characters in one go. (2 Replies)
Discussion started by: paragkalra
2 Replies

7. Shell Programming and Scripting

Python indent - how do you do it?

A space, a tab? Just currious what, why, you indent in x way? Fwiw, I use vi, so kind'a currious how you vi folks approach indentation when writing code (eg python). Disclosure, I'm just learning python and have never seen a language use indentation so formally (I like it too:) ). I just... (7 Replies)
Discussion started by: sas
7 Replies

8. Shell Programming and Scripting

Parse excel with indent

hello everyone how to parse excel file with indents ? i was trying perl and there is Spreadsheet::ParseExcel::Format but i have no idea how to make it work docs says $format->{Indent} but it's not working also i was trying xls2csv and xlhtml but they don't care about indents at all :( i... (1 Reply)
Discussion started by: tip78
1 Replies
prompter(1mh)															     prompter(1mh)

Name
       prompter - prompting editor front-end

Syntax
       prompter [ options ] file

Description
       The editor is a rudimentary editor provided by and It is automatically called by the above commands; you do not need to specify it.

       The editor allows rapid composition of messages.  It is particularly useful to network and low-speed (less than 2400 baud) users of MH.

       The editor is an MH program.  Although is not invoked directly, it can have its own profile entry with options; see The and commands invoke
       in one of three ways: when invoked with the -editor prompter option; by an entry in the file; or by a command at the What now? prompt.	If
       you do not specify an editor in any of these ways, MH provides as the default editor for all of these commands.

       For information on how to use a different editor with MH commands, see the reference pages for the appropriate commands, and also

   Composing a Message with prompter
       When  you  create  a message with an MH command, the mail system provides a message template for you to fill in.  This template consists of
       two parts: the message header, comprising a number of header fields; and the body of the message, which is the area where you type the text
       of your message.

       The  editor  displays  each header field, one at a time, for you to fill in.  Fill in the component by typing the text that you want.  Type
       <RETURN> to move onto the next component.  Once you have moved on from a header field, you cannot edit what you have entered.

       If you want to leave a header field empty, simply type <RETURN>.  You can continue a header field over one line by typing a back-slash  ()
       before the <RETURN>.  Continuation lines must start with a blank (a space or a tab).

       The  start  of  the message body is indicated by a blank line or a line of dashes.  If you are creating a new message, the cursor is placed
       beneath this line to allow you to enter text.  If there is already some body text in the message (for example, if you are using an existing
       draft, or if you are forwarding a message), you will receive a prompt:
	   --------Enter additional text
       or:
	   --------Enter initial text
       The cursor is placed under the prompt to allow you to enter text.

       To finish the message, type <CTRL/D>.  You will then receive a prompt asking What now?.	See for more details of responses.

       An  interrupt,  usually	<CTRL/C>, during component typing will abort and the MH command that invoked it.  An interrupt during message-body
       typing is equivalent to <CTRL/D>, for historical reasons.

Options
       -prepend
       -noprepend
		 Adds text to the beginning of the message body, so that the rest of the body follows.	This is useful for the command.   You  can
		 suppress this behavior by using the -noprepend option.

       -rapid
       -norapid  Causes  the text not to be displayed on your terminal if the draft already contains text in the message-body.	This is useful for
		 low-speed terminals.  You can suppress this behavior by using the -norapid option.

       -erase char
		 Specifies the line-editing characters, where char may be a character or 
nn, where nnn is the octal value for the character.

       -kill char
		 Specifies the line-editing characters, where char may be a character or 
nn, where nnn is the octal value for the character.

       The first argument to which is not an option is taken as the name of the draft file, and subsequent non-flag arguments are ignored.

       The default settings for are:

	      -prepend
	      -norapid

Restrictions
       The editor uses therefore do not edit files with nulls in them.

Profile Components
       prompter-next:	To name the editor to be used on exit from prompter
       Msg-Protect:	To set protections when creating a new draft

Files
       The user profile.

       Temporary copy of message.

See Also
       capsar(1), comp(1mh), dist(1mh), forw(1mh), repl(1mh), whatnow(1mh), stdio(3s), mh_profile(5mh)

																     prompter(1mh)
All times are GMT -4. The time now is 01:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy