Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Shell vim defaulting to Insert or Command mode Post 303011689 by derndingle on Monday 22nd of January 2018 12:17:19 PM
Old 01-22-2018
Shell vim defaulting to Insert or Command mode

On a daily basis I need to SSH into several different RHEL servers using Putty.

On some of the servers, if I up arrow to get a previous command, it automatically starts in Input Mode, so if I press up arrow, then 'x' it will type the letter x at the end of the command line. On other servers, it automatically starts in Command Mode, so if press up arrow, then 'x' it deletes the first character of the command.

I'm trying to understand how this default behavior is controlled. I've looked through the .bashrc, .bash_profile, .vimrc files and don't think I see where this is being set.

I prefer the second way since I spent many years working on AIX and that's the way it worked, but the biggest thing is I'd like is to make it consistent.

It seems like there must be a simple answer, but I must be using the wrong search terms trying to find it. Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to run shell command and insert results to existing xml file

Hi. Thanks for any help with this. I'm not new to programming but I am new to shell programming. I need a script that will 1. execute 'df -k' and return the volume names with specific text 2. surround each line of the above results in opening and closing xml tags 3. insert the results of step... (5 Replies)
Discussion started by: littlejon
5 Replies

2. Shell Programming and Scripting

insert escape charactor within VIM

Hi, I need to send "^[" command to the buffer. I tried to use insert within VIM and press 'ctrl' key and then '^' and '[' key. but it didn't work. Does anyone know how to do it? Thanks a lot! Julie (2 Replies)
Discussion started by: cin2000
2 Replies

3. UNIX for Dummies Questions & Answers

Insert line break in vi's command mode

Hi, When working in vi, the CTRL+j command for merging lines is very convenient. Is there an equivalent for splitting them (inserting a line break)? I often find myself pressing "i" + "return" + "esc", which I find a bit lengthy. Thanks in advance! (3 Replies)
Discussion started by: Skogsmulle
3 Replies

4. UNIX for Dummies Questions & Answers

unable to insert '#' char for a file in vi mode

Hi all, I am very new to this forum and also new to UNIX. I am working on HP-UX machine. I noticed that for some of the users I am unable to insert the # character in a file in vi mode. May I know y am I having the problem and how can I resolve this Thanks, Maroli (1 Reply)
Discussion started by: maroli
1 Replies

5. UNIX for Dummies Questions & Answers

vi/vim insert behaviors

While using vi or vim on different boxes, I experience different behaviors when I'm inserting (i) or writing on a new line (o). On the Linux box, I can insert and delete with my backspacekey while in the insert mode. It acts a little more like pico,nedit, etc. On the SunOS box, it's a headache... (3 Replies)
Discussion started by: mrwatkin
3 Replies

6. Shell Programming and Scripting

Calling vim shell script

Hi All, I was looking to open a file using vim within shell script. Can someone please suggest a way/syntax for this? Thanks in advance. (5 Replies)
Discussion started by: jal_capri
5 Replies

7. Solaris

Very Importan - Vim Settings - Error while opening a File using vim

I downloaded vim.7.2 and compiled the vim source . Added the vim binary path to PATH (Because iam not the root of the box) when i load the file using vim it throws me an error Error detected while processing /home2/e3003091/.vimrc: line 2: E185: Cannot find color scheme darkblue line... (0 Replies)
Discussion started by: girija
0 Replies

8. Shell Programming and Scripting

Insert shell command into first line of output file

How can I insert the command executed on the shell into the first line of my output file? For example if I execute; zcat *.gz |grep “User5501” > users.out How can I make my users.out look like; zcat *.gz |grep “User5501” > users.out User5501 PA User5501 UA User5501 ZA... (3 Replies)
Discussion started by: lewk
3 Replies

9. Shell Programming and Scripting

vim command for a search

how can i search each line for ROCT and ROCT1.ROCT1 will be always 1 line after ROCT. Both the patterns will be found at the end of the line (in alternate lines) <pattern file> (rising edge-triggered flip-flop clocked by ROCT) Endpoint:... (2 Replies)
Discussion started by: dll_fpga
2 Replies

10. Shell Programming and Scripting

Vi / vim - Insert a external command response

I would like to execute and external command and insert it into a particular area of the file I am editing. Note that I have the ORIGINAL AT&T vi training doc dated 1987. Doesnt explain it. As an example, in a vi editor I have I would like the result : After executing the following... (1 Reply)
Discussion started by: popeye
1 Replies
CKEY(7) 						 Miscellaneous Information Manual						   CKEY(7)

NAME
ckey - The standard definition of each function key in cWnn system. DESCRIPTION
---------------------------------------------------------- | Function | Other | Description | Function | Function | | Keys | Keys | | In Input | In Input | | | | | State | State | | (a) | (b) | (c) | (d) | (e) | |----------+-------+---------------+------------+----------| | - | ^ |To toggle input| Similar to | Similar | | | | mode ON/OFF | (c) | to (c) | |----------+-------+---------------+------------+----------| | PF1 | - | To toggle | To Toggle | Similar | | | | phonetic input| among input| to (d) | | | | mode | methods | | |----------+-------+---------------+------------+----------| | PF2 | - | To toggle | To toggle | Similar | | | | encoded input | among input| to (d) | | | | mode | methods | | |----------+-------+---------------+------------+----------| | PF3 | - | To toggle | To toggle | Similar | | | | ASCII | among | to (d) | | | | character | different | | | | | input mode | ASCII | | | | | | character | | | | | | input | | | | | | methods | | |----------+-------+---------------+------------+----------| | PF4 | - | Toggle other | To toggle | Similar | | | | input mode | among | to (d) | | | |(only in Pinyin| different | | | | | centred input | input | | | | | environment) | methods | | | | | + | + | | | | | Toggle the | Similar to | | | | | environment | (c) | | | | | operation | | | | | | functions | | | | | |(same as PF6) | | | | | |(only in Zhuyin| | | | | | centred input | | | | | | environment & | | | | | |Combined Pinyin| | | | | | & Zhuyin input| | | | | | environment | | | |----------+-------+---------------+------------+----------| | PF5 | - | To select the | Similar to | Similar | | | | different | (c) | to (c) | | | | input keys | | | | | | allocations | | | |----------+-------+---------------+------------+----------| | PF6 | - | To toggle the | To select | Similar | | | | environment | among the | to (d) | | | | operations | different | | | | | | environment| | | | | | operation | | | | | | functions | | |----------+-------+---------------+------------+----------| | - | ^G | To quit the | Similar to | Similar | | | | environment | (c) | to (c) | | | | operation | | | | | | functions | | | |----------+-------+---------------+------------+----------| |Conversion| ^W | To perform | Similar to | Similar | | key | | Hanzi | (c) | to (d) | | | | conversion | + | | | | | | To list out| | | | | | possible | | | | | | candidates | | |----------+-------+---------------+------------+----------| |Conversion| - | To extract a | - | Similar | | key | | candidate from| | to (c) | | | | the candidate | | | | | | list | | | |----------+-------+---------------+------------+----------| | - | ^Z | To treat the | Similar to | Similar | | | | input string | (c) | to (d) | | | | as a phrase & | + | | | | | perform phrase| To list out| | | | | conversion | possible | | | | | | phrase | | | | | | candidates | | |----------+-------+---------------+------------+----------| | Confirm | ^L | To confirm the| Similar to | Similar | | key | | conversion | (c) | to (d) | | | | result | | | |----------+-------+---------------+------------+----------| | Confirm | - | To extract a | - | Similar | | key | | candidate | | to (c) | | | | from the | | | | | | candidate list| | | |----------+-------+---------------+------------+----------| | Right | ^F | To move cursor| To move the| Similar | | arrow | | one position | cursor one | to (d) | | key | | to the right | unit to the| + | | | | during input | right | To move | | | | state, edit | | to the | | | | state, & when | | next | | | | using PF6 | | candidate| | | | functions | | on the | | | | | | right | |----------+-------+---------------+------------+----------| | Left | ^B | To move cursor| To move the| Similar | | arrow | | one position | cursor one | to (d) | | key | | to the left | unit to the| + | | | | during input | left | To move | | | | state, edit | | to the | | | | state, & when | | next | | | | using PF6 | | candidate| | | | functions | | on the | | | | | | left | |----------+-------+---------------+------------+----------| | Up | ^P | To move to the| Similar to | Similar | | arrow | | previous menu | (c) | to (c) | | key | | or previous | + | + | | | | set of | To recall | To obtain| | | | candidates. | the | the | | | | Also apply | previous | previous | | | | when using | input | single | | | | functions in | | candidate| | | | PF6 | | | |----------+-------+---------------+------------+----------| | Down | ^N | To move to the| Similar to | Similar | | arrow | | next menu or | (c) | to (c) | | key | | the next set | + | + | | | | of candidates.| To recall | To obtain| | | | Also apply | the | the | | | | when using | next input | next | | | | functions in | | single | | | | PF6 | | candidate| |----------+-------+---------------+------------+----------| | - | ^D | To delete an | Similar to | Similar | | | | input unit | (c) | to (d) | | | | + | | | | | | Delete a word | | | | | | or character, | | | | | | or dictionary | | | | | | in the | | | | | | environment | | | | | | operations PF6| | | |----------+-------+---------------+------------+----------| | Backspace| - | To delete an | Similar to | Similar | | key | | input | (c) | to (c) | | | | character | | | |----------+-------+---------------+------------+----------| | - | ^E | Move cursor to| Move cursor| Move the | | | | the last input| to the last| cursor to| | | | unit (end) or | unit of the| the last | | | | to the last | user input | candidate| | | | candidate of | string | in the | | | | the list. | | current | | | | Also apply | | set of | | | | when using | | candidate| | | | functions in | | | | | | PF6 | | | |----------+-------+---------------+------------+----------| | - | ^A | Move cursor to| Move cursor| Move the | | | | the first | to the | cursor to| | | | unit | first unit | the last | | | | (beginning) or| of the user| candidate| | | | to the first | input | in the | | | | candidate of | string | current | | | | of the list | | set of | | | | Also apply | | candidate| | | | when using | | | | | | functions in | | | | | | PF6 | | | |----------+-------+---------------+------------+----------| | - | ^K | To undo a | To delete | Similar | | | | conversion | an input | to (d) | | | | from the | string from| + | | | | cursor | the cursor | Similar | | | | position to | position to| to (c) | | | | the end of the| the end of | If press | | | | input string | the input | twice, | | | |(if press once)| string | will | | | | |(press once)| cancel | | | | | | the whole| | | | | | converted| | | | | | Hanzi | | | | | | string | |----------+-------+---------------+------------+----------| | - | ^I | To shorten the| - | Separate | | | | length of a | | a word | | | | word phrase by| | into | | | | one character | |individual| | | | | |characters| |----------+-------+---------------+------------+----------| | - | ^O | To extend the | - | Join the | | | | length of a | |characters| | | | word phrase by| | into one | | | | one character | | word | |----------+-------+---------------+------------+----------| | - | ^G | To extract a | - | Similar | | | | candidate from| | to (c) | | | | the candidate | | | | | | list | | | |----------+-------+---------------+------------+----------| | - | ^C | To perform | - | Re-enter | | | | reverse | | into the | | | | conversion | | input or | | | | | | insert | | | | | | mode | | | | | | (if press| | | | | | once ) | | | | | | + | | | | | | Perform | | | | | | reverse | | | | | |conversion| | | | | | (if press| | | | | | twice ) | ---------------------------------------------------------- 13 May 1992 CKEY(7)
All times are GMT -4. The time now is 08:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy