johnb@barfly.corp.sun.com (John Benninghoff) (04/04/91)
Is it possible to start vi in insert mode? vi '+i' didn't work. -- John Benninghoff Sun Microsystems
dalessio@motcid.UUCP (Mario D'Alessio) (04/06/91)
johnb@barfly.corp.sun.com (John Benninghoff) writes: >Is it possible to start vi in insert mode? vi '+i' didn't work. >-- >John Benninghoff >Sun Microsystems I believe you can put a line with just "i" on it at the end of your .exrc file. ****************************************************************** * ************************************************************** * * * * * * * Mario D'Alessio Motorola, Inc. * * * * dalessio@motcid.UUCP Cellular Infrastructure Group * * * * * * * ************************************************************** * ******************************************************************
hansm@cs.kun.nl (Hans Mulder) (04/09/91)
In <6141@feldspar23.UUCP> dalessio@motcid.UUCP (Mario D'Alessio) writes: >johnb@barfly.corp.sun.com (John Benninghoff) writes: >>Is it possible to start vi in insert mode? The only way I know is to stuff the character 'i' into the terminal's input queue using ioctl(0, TIOCSTI, 'i'). >>vi '+i' didn't work. The + is followed by an ex commmand. You can't invoke the :insert command from within vi, because it is a multi-line command and the :-interface only supports one line commands. >I believe you can put a line with just "i" on it at the end >of your .exrc file. Sure. You can also put an empty line there. Both get you the message "No lines in the buffer". They don't put you in any kind of insert mode. And if an 'i' in a .exrc were to put you in insert mode, it would be ex :insert mode, which is not what John asked. -- Have a nice day, Hans Mulder hansm@cs.kun.nl