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.

Filter by
Sorted by
Tagged with
0
votes
2answers
205 views

How can I add some lines to the ~/.bashrc file in Ubuntu?

I am new to programming, I wanted to download and setup Apache Tomcat on my Ubuntu. I copied the tar link from Apache. I then decompressed the file with tar xvzf Apache-tomcat.7.0.94.tar.gz Now I'm ...
2
votes
1answer
34 views

howto set thunderbird to use [gv]im?

What is the easiest way to set thunderbird to use with gvim or vim? Bill Joy taught me how to use "vi" in the 1980s, and being seriously disabled, I made it work. In recent months, though, Ifind ...
0
votes
1answer
30 views

Search unix word in line and if it is there then delete from that word to end of line

My file contain following lines File.txt Unix is good Linux and unix is different? Linux is also good, then what about unix? Here I want output (1st line blank) Linix and Linux is also good, ...
0
votes
1answer
32 views

Getting inappropriate output in terminal

I have written a C program in Vim and trying to open the file by command vim filename.c I am getting this output. E325: ATTENTION Found a swap file by the name ".linklist.c.swp" owned by: ...
1
vote
1answer
25 views

Suddenly, vim refuses to put TABs in python files

I've always used vim to write my python files. And in my python files, I use TABs. But all of a sudden, vim will automatically change my TABs into spaces, whereas it never did that before. Did ...
1
vote
1answer
82 views

How to install clang for YouCompleteMe?

OS: Ubuntu 18.04 There are already some posts about how to install clang in Ubuntu, however many of them are out of date, and my question is specific to installing clang as part of the insallation ...
1
vote
1answer
38 views

Uninstall package locally installed with checkinstall

OS: Ubuntu 18.04 I wanted to install vim from source, using checkinstall. So I ran this: $ git clone https://github.com/vim/vim.git $ cd vim/src Here, I edited the Makefile so vim would be ...
0
votes
0answers
16 views

In one command check running process and kill that [duplicate]

I want to check running process and if it is running then kill that process in one command Like ps -ef | grep "Java" --> it show's some process is running which I want to kill that process in one ...
1
vote
1answer
22 views

Any way to make vim work as vscode (at least close )?

I have to say the most tough wall between me and vim is it lack easy way to do match whole word case sensitive multiple cursor match whold word means About multiple cursor, there is an answer: ...
2
votes
1answer
37 views

Replace source word with containing /(forward slash) to destination word in VI editor command window

I'm facing problem while cmake compilation wherein, there are thousands of /root/repo/ are there & I want to replace with /repo/ . Because of / in the source word the command :%s/srcWrd/dstwrd/gc ...
0
votes
0answers
14 views

Cannot make mapleader work in vim

I cannot make mapleader work in vim. When executing let mapleader or let maplocalleader , it is showing the leader as set (, here) but when I use the leader, it does not do anything. Following is ...
0
votes
0answers
22 views

Customize colors terminal

I've installed Gogh according to this command: bash -c "$(wget -qO- https://git.io/vQgMr)" I've chosen 2 color sets and activated them as suggested in the profile within Terminal. The background ...
0
votes
0answers
10 views

How to find empty Subdirectries and delete that directories by using unix command [duplicate]

Case 1) I'm at home path home/rahul/subdir1--(contain data) home/rahul/subdir2--(empty) home/rahul/subdir3--(empty) home/rahul/subdir4--(contain data) Here I want find and delete empty ...
3
votes
1answer
172 views

Why are there so many 'vimrcs'?

I wanted to make my vim settings permanent and I looked for vimrc file. Finally I found out that there was not a vimrc in my home directory and I should creat one. But when I searched for vimrc(in /) ...
0
votes
0answers
22 views

Soap requests get sluggish

I'm using VMware's Perl SDK 6.7 on an Ubuntu 18.04. The SDK makes a soap requests to a vcenter server. We used to be on Ubuntu 14 but moved to 18, and with the same SDK code, a Vim::connect() call ...
0
votes
0answers
49 views

Ubuntu 16.04 - Error Depends: vim-runtime (= 2:7.4.1689-3ubuntu1.3)

I try to upgrade my ubuntu server 16.04 root@localhost:~# apt upgrade Reading package lists... Done Building dependency tree Reading state information... Done You might want to ...
0
votes
3answers
82 views

How to comment 20 lines of Python code on vim?

How to comment 20 lines of code at a time from a python file in vi/vim. What command can I use instead of using # or """ ??
1
vote
1answer
80 views

Why environmental variable returns none in Linux?

In windows to set a new variable = value we can simply add it to the environmental variable. However, in linux, looks a bit tough. this is the procedure which I followed: Open Terminal and write: ...
1
vote
2answers
101 views

Vim package Vulnerable

is the latest vim package for Ubuntu 16/18 vulnerable to modeline? I have two production ubuntu based servers, one has 18.04.2 LTS on it and the other one has 16.04.6 LTS on it. Neither apt-get ...
0
votes
0answers
16 views

Why comments in vim have different highlight color than intended?

As you can see in this screenshot comments in lines 18,20 and 23 are different than lines 9,10,13,14 etc. Why is this happening? Note that, All colorschemes are doing the same. Wrong highlignting ...
0
votes
0answers
30 views

Terminal color palette seems to be missing one color

I am using nvim within my terminal to write some Latex. I created a color scheme which looks like this: The line numbers and some elements in the equations are brown. I wanted to change that, but ...
0
votes
0answers
23 views

ldconfig.real encoding?

I have an error involving my nvidia driver, and the solution I found online seemed to involve changing a reference in the /sbin/ldconfig.real file. But it appears to be encoded in some odd way I can't ...
6
votes
2answers
940 views

Ubuntu won't let me edit or delete .vimrc file

I wanted to add set mouse=a to the .vimrc file to add point and click cursor, but the /etc/vim/vimrc file is read-only and won't allow me to edit or delete it. I tried to uninstall and reinstall vim ...
1
vote
1answer
44 views

Is there a file manager that can serially number files and subfolders in the currently viewed directory?

Is there a file manager that can serially number files and sub-folders in the currently viewed directory?
1
vote
1answer
84 views

`Error: Required vim compiled with +python` with VIM on Ubuntu 18.04

on my newly installed Ubuntu 18.04, I used sudo apt install vim to install vim. However, everytime when I type vim in the terminal, the error Error: Required vim compiled with +python just appears. I ...
2
votes
2answers
515 views

Modifying file contents very slow on upgrade to Ubuntu 19.04

I performed an upgrade from Ubuntu 18.10 to 19.04 and noticed that (somehow) creating, modifying, and deleting files is now much slower. Simply creating or deleting an empty file takes around 3 ...
0
votes
0answers
117 views

How to upgrade Python 3.6.6 to 3.6.7 in Ubuntu 16.04

I want to upgrade my installed Python 3.6.6 to Python 3.6.7. Because I had a problem with formatted strings like f'number {i}' in vim if you activate your virtual environment on Python 3.6.6, vim ...
0
votes
1answer
75 views

Vim Not an undo file

I have a vim file where every time I open it, it gives me a red message: E823: Not an undo file: <filename> Followed by: Press ENTER of type command to continue Doesn't appear to be an ...
1
vote
0answers
31 views

Vim doesn't autoindent when pasting from system

I am trying to paste text from the system clipboard into vim, and it is not auto-indenting. I highlight then middle click in a terminal window, and any newlines are not indenting to the level where I ...
0
votes
0answers
21 views

Monitor connected to CPU slower than those from GPU

I have two monitors connected to my GPU and a single monitor connected to my CPU / motherboard. In general use (internet, folders, etc), performance on all monitors is pretty similar. When I'm using ...
0
votes
1answer
186 views

Ultisnips not working

I am a newbie in latex. I tried to install Ultisnips for reducing frustration. I installed it using vim-plug. However, it isn't working for some reason. Any help would be appreciated. Here is my ~/....
0
votes
0answers
32 views

replace specific charater('g') when opening a file with vi(vim)

I'm suffering from editing a file because I have to replace a specific letter, 'g' at the first character in a first line of the file whenever I open a file with vi(vim). I've installed Ubuntu 18.04:...
0
votes
1answer
83 views

Vundle (plugin for Vim) configuration problem

I write the following configuration in my /etc/vim/vimrc to run the Vundle plugin. Why I got this errors? Vim configuration block that I add: set nocompatible " be iMproved, ...
2
votes
2answers
219 views

Unmet dependencies installing vim or vim-tiny

I am trying to install vi and vim I initially had vi instlled, and could not install vim, then I removed vi, and now I cannot install both. I watch all threads in internet, that says you should ...
0
votes
2answers
78 views

VIM, when I shell to prompt using :!bash I'd like the command prompt to reflect me being in a shell

I am in vim all day lately, practicing code. Often times when I want to do something from the prompt - I will use a key binding for :!bash and do what ever I need to do, then type exit to return to ...
0
votes
1answer
53 views

Vim periodically reverts to system version

(I am running Xubuntu 18.10.) I want clipboard support in my Vim, which isn't present in the vim package in apt, so I compiled Vim myself with +clipboard. I then proceeded to install it using ...
2
votes
1answer
262 views

How to open several Terminal Tabs and open files in Vim and change directory?

I'm asking this question because I tried a lot of solutions I found and they all didn't work: gnome-terminal --save-config=... results in an error that this option is no more possible gnome-terminal -...
1
vote
1answer
255 views

vim using up 100% CPU, can't kill it

Every so often (about once a month), my vim starts eating resources like crazy, and I'm unable to kill it. Here's an example: I ran: kill 13799 To no effect. I would like to know: 1) Could be vim ...
2
votes
1answer
107 views

How to install Vim 7 beneath Vim 8?

I want to keep Vim 8 but because I have several configuration files only working with version 7 I want to install Vim 7 in addition to Vim 8. How do I find the path of the installed Vim 8? Where and ...
1
vote
1answer
69 views

Confused on Config File

Is there a standard editor to view config files in linux. I m just viewing the ls command (/bin) config file in vim editor but it shows my a lot of @ and alphabets. Can anyone tell me how to view any ...
0
votes
0answers
147 views

Vim does not redraw appropriately in Ubuntu18.04

I am using vim with youcompleteme plugin in terminal in Ubuntu 18.04. Every time the plugin triggers a diagnostic error, the current window has not been redrawn thoroughly. As you can see here the ...
1
vote
1answer
973 views

“!q” and “wq!” failed to quit vim [duplicate]

I tried to quit vim "/etc/sysconfig/network-scripts" "/etc/sysconfig/network-scripts" E212: Can't open file for writing Press ENTER or type command to continue When I press Enter, it returns to edit ...
8
votes
2answers
790 views

Given the result of grep -n, how can I open vim in that specific line? (using only keyboard)

When I run grep "keyword" -n and get the following list of results: a/b/c:10: keyword a/b/c:70: keyword a/b/d:50: keyword How can I open one of the files (say the 2nd in list) in the line ...
0
votes
1answer
354 views

After upgrading Ubuntu 16.04 to 18.04 vim does not work… can't install it!

After upgrading Ubuntu, I just notice that vim is not working (actually deleting from Ubuntu) So I tried to re-installing it using this command: $ sudo apt install vim And the result is: Reading ...
0
votes
0answers
39 views

Which flavour Ubuntu for Ubuntu Console Only? [duplicate]

I'm a Web Developer. I've got an old Netbook computer. I want to learn VIM and force myself to use the terminal to create a small NodeJS or Python project and fumble around in the dark with a text-...
0
votes
1answer
79 views

is there a putty replacement that supports diverse colors? (over 4bit) [closed]

putty seems to support only 3bit(8) colors while vim's default colorschemes seem to be 4bit colors. so with only 3bit colors it's sometimes even unreadable. is there any replacement that supports more ...
0
votes
1answer
92 views

How do I find the <Insert> key mapping in Vim so that I can create a similar map on MacOS?

So, for me, the Insert key toggle was driving me to distraction on Mac since Ubuntu is my main OS. I had to hunt down the key mapping and duplicate it in macvim. How I've done this so far is to do: ...
0
votes
0answers
29 views

How does ubuntu vim get insert key to toggle insert mode

I have a Mac for work and I want to figure out how Ubuntu makes the insert toggle work. I've checked several files like: /etc/vim/vimrc.local /etc/vim/vimrc.tiny /usr/share/vim/vimrc.tiny /usr/...
0
votes
0answers
265 views

Ubuntu 18.04 VM; unable to initialize PAM: No such file or directory

I'm trying to learn more about Unix systems, and am working on hardening an Ubuntu Server VM (using VMWare Workstation). In the process of which, I must have done something that messed with the pam ...
24
votes
6answers
4k views

Is Vim safe to use in combination with sudo?

It is not advisable to use sudo with a graphical application like gedit, as described at this link. Accordingly, I have tended to use vim with sudo. Recently I noticed my ~/.viminfo was owned by root ...