How to insert and delete text in vi on Debian 9
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have only used vi on Debain 8 before and I was able to press "i" to add any text. Even delete was working fine. But now on Debian 9 it seems vi behaviour is different as pressing "i" nothing happens.
On Debian 8 when you press "i" then it says at the bottom "INSERT" which means now you can start changing text. On Debian 9 pressing "i" does nothing but if I press it twice then it shows one "i" and then I can write remaining text.
Right now I just want to change SSH port and for that I simply want to delete character "#" and change port 22 to something else but I can't even do this simple task now.
Is there a command tutorial available for vi on Debian 9?
debian vi
add a comment |Â
up vote
0
down vote
favorite
I have only used vi on Debain 8 before and I was able to press "i" to add any text. Even delete was working fine. But now on Debian 9 it seems vi behaviour is different as pressing "i" nothing happens.
On Debian 8 when you press "i" then it says at the bottom "INSERT" which means now you can start changing text. On Debian 9 pressing "i" does nothing but if I press it twice then it shows one "i" and then I can write remaining text.
Right now I just want to change SSH port and for that I simply want to delete character "#" and change port 22 to something else but I can't even do this simple task now.
Is there a command tutorial available for vi on Debian 9?
debian vi
esc esc i does it work?
â Rui F Ribeiro
Nov 29 '17 at 7:40
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have only used vi on Debain 8 before and I was able to press "i" to add any text. Even delete was working fine. But now on Debian 9 it seems vi behaviour is different as pressing "i" nothing happens.
On Debian 8 when you press "i" then it says at the bottom "INSERT" which means now you can start changing text. On Debian 9 pressing "i" does nothing but if I press it twice then it shows one "i" and then I can write remaining text.
Right now I just want to change SSH port and for that I simply want to delete character "#" and change port 22 to something else but I can't even do this simple task now.
Is there a command tutorial available for vi on Debian 9?
debian vi
I have only used vi on Debain 8 before and I was able to press "i" to add any text. Even delete was working fine. But now on Debian 9 it seems vi behaviour is different as pressing "i" nothing happens.
On Debian 8 when you press "i" then it says at the bottom "INSERT" which means now you can start changing text. On Debian 9 pressing "i" does nothing but if I press it twice then it shows one "i" and then I can write remaining text.
Right now I just want to change SSH port and for that I simply want to delete character "#" and change port 22 to something else but I can't even do this simple task now.
Is there a command tutorial available for vi on Debian 9?
debian vi
edited Aug 25 at 21:25
Rui F Ribeiro
35.7k1271114
35.7k1271114
asked Nov 29 '17 at 6:31
Frank Martin
1083
1083
esc esc i does it work?
â Rui F Ribeiro
Nov 29 '17 at 7:40
add a comment |Â
esc esc i does it work?
â Rui F Ribeiro
Nov 29 '17 at 7:40
esc esc i does it work?
â Rui F Ribeiro
Nov 29 '17 at 7:40
esc esc i does it work?
â Rui F Ribeiro
Nov 29 '17 at 7:40
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
Usually, on Debian 9, /usr/bin/vi
is a symlink to vim
or vim-tiny
in version 8.0, while on Debian 8 it's been a symlink to version 7.4. Absolutely nothing has changed about the absolute basic commands like i
or x
. Even in readonly mode (option -R
or started with command view
) the commands work, just issuing a warning about changing a readonly file. Even the horrible "easy" mode (option -y
) doesn't produce behaviour like you describe.
Bottom line: This is not caused by simply switching from Debian 8 to 9.
What to do:
type vi
will tell you what you are actually executing, for example/usr/bin/vi
vi --version
should tell you what you are really executing- If it's really some
vi
orvim
, you are using some really weird keybindings! Test whether it's local or global by trying as another user
Update after reading OP's comment:
"On Debian 9 pressing "i" does nothing but if I press it twice then it shows one "i" and then I can write remaining text.", so pressing i actually does something: it puts you in insert mode as before. You are just irritated because nothing is displayed in the last line. In this respect there should also not be any differences between Debian 8 and 9.
Two possible causes for this behaviour:
- You have set noshowmode somewhere in your
~/.vimrc
or some other configuration source. Type:set showmode
or:set smd
and see whether the behaviour is as you are used to. If yes, check forset nosmd
ornoshowmode
in your or the system'svim
configuration and remove it. - Or the locale you are using is defect. Do
LANG=C
and then startvi
.
add a comment |Â
up vote
0
down vote
if you have vi/vim installed then vimtutor
should be on your machine, just enter that at the command line and follow the walkthrough.
If you are familiar with vi
then try vim
, which is an improved vi
but uses substantially the same controls, and see if that works as expected.
The behaviour of i
/esc
to get in and out of edit mode should not have changed with the kernel update.
1
On Debian 8 when you press "i" then it says at the bottom "INSERT" which means now you can start changing text. On Debian 9 pressing "i" does nothing but if I press it twice then it shows one "i" and then I can write remaining text. I got the hang of it but I went ahead and used nano as suggested by @saga
â Frank Martin
Nov 29 '17 at 9:22
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Usually, on Debian 9, /usr/bin/vi
is a symlink to vim
or vim-tiny
in version 8.0, while on Debian 8 it's been a symlink to version 7.4. Absolutely nothing has changed about the absolute basic commands like i
or x
. Even in readonly mode (option -R
or started with command view
) the commands work, just issuing a warning about changing a readonly file. Even the horrible "easy" mode (option -y
) doesn't produce behaviour like you describe.
Bottom line: This is not caused by simply switching from Debian 8 to 9.
What to do:
type vi
will tell you what you are actually executing, for example/usr/bin/vi
vi --version
should tell you what you are really executing- If it's really some
vi
orvim
, you are using some really weird keybindings! Test whether it's local or global by trying as another user
Update after reading OP's comment:
"On Debian 9 pressing "i" does nothing but if I press it twice then it shows one "i" and then I can write remaining text.", so pressing i actually does something: it puts you in insert mode as before. You are just irritated because nothing is displayed in the last line. In this respect there should also not be any differences between Debian 8 and 9.
Two possible causes for this behaviour:
- You have set noshowmode somewhere in your
~/.vimrc
or some other configuration source. Type:set showmode
or:set smd
and see whether the behaviour is as you are used to. If yes, check forset nosmd
ornoshowmode
in your or the system'svim
configuration and remove it. - Or the locale you are using is defect. Do
LANG=C
and then startvi
.
add a comment |Â
up vote
3
down vote
accepted
Usually, on Debian 9, /usr/bin/vi
is a symlink to vim
or vim-tiny
in version 8.0, while on Debian 8 it's been a symlink to version 7.4. Absolutely nothing has changed about the absolute basic commands like i
or x
. Even in readonly mode (option -R
or started with command view
) the commands work, just issuing a warning about changing a readonly file. Even the horrible "easy" mode (option -y
) doesn't produce behaviour like you describe.
Bottom line: This is not caused by simply switching from Debian 8 to 9.
What to do:
type vi
will tell you what you are actually executing, for example/usr/bin/vi
vi --version
should tell you what you are really executing- If it's really some
vi
orvim
, you are using some really weird keybindings! Test whether it's local or global by trying as another user
Update after reading OP's comment:
"On Debian 9 pressing "i" does nothing but if I press it twice then it shows one "i" and then I can write remaining text.", so pressing i actually does something: it puts you in insert mode as before. You are just irritated because nothing is displayed in the last line. In this respect there should also not be any differences between Debian 8 and 9.
Two possible causes for this behaviour:
- You have set noshowmode somewhere in your
~/.vimrc
or some other configuration source. Type:set showmode
or:set smd
and see whether the behaviour is as you are used to. If yes, check forset nosmd
ornoshowmode
in your or the system'svim
configuration and remove it. - Or the locale you are using is defect. Do
LANG=C
and then startvi
.
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Usually, on Debian 9, /usr/bin/vi
is a symlink to vim
or vim-tiny
in version 8.0, while on Debian 8 it's been a symlink to version 7.4. Absolutely nothing has changed about the absolute basic commands like i
or x
. Even in readonly mode (option -R
or started with command view
) the commands work, just issuing a warning about changing a readonly file. Even the horrible "easy" mode (option -y
) doesn't produce behaviour like you describe.
Bottom line: This is not caused by simply switching from Debian 8 to 9.
What to do:
type vi
will tell you what you are actually executing, for example/usr/bin/vi
vi --version
should tell you what you are really executing- If it's really some
vi
orvim
, you are using some really weird keybindings! Test whether it's local or global by trying as another user
Update after reading OP's comment:
"On Debian 9 pressing "i" does nothing but if I press it twice then it shows one "i" and then I can write remaining text.", so pressing i actually does something: it puts you in insert mode as before. You are just irritated because nothing is displayed in the last line. In this respect there should also not be any differences between Debian 8 and 9.
Two possible causes for this behaviour:
- You have set noshowmode somewhere in your
~/.vimrc
or some other configuration source. Type:set showmode
or:set smd
and see whether the behaviour is as you are used to. If yes, check forset nosmd
ornoshowmode
in your or the system'svim
configuration and remove it. - Or the locale you are using is defect. Do
LANG=C
and then startvi
.
Usually, on Debian 9, /usr/bin/vi
is a symlink to vim
or vim-tiny
in version 8.0, while on Debian 8 it's been a symlink to version 7.4. Absolutely nothing has changed about the absolute basic commands like i
or x
. Even in readonly mode (option -R
or started with command view
) the commands work, just issuing a warning about changing a readonly file. Even the horrible "easy" mode (option -y
) doesn't produce behaviour like you describe.
Bottom line: This is not caused by simply switching from Debian 8 to 9.
What to do:
type vi
will tell you what you are actually executing, for example/usr/bin/vi
vi --version
should tell you what you are really executing- If it's really some
vi
orvim
, you are using some really weird keybindings! Test whether it's local or global by trying as another user
Update after reading OP's comment:
"On Debian 9 pressing "i" does nothing but if I press it twice then it shows one "i" and then I can write remaining text.", so pressing i actually does something: it puts you in insert mode as before. You are just irritated because nothing is displayed in the last line. In this respect there should also not be any differences between Debian 8 and 9.
Two possible causes for this behaviour:
- You have set noshowmode somewhere in your
~/.vimrc
or some other configuration source. Type:set showmode
or:set smd
and see whether the behaviour is as you are used to. If yes, check forset nosmd
ornoshowmode
in your or the system'svim
configuration and remove it. - Or the locale you are using is defect. Do
LANG=C
and then startvi
.
edited Nov 29 '17 at 9:51
answered Nov 29 '17 at 9:31
Philippos
5,91211546
5,91211546
add a comment |Â
add a comment |Â
up vote
0
down vote
if you have vi/vim installed then vimtutor
should be on your machine, just enter that at the command line and follow the walkthrough.
If you are familiar with vi
then try vim
, which is an improved vi
but uses substantially the same controls, and see if that works as expected.
The behaviour of i
/esc
to get in and out of edit mode should not have changed with the kernel update.
1
On Debian 8 when you press "i" then it says at the bottom "INSERT" which means now you can start changing text. On Debian 9 pressing "i" does nothing but if I press it twice then it shows one "i" and then I can write remaining text. I got the hang of it but I went ahead and used nano as suggested by @saga
â Frank Martin
Nov 29 '17 at 9:22
add a comment |Â
up vote
0
down vote
if you have vi/vim installed then vimtutor
should be on your machine, just enter that at the command line and follow the walkthrough.
If you are familiar with vi
then try vim
, which is an improved vi
but uses substantially the same controls, and see if that works as expected.
The behaviour of i
/esc
to get in and out of edit mode should not have changed with the kernel update.
1
On Debian 8 when you press "i" then it says at the bottom "INSERT" which means now you can start changing text. On Debian 9 pressing "i" does nothing but if I press it twice then it shows one "i" and then I can write remaining text. I got the hang of it but I went ahead and used nano as suggested by @saga
â Frank Martin
Nov 29 '17 at 9:22
add a comment |Â
up vote
0
down vote
up vote
0
down vote
if you have vi/vim installed then vimtutor
should be on your machine, just enter that at the command line and follow the walkthrough.
If you are familiar with vi
then try vim
, which is an improved vi
but uses substantially the same controls, and see if that works as expected.
The behaviour of i
/esc
to get in and out of edit mode should not have changed with the kernel update.
if you have vi/vim installed then vimtutor
should be on your machine, just enter that at the command line and follow the walkthrough.
If you are familiar with vi
then try vim
, which is an improved vi
but uses substantially the same controls, and see if that works as expected.
The behaviour of i
/esc
to get in and out of edit mode should not have changed with the kernel update.
answered Nov 29 '17 at 7:38
bu5hman
1,164214
1,164214
1
On Debian 8 when you press "i" then it says at the bottom "INSERT" which means now you can start changing text. On Debian 9 pressing "i" does nothing but if I press it twice then it shows one "i" and then I can write remaining text. I got the hang of it but I went ahead and used nano as suggested by @saga
â Frank Martin
Nov 29 '17 at 9:22
add a comment |Â
1
On Debian 8 when you press "i" then it says at the bottom "INSERT" which means now you can start changing text. On Debian 9 pressing "i" does nothing but if I press it twice then it shows one "i" and then I can write remaining text. I got the hang of it but I went ahead and used nano as suggested by @saga
â Frank Martin
Nov 29 '17 at 9:22
1
1
On Debian 8 when you press "i" then it says at the bottom "INSERT" which means now you can start changing text. On Debian 9 pressing "i" does nothing but if I press it twice then it shows one "i" and then I can write remaining text. I got the hang of it but I went ahead and used nano as suggested by @saga
â Frank Martin
Nov 29 '17 at 9:22
On Debian 8 when you press "i" then it says at the bottom "INSERT" which means now you can start changing text. On Debian 9 pressing "i" does nothing but if I press it twice then it shows one "i" and then I can write remaining text. I got the hang of it but I went ahead and used nano as suggested by @saga
â Frank Martin
Nov 29 '17 at 9:22
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f407656%2fhow-to-insert-and-delete-text-in-vi-on-debian-9%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
esc esc i does it work?
â Rui F Ribeiro
Nov 29 '17 at 7:40