Questions tagged [vi]
Questions about the text editor "vi"
132 questions
5
votes
1
answer
866
views
What is vi command package? [duplicate]
I can't find the name of vi command package.
I didn't find it in dpkg -S and apt-file.
What is the /bin/vi command package?
0
votes
1
answer
132
views
Where to setup colors in ubuntu terminal
I have unreadable hihglights in ubuntu terminal (I use set -o vi)
i.e. awk:
How to adjust colors in code in default terminal ubuntu?
1
vote
0
answers
824
views
Mouse scroll doesn't work in WSL in Vi/Vim editor
I have Windows 11 with WSL and Ubuntu 22.04.3 LTS. When I open any program in the Vi/Vim editor, I can't scroll up or down using the mouse. Any solution for it?
I tried to add set mouse=a in .vimrc. ...
1
vote
0
answers
604
views
Set nocompatible not working in vi/vim on 22.04
I have recently installed a fresh copy of Ubuntu 22.04. When I use vi or vim, it defaults to compatible mode (i.e. arrow keys become ABCD). I have tried creating ~/.exrc and ~/.vimrc with set ...
0
votes
0
answers
572
views
Cannot scroll terminal window when in vi
With terminal settings
Default/Layout/Screen Buffer Size/Height = 9999
Properties/Layout/Screen Buffer Size/Height = 9999
I can scroll in the window using the mouse wheel.
Now I enter vi (a ...
0
votes
1
answer
143
views
why doesn't my map command work in vi/ex?
I'm just learning how to use the vi editor, and was trying to make use of the following map command in my .exrc file:
map K 0I^I^[j0O^I^[j0
That is what appeared when I created the map in ex mode and ...
1
vote
3
answers
5k
views
How to replace a word using "vi editor"?
I have here a sample text file called employees.txt. It contains the name, streets and cities of the employees.
My question is: How can I replace all city instances of "Victoria" with "...
1
vote
0
answers
249
views
Kate text cursor stopped moving through paragraphs ( [Ctrl] + [Up/Down] )
I lost the function [Ctrl] + [Up/Down] to move the text cursor through paragraphs, as in any other text editor.
I just selected the option to override Kate shortcuts to use [Ctrl] + [V] inside VI to --...
2
votes
2
answers
2k
views
What is the difference between using "echo" command and editing using "vi" when making changes to .bashrc file?
I finished installing a program and some websites tell me to use the echo command to export an environment variable to the .bashrc file while others say to use vi .bashrc to edit the file directly. I ...
3
votes
2
answers
5k
views
How to edit UTF-8 files with vim
How can I edit UTF-8 files with vim?
There is a problem with german special characters like 'Ä', 'ü'. There are some in the comments. vim shows Ã~D instead of 'Ä' and ü instead of 'ü' then. (I hope ...
1
vote
0
answers
213
views
vi cursor not working properly with :set nu
The cursor works as if nonu was set. It starts before the numbers are displayed and the line ends where characters would end when there was nonu set.
.exrc has only :set nu. vim works without any ...
-2
votes
1
answer
2k
views
vi behaves very differently on Ubuntu 18.04 and 20.04, why?
So I've been increasingly making use of Vi for quick file edits, and have actually become fond of it (strange, i know)
Anyhow, on *buntu 20.04+ vi behaves as if it's drunk.
The arrow keys can't be ...
2
votes
1
answer
1k
views
How to recover my terminal vim window when I use ctrl-s to save in vim by mistake?
I have been using Visual Studio code a lot lately and like a lot of IDEs you can get used to using CTRL-S to save as it is quicker than using "esc :w" - if you are using vim bindings like I ...
0
votes
2
answers
1k
views
how to extract arbitrary amount of bytes from the beginning of a big file?
We can truncate a big file to a size we want. For example, if I want to truncate a file to 1K byte, we can do truncate -s 1K file1. But this changes the original file file1.
Many times I want to see ...
0
votes
0
answers
39
views
Why Vi editor can be "time-efficient" in comparison to using Nano editor? [duplicate]
I'm working through OSCP course where I'm getting familiar with terminal-based text editors.
I'm quite comfortable with Nano and this material says that penetration testers have reported
that Vi ...