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.
812
questions
0
votes
1
answer
6k
views
Tell me How to remove proxy permanently from ubuntu environment
Every time I'm getting this:
env | grep -i proxy
HTTP_PROXY=http://:
https_proxy=http://:
http_proxy=http://:
HTTPS_PROXY=http://:
And I want to remove this proxy...
Tell me how to edit this ...
2
votes
1
answer
999
views
paste content from clipboard to text file in ex mode?
In normal mode "+p can paste content in + regiter to text file ,+p can't paste content from clipboard to text file in ex mode,how can?
:reg +
--- Registers ---
"+ smartphone
There is a word ...
1
vote
0
answers
496
views
Vim, terminal, or htop won't start
Starting Vim, terminal or Htop from the Ubuntu 16.04 Unity desktop "Search your computer" doesn't work. When I select Vim for example, The Vim icon appears in the launcher and oscillates between ...
0
votes
0
answers
373
views
How do I use `sudo -e` together with gvim?
So when one edits a file owned by root it is recommended to use sudo -e. This will open a copy of the file in your favorite $EDITOR. Using this together with vim works like a charm.
However, when I ...
3
votes
1
answer
231
views
opening a file in terminal vim make the message press enter or enter command to appear
If I open a file in VIM either through :e <filename> or clicking the O key in NERDTree side window or searching and selecting a file with FZF from inside vim makes, I see the message
press ...
3
votes
1
answer
2k
views
less calls nano instead of vi
In the default configuration of Ubuntu 18 LTS server, pressing the V key in less calls the nano editor instead of vi while none of the environment variables $LESSEDIT, $VISUAL or $EDITOR are set.
I ...
43
votes
7
answers
28k
views
Why can I modify a read-only file?
Short Question:
Why can we manipulate a read-only file in Vim using : + w + q + ! even without being an administrator?
Long Question:
I have a text file (myFile.txt) which is read-only for everyone:...
1
vote
0
answers
2k
views
Terminal in Tmux is 256 color but Vim isn't
I'm new to Ubuntu. Recently I installed tmux on my Ubuntu 16.04.
The terminal screen in tmux shows 256 color correctly. However, when I opened vim in tmux, the color was different from what normally ...
11
votes
3
answers
14k
views
How to make cursor change from thin line to block based on normal or insert mode in Console Vim on Gnome Terminal
I am switching from Gvim to using Console Vim using the Gnome Terminal 2.32.1.
I really liked in Gvim how the cursor would be a solid square when in normal mode and thin line when in insert mode.
Is ...
0
votes
0
answers
106
views
Run a vim command from a file
Say I have a file and, in one line of the file, I have written a vim command (for example :setlocal foldmethod=indent)
Is there a way for me to run the command written in that line, without copying ...
0
votes
1
answer
712
views
Terminator 1.91 terminal emulator overwrites existing output in Ubuntu 18.04
Seemingly randomly, when sending a SIGSTOP to vim, my (Terminator 1.91) terminal output breaks. Instead of adding lines to the bottom of the display, it overwrites existing lines. Sometimes it will ...
4
votes
1
answer
1k
views
Command to toggle keyboard layout
I am using a keyboard with a different layout than qwerty. This is a pain when I use vim editor so I decided to change my keyboard layout to qwerty only when I am using vim. I came up with an idea of ...
6
votes
1
answer
2k
views
How to map Ctrl+S in vim on gnome-terminal?
I'm using Ubuntu 12.04 and gnome-terminal 3.4.1.1, and I'm trying to map ctrl + s to :update in vim.
I added this to my vimrc: map <C-s> :update<CR>
I also tried adding this to my bashrc:...
12
votes
5
answers
5k
views
Gnome-terminal + Vim and Ctrl-Shift mappings
Is it possible to map sequence with Ctrl-Shift in Gnome Terminal?
I'm trying to add the mappings
map <C-S-[> gT
map <C-S-]> gt
and it's not working. How to do that?
Somehow I mapped &...
6
votes
1
answer
1k
views
What does this command line that starts with "1, $" do in Vim?
I have a shell script created by someone else which I am currently trying to understand and there is a line in it which is
vim -c "1,\$s/MAJOR_VERSION = ./MAJOR_VERSION = $1/" -c "1,\$s/MINOR_VERSION ...
4
votes
1
answer
750
views
Why doesn't Ctrl-pgup and Ctrl-pgdn change tabs in vim when started in byobu?
From what I have read of the documentation, byobu does not use Ctrl-pgup or Ctrl-pgdn for anything, so why is it that when I start vim -p file1 file2, and try to move among the different tabs with ...
4
votes
1
answer
4k
views
gVim randomly spouting warning: invalid source position for vertical gradient
I run gVim from the command line and have for many, many years. But ever since upgrading to Ubuntu 18.04, I keep getting a long string of this warning a while after starting gVim:
** (gvim:5924): ...
0
votes
0
answers
1k
views
Unable to stop VIM with Kill, Htop, or anything else
I'm running Ubuntu Bionic. I installed SLiM display manager so my GUI uses tty2 and I ran vim to edit some C++ code in tty1. Suddenly, it froze completely. I tried to type things but nothing would ...
1
vote
1
answer
2k
views
Vim test if options are valid before setting
I use my .vimrc on a number of different machines, which all have significantly different versions of vim. Most versions boot up fine, but one of them has reports this (doctored) list of errors on ...
8
votes
0
answers
8k
views
Can't install vim on Ubuntu 18.04 because of broken python package [closed]
I'm having problems installing vim on my upgraded Ubuntu. When I try to install vim:
sudo apt-get install vim
I get this error saying I have broken packages.
The following packages have unmet ...
1
vote
1
answer
672
views
GVim menu bar is not working
I am using vim for some time now and wanted to start using it for my latex files as well. Since the tutorials on the vim-latex homepage use the gui version of vim to include templates etc., I thought ...
2
votes
1
answer
9k
views
vim-clang-format: clang-format is not found
I installed clang-format on Ubuntu 18.04 LTS with sudo apt install clang-format and the installation was successful. I can execute clang-format-6.0 now, but when I use ClangFormat in vim, it tells me ...
0
votes
2
answers
4k
views
I can not use vim to edit texts
The problem is that when I'm trying to edit text like:
>> vim lab
nothing happens. Can anyone help me?.
1
vote
1
answer
2k
views
Default vim usage in Ubuntu Bionic feels regressed from 17.10
Using Ubuntu Bionic (server image pre-GA), coming from Centos 7 (i.e. this may not be limited to just Bionic), I find that the vim editor has some very annoying defaults. How can I disable the ...
9
votes
2
answers
4k
views
Vim 8 with system clipboard on 16.04 LTS
I have install Vim 8 (so that I can use ale). Unfortunately I can't seem to get the system clipboard to work. (E.g. using vim-gnome I would use the "+y to yank to the system clipboard. Has anybody got ...
14
votes
3
answers
17k
views
Resuming a vim session I have accidentally disconnected from
I came across an unusual problem today,
I was using vim, had created a new alias in bash, and wanted to try it out.
So I ctrl-z, exec bash (I do this because I don't like nesting it with bash).
...
211
votes
2
answers
229k
views
How to change visudo editor from nano to vim? [duplicate]
When I use visudo, it always opens it with nano editor. How to change the editor to vim?
79
votes
12
answers
10k
views
How to learn vim on a high level? [closed]
I know that vim (like emacs) is very powerful editor for programmers, as long as you know how to use it, its shortcuts, and so on. What steps can I take and what tutorials can I read to become an ...
1
vote
1
answer
5k
views
Why won't Vim source my .vimrc at startup?
Note: edited to provide more info.
I have modified my ~/.vimrc significantly (although some of my initial modifications I made in the system-wide /etc/vim/vimrc). It probably doesn't matter either ...
10
votes
3
answers
14k
views
How to build vim with gui option from sources?
I'm having a hard time building a VIM 7.4(obtained from vim's ftp site) with gui option. It builds ok without the gui
option. Here's how I'm doing it:
cd ~/Downloads/vim74/src
./configure --enable-...
1
vote
0
answers
150
views
How to properly use `vim-airline` package [duplicate]
After installation of the vim-airline and vim-airline-themes packages, what is the best way to use / activate them?
I can manually copy the .vim-files over, but this defeats the purpose of package ...
50
votes
7
answers
93k
views
How to copy data between different instances of vim?
If I use the first vim to copy a line (with yy), how do I paste to another terminal's vim (with p)? Is there any command or settings can do it? Can I copy and paste into the global system clipboard?
...
1
vote
2
answers
6k
views
How to remap caps lock to esc in Ubuntu 17.10 and terminator?
I want to remap Caps Lock to Esc on my Ubuntu 17.10 laptop.
I have tried this method: How to remap key in Ubuntu 17.10 Wayland? (Up key to Shift), this method: https://linuxcommando.blogspot.ca/2008/...
0
votes
2
answers
708
views
Losing arrow keys in vim under screen
Under certain circumstances I lose the ability to use arrow keys in vim. I just installed 16.04 LTS and I didnot have this problem with earlier versions of Ubuntu.
Using PAC Manager tabbed SSH client ...
0
votes
1
answer
2k
views
Cat VS vim/nano etc
When I open files in nano/vim I see characters which are not-visible using cat command in terminal.
I want to proceed only with output of cat command. How to do that?
3
votes
1
answer
3k
views
GLib-GObject-WARNING when closing gvim
I set my computer up new with Ubuntu 16.04 today. I already installed vim-gnome. While working with it, everything is fine. But when I close gvim I get this message in the terminal:
(gvim:5834): ...
0
votes
1
answer
130
views
Unable to `apt-get` upgrade: How can I replace corrupted `systemd` `.conf` files?
I am unable to apt-get upgrade because I received the following error:
Extracting templates from packages: 100%
Preconfiguring packages ...
Setting up systemd (229-4ubuntu21.1) ...
dpkg: error ...
2
votes
2
answers
3k
views
vim colorschemes don't appear correct when using sudoedit
I've been trying to be a good little sysadmin and use sudoedit, instead of sudo vim, or sudo -i;vim, when making changes to root owned files (ex /etc/profile), but my vim colorscheme doesn't seem to ...
13
votes
3
answers
33k
views
Vim cannot find syntax.vim
Recently, I needed to build Vim from source to use a plugin that required Lua interpreting. This worked fine on my laptop, but my tower computer is having some issues. Any time I run Vim, I recieve ...
5
votes
1
answer
10k
views
Upgrading VIM 7.3 to latest release via apt-get [duplicate]
I'm currently using Ubuntu 12.04 and have Vim 7.3 installed and I want to update it to the latest version. I'm still new to how all these package manager stuff works, but I was wondering why can't I ...
1
vote
1
answer
5k
views
Filter text in vim
I have text in vim editor that I would like to be filtered. I need to show only lines that contains string com:.
How can I achieve that?
1
vote
1
answer
2k
views
Autocomplete of file path does not work after "vim" in terminal
Steps to reproduce
git clone https://github.com/MichinariNukazawa/vecterion_vge.git
cd vecterion_vge
input vim include/ tab
input vim include/et_co tab
What I expected to see
show file list in ...
1
vote
1
answer
2k
views
Open all log files in directory and sub directory in one command
I have directory ~/temp with log files. This directory contains another directory ~/temp/aaa that also contains several logs. I would like to open all log files at once. I do
vim -p *
It opens ...
6
votes
3
answers
16k
views
Setup vimrc with solarized color theme
I just started with vim in ubuntu, and have some trouble setting up my .vimrc file. This is what I currently have:
"============= Solarized color theme =============
"...
1
vote
0
answers
583
views
How to compile or install Debian version of Vim on Ubuntu 16.04
I really like the version/set-up of vim that is included with Debian 9 server.
This is not the same question as Ubuntu 16.10 repository providing vim 8. I am not asking about how to get Vim 8 on ...
4
votes
0
answers
66
views
How to manipulate the keypress that applications recieve?
Basically what I want is to create a DIY alternative for autokey because it seems to be so buggy and I can't get it to work on my PC.
What I want to know now is how I can receive a key combination and ...
0
votes
1
answer
251
views
Search by using bufdo command
I do search phrase not initiated in all buffers in vim by using command:
:bufdo /not initiated
Have output below:
E486: Pattern not found: not initiated
E486: Pattern not found: not initiated
E486: ...
15
votes
3
answers
28k
views
Permanently convert tabs to spaces in vi / vim
If I wanted to have traditional indentation in vi / vim, I would enter these commands:
:set tabstop=4
:set shiftwidth=4
:set expandtab
It is tedious to type those commands every time I open a file. ...
1
vote
1
answer
543
views
vim can not interact with system clipboards / Ubuntu
I downloaded Ubuntu in the Win 10 app store, installed vim, vim-gnome, opened + clipboard and + xterm_clipboard while viewing vim
But I vim: reg when there is no + or * clipboard, it can not be ...
3
votes
3
answers
12k
views
How can I find where the vim executable is located when my PATH is broken?
Looks like I crashed my system after editing /etc/environment and .bashrc files.
My desktop doesn't start and I need to correct these files back. But since my system doesn't find any commands I need ...