Questions tagged [vim]
An open-source text editor which is typically run from the command line. A minimal version is included in Ubuntu by default but the full version is available in repositories. Questions should relate to using Vim on Ubuntu.
811
questions
0
votes
1
answer
41
views
Intermittent lag in command terminal?
I have a workstation that we run numerical simulations on using in-house code, submitting jobs from the command line and using vim to edit/view files. My problem is that whenever we are running at ...
1
vote
0
answers
146
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
1
answer
132
views
VIM version 8.2.1847 problems on 22.04: can't delete backspace and changelist not saved
After installing 22.04 I have two VIM problems:
I can't backspace over a newline! If you insert "abc<newline>d" then begin backspacing to delete the new text it stops at the newline ...
0
votes
0
answers
48
views
Encrypt all vim buffers with same password
Setting aside weaknesses in vim's encryption algorithm and the security implications of using the same password for multiple files, is there any way to encrypt all Vim buffers with the same password ...
0
votes
0
answers
23
views
Re-arranging a table of values with VIM
I'm often in the situation of having to re-arrange a table of values, from this format:
a = 1 b = 2 c = 3
d = 4 e = 5 f = 6
to this format
a = 1
b = 2
c = 3
.
.
.
in VIM. The fastest way to make it ...
0
votes
1
answer
74
views
How do I use `:jumps` in vim? How can I go back to a certain jump point in the past?
I saw https://medium.com/@kadek/understanding-vims-jump-list-7e1bfc72cdf0. So when I did :jumps, I could see the jumps in the past and in the future from where I am. I wanted to go back to the jump 6 ...
0
votes
1
answer
363
views
How to enable clipboard support on Ubuntu server?
I have VIM installed with clipboard and xterm_clipboard supported. But registers "* and "+ don't work. I suspect that Ubuntu server version doesn't have GUI support, so it doesn't have ...
0
votes
0
answers
48
views
Somehow "ctrl+w, = " doesnt' automatically adjust the window size in vimdiff since sometime ago
On my ubuntu-20.04 machine while viewing two files with vimdiff, after I resize the terminal window, when I press 'ctrl-w' and '=' the divider line between the left and right windows of vimdiff re-...
0
votes
0
answers
41
views
Encountering 404 Errors when attempting to get vim package (Ubuntu 22 / Jammy ) [duplicate]
I'm still a pretty big noob when it comes to everything unix / command line related however I am attempting to download Vim via command line and I keep getting the following errors:
Ign:1 http://us....
2
votes
1
answer
2k
views
How to permanently remap Caps Lock into Esc key on Ubuntu 22.04.3 with Wayland display server
My goal is to PERMANENTLY remap CAPSLOCK into ESC key under Ubuntu 22.04.3 with Wayland display server.
Second requirement is to do it without installing additional software.
I need it for VIM, to be ...
0
votes
1
answer
212
views
Unable to install vim in ubuntu , I am getting like this how to resolve it?
Err:1 http://security.ubuntu.com/ubuntu janny-updates/matn
2:8.2.3995-1ubuntu2.9 404 Not Found [IP: 185.125.190.36 80] Err:2 http://security.ubuntu.com/ubuntu janny-updates/main
1 2:8.2.3995-1ubuntu2....
0
votes
0
answers
97
views
How to come out to the previous file in vi after entering a file with 'gf'?
I searched for this but couldn't find it.
When using vi for a file A, if I want to go to a file B when the cursor is on file B's filename, I press 'gf' and vi opens file B. After navigating inside ...
0
votes
0
answers
92
views
Local .vimrc doesn't get executed when I run vi
I read from here that when I run vi in a local directory where I have a local .vimrc file, the commands in that .vimrc takes effect. But when I try it, it doesn't work for me.
Here is the test I did.
...
1
vote
0
answers
165
views
Vim/NVim shows a weird character at cursor in terminal for comment lines
I am using Ubuntu 23.04.
I don't have a custom .vimrc; I am using the system default.
EDIT: The following paragraph applies to only commented lines i.e. those beginning with a #. Non-commented lines ...
-2
votes
1
answer
154
views
is it possible to print txt file using vim but change the font in which the text will be printed
my question is fully described in the title "is it possible to print txt file using vim but change the font in which the text will be printed". I found the documentation for vim where it ...
0
votes
0
answers
196
views
how to disable ligatures for konsole or just when konsole runs vim
I am using the font https://github.com/belluzj/fantasque-sans
it is a great font and I like it. its just that I cannot turn it off in vim with let g:tex_conceal = ''
the problem seems to be that ...
0
votes
0
answers
46
views
How can I save my reading postion in the "less" terminal app?
just trying to learn what I can and cannot do with this application if this is not possible are there any terminal reading apps that will allow such a thing? or maybe a script that can help?
-1
votes
1
answer
178
views
There is nothing in my $HOME/.vimrc file, is that right?
I am using an Ubuntu Desktop I think Focal, version 20 and I need to add some line numbers to my vim and I ran the following command to locate my .vimrc file:
vim --version
which says my file is in $...
2
votes
2
answers
272
views
Vim Editor Undo
In Vim Editor while in normal mode when I enter 'u' it undoes all the changes made in last session instead of one line. Can anybody help regarding this.
0
votes
1
answer
266
views
Terminal opens neovim instead of vim
I use Ubuntu with the zsh shell, and when I try to open vim with the vi or vim command it opens neovim instead. I tried using the original bash shell, but it still didn't work. I tried sudo update-...
0
votes
0
answers
78
views
How to fix the garbled code on the bar of Vim?
As the following picture shows, the information displaying bar in the below has garbled code, I have tried so many ways but it's still not resolved, because many related webs are about garbled code of ...
7
votes
2
answers
9k
views
How to set Vim as the default text editor in Linux (Ubuntu)?
I found another way to set Vim as the default text editor in Ubuntu but I would like to know why this tutorial is not working for me:
https://www.a2hosting.com/kb/developer-corner/linux/setting-the-...
1
vote
0
answers
599
views
vim-gtk3 and vim-athena fail to install on Ubuntu 22.04
I tried to install Vim with GUI on Ubuntu 22.04 but failed.
I get the following errors when I run sudo apt install vim-gtk3 or sudo apt install vim-athena. It seems both packages need to be rebuilt ...
0
votes
0
answers
79
views
Using Kate & Kdiff3 as drop-in replacements for vim/emacs
By default, ubuntu-minimal uses vim-tiny, and after >20 years of using vim/emacs, I am cured, and realize that despite their obvious power, the user interface itself of both editors is not designed ...
0
votes
1
answer
377
views
clipboard problem in terminal text editors
I am on Ubuntu 22.10, when I copy text from anywhere, there is no problem with pasting it on a regular other app. But I get errors when I try to paste the text into terminal text editors.
For example ...
0
votes
3
answers
423
views
How to disable comment highlighting in vim?
I find myself on a new Ubuntu 22.04 machine running Vim 8.2, and I've found that all comments (in all languages) are highlighted, and it's driving me crazy.
Edit: This only happens when I'm in a tmux ...
0
votes
1
answer
884
views
Unable to view the contents of the /etc/environment file
Unable to see the contents of my '/etc/environment' file. I have tried using Vi and vim but still unable to see the contents .
I wanted to add some commands in /environment file to $PATH for which I ...
0
votes
0
answers
767
views
E212 Can't open file for writing
I was trying to add syntax highlighting to my vim which is located inside of /usr/share/vim/vimrc.
but even as sudo when I attempt to save I get the error: E212 Can't open file for writing.
Inside of ...
2
votes
0
answers
506
views
Can I change the mouse pointer color?
I'm faced with a small but long-time nuisance.
I frequently work remote from home using google remote desktop. I connect to my windows 10 PC and there I use vnc client to connect to my ubuntu 20.04 ...
1
vote
1
answer
530
views
root user has no permission to edit environment file
I recently got a new problem in my Ubuntu system. I have to change the contents of the /etc/environment file but it is not possible, even the root user has no permission to do that.
As you can see ...
1
vote
0
answers
79
views
Why is vim.gtk3 looking for libpng12 on Ubuntu 22.4?
After upgrading Ubuntu 20.04 LTS to Ubuntu 22.04 LTS (jammy), /bin/vim.gtk3, from the vim-gtk3 package won't run any more:
$ /bin/vim.gtk3
vim.gtk3: error while loading shared libraries: libpng12.so....
0
votes
0
answers
199
views
What is difference between search using `/` and `?` in Vim?
In Vim I find search using / and ? giving the same search result. So what are the differences in search using / and ?
For example,
/and
?and
Both takes to next occurrence of and and n / N to repeat ...
0
votes
0
answers
73
views
DAT Files containing raw data converted to legible text
I used the ubuntu distribution to operate VIM and a DAT File that contains lines along the following:
0000030801549200000308015492 ...
0
votes
0
answers
3k
views
How to edit fstab when stuck in emergency mode?
I am using Ubuntu 20.04 on a vmware and I've been struggling solving the the "you are in the emergency mode" problem.
By mistake I commented out the first line (the one with the errors=...
0
votes
0
answers
50
views
Cannot paste URLS using vim
I have been trying to set up an RRS feed using newsboat.
As directed by
#Error: no URLs configured. Please fill the file /home/titus/snap/newsboat/6008/.newsboat/urls with RSS feed URLs or import an ...
0
votes
0
answers
158
views
nano and vim (search) history remove
How can I delete nano and vim history (typed text, search, etc.)? I don't want to disable it for the future, only erase the current values. THX
0
votes
3
answers
1k
views
Vim is opening with Vi when I use Sudo - why?
I use neovim. I changed my .zshrc to open nvim when I type vim in the terminal.
My configuration is from my Mac where I didn't use Sudo much (now I use Ubuntu, I use sudo all the time).
When I do sudo ...
1
vote
1
answer
1k
views
How do I get xcape to work correctly on Ubuntu 22.04?
I'm a vim/nvim user, and xcape has become for me a key feature in the last years.
I use it in combination with gnome-tweaks (new package name, on previous version was gnome-tweak-tool) in order to:
...
0
votes
0
answers
155
views
Please check why ubuntu is giving error
code:
char index2key(u64 index, char* key, u32 l_min, u32 l_max, const char* charset, u32 n_charset)
{
u32 l_key = l_min;
u64 n_key = pow(n_charset, l_min);
while (index >= ...
0
votes
1
answer
120
views
how to capture a vim macro within register reuse
I need to record or code a vim macro that captures the current line into a register and then calls an external command like figlet to make it a title form.
Something like:
qp
"add
So here I have ...
1
vote
0
answers
627
views
failed to install vim on my ubuntu [duplicate]
I've having problem installing vim on my Ubuntu. After running sudo apt-get install vim, I get the following error message:
Ign:1 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 vim-...
0
votes
2
answers
55
views
using vim for FCEDIT with a special textwidth
I am using Kubuntu 20.04, but this is a bash issue I'm annoyed about it since tens of years.
I have .vimrc and .viminfo on a USB stick. Thus to use vim as editor for FCEDIT, I setup
export FCEDIT='vim ...
-1
votes
1
answer
3k
views
My vim theme (gruvbox) is not being applied
im trying to set this theme for vim: https://vimawesome.com/plugin/gruvbox .
I have installed it:
I added the Plug to .vimrc
Plug 'morhetz/gruvbox'
From a opened vim editor I executed the command: :...
1
vote
1
answer
515
views
Have neovim load a file from file explorer
I would like to have neovim as a default text editor also when accessed from file explorer.
When I choose it from the "open with" dialogue or when it is the default for some file extension I'...
0
votes
1
answer
920
views
VIM, ESC key doesn't work - Ubuntu 20.04
I'm using Git to control the different versions of my project. When reverting to a previous commit it shows a VIM terminal as expected.
Theoretically I should press ESC to write my command, but ESC ...
0
votes
0
answers
148
views
In vim, what does in normal mode the key Meta-g, Alt-g cause?
I have unintentionally typed the key ALT-g, equal to Meta-g, to CTRL-] g, and by this my open file was damaged.
In Kubuntu 20.04, Vim version 8.1.
Such problems I have very often, but in former times ...
1
vote
1
answer
2k
views
Why is my Ubuntu 21.10 running nvim instead of vim?
I've had 21.10 installed for a while but have noticed that 'vim --version' brings up the info for 'nvim'. Is there any reason why this is happening?
0
votes
1
answer
443
views
set shortcut to move between windows in reverse
version: Ubuntu 18.04
i want to move between windows and work spaces in a "vim-like" way.
I set ctrl+alt u/d to move up/down work spaces, and changed alt tab (switch between windows -->) ...
2
votes
1
answer
135
views
File manager - jump to file/folder by line number
Is there any file manager that shows a number (similar to line number in vim) for each folder/files in the current directory and you can jump to any folder/file by typing the corresponding number with ...
1
vote
0
answers
48
views
Unmet dependencies for vim-tiny package [duplicate]
I tried some of the available solution, but hard luck anyone able to provide me the solution.
Unmet dependencies installing vim or vim-tiny
Unmet dependencies. Try 'apt --fix-broken install'
...