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
13
votes
3
answers
17k
views
Replacing vi by vim
How do I replace vi by vim so that when I type vi in terminal vim is opened?
101
votes
5
answers
112k
views
How do I enable full-color support in Vim?
I have a lovely Vim colorscheme (xoria256) and it looks brilliant in GVim, but when I use normal vim in Terminal, the colorscheme is only partially supported -- for example, the default semi-...
0
votes
2
answers
2k
views
vim theme showing up strange in tmux
My vim is configured like so:
syntax on
colorscheme brogrammer
set nu
set expandtab
set tabstop=4
set autoindent
My tmux is configured like so:
set -g default-terminal "xterm-256color"
...
0
votes
0
answers
1k
views
YCM could not work after build
YCM didn't work after build finish, although .vimrc is being set.
What did I do?
sudo apt-get install build-essential cmake
sudo apt-get install python-dev python3-dev
sudo apt-get install clang
cd ~...
0
votes
0
answers
107
views
vi repeating changes when hit Esc
When I use vi, depending on the change I make, it will repeat the change over and over again when I hit Esc.
For example, if I go into a file and insert "6" then hit Esc, the program will suddenly ...
4
votes
2
answers
1k
views
How can I disable Vim "jump to last position" feature in Ubuntu 17.04?
I just upgraded to Ubuntu 17.04 and saw that Vim now jump to last position where cursor was when you reopen the same file.
Previously, this feature was an "opt-in" feature in /etc/vim/vimrc with an ...
2
votes
1
answer
3k
views
When I press : in vim, it enters insert mode not command mode?
I cannot enter command mode by typing :.
What's more , whatever key I press, Vim will enter insert mode and type the word I've just typed. i.e. I type j, and the cursor doesn't move downwards but Vim ...
1
vote
1
answer
1k
views
Opening vim inside terminator window
I have started using the terminator emulator, and overall it's great. One annoying issue I have however, is that everytime I open up vim inside of it the window acts very odd. Basically all the ...
1
vote
1
answer
95
views
disable a key on an OS level
I have a volume control wheel on the bases of my laptop which I always spin by mistake. When spun, the letters 6 ~ start to pop up in rapid succession.
Annoying as this is, when in my vim environment,...
1
vote
1
answer
1k
views
Create PostScript file from vim
How can I open a script file and automatic create the PostScript file?
Now I use:
vim file.py
and inside :ha > text.ps.
The problem is that the command have to go inside a bash script. How can I ...
3
votes
4
answers
48k
views
Installing vim text editor on ubuntu [duplicate]
just installed LAMP server and need to use vim editor to edit php.ini
The command sudo apt-get install vim gives me the following error:
Package 'vim' is not available but is refered to by another ...
1
vote
1
answer
445
views
a terminal emulator w/key-customization on par with iTerm?
I've (mostly) migrated from macOS to linux, and I really miss the ability to configure custom key sequences in my terminal emulator. iTerm lets you map a keyboard shortcut to send ansi escape ...
0
votes
0
answers
183
views
My vim does not support python3, how can I fix this [duplicate]
So I want jedi-vim to autocomplete to python3, I added
autocmd FileType python set omnifunc=python3complete#Complete
To my vimrc. Now if I try and autocomplete something in vim I get
Error: ...
0
votes
0
answers
154
views
Using ssmtp via GMAIL / Intl character set
To send mails to my mailing list, I use ssmtp and gmail send mail.
Mails are sent, received. Good news!
I need to use a french character set, for example :
-Jusqu'à présent
To create the mail's body ...
0
votes
0
answers
66
views
Unable to run preinstalled Vim
I had preinstalled vim but whenever I run it, it dosn't response.
I also had tried to reinstall it by removing via
sudo apt-get remove vim
sudo apt-get purge vim
and installed via
sudo apt-get ...
0
votes
1
answer
2k
views
Not able to install Vim (Depends: vim-common (= 2:7.4.1689-3ubuntu1.2) but 2:7.4.1689-3ubuntu1 is to be installed)
I am trying to install Vim. I got the following error
$ sudo apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run ...
0
votes
1
answer
843
views
I cannot run vim in 16.04
I tried running vim today, and I got an error:
vim: error while loading shared libraries: libruby-1.9.1.so.1.9: cannot open shared object file: No such file or directory
Then after a lot of research,...
3
votes
1
answer
2k
views
Ubuntu vim can't open a file
When I try to open any file with Vim I get no error messages, but file is empty (when I try to :q it says I should save before quit because of unsaved changes) in Vim. Though I can see file contents ...
0
votes
1
answer
754
views
Replace Pylint, install newer version from Source, and make it available to syntastic
I would like to replace the existing pylint and astroid version on my computer with its current versions which are available via Github and make it available to the vim plugin syntastic.
In ...
4
votes
3
answers
2k
views
vim mapping from q! to Q!
I was trying to map 'q!' to 'Q!' in .vimrc ? I tried the following but not working.
:command Q! q!
Please provide any suggestion to mitigate this issue. Thank you.
0
votes
0
answers
716
views
Vim says its installed but not opening files
I have been using vim for a while now on my ubuntu (16.04 LTS) desktop, but for past few days, something seems to be wrong as when i try to open file using vim it says
The program 'vim' can be found ...
11
votes
0
answers
966
views
Why I can write into a file which I don't have permission to? [duplicate]
user1@server1:/locdisk/data/a$ touch test
user1@server1:/locdisk/data/a$ ll
rwxrwxrwx 1 user1 user1 1 AUG 30 11:11 ./
rwx------ 1 user1 user1 1 AUG 30 11:11 test
user2@server2:~$ ssh server1
user2@...
0
votes
0
answers
126
views
Go back to the Vim 7.4 version?
I've recently updated Vim in order to use the 8.0 version, but now I'd like to go back to the 7.4 version. I've noticed that there are 2 directories in /usr/share/vim: vim74 and vim80.
Is there a way ...
1
vote
0
answers
1k
views
Python Support in Vim 8 in Ubuntu 17.04
I'm currently running Ubuntu Zesty. However the default Vim package does not support Python? I've already installed vim-nox as well.
$ lsb_release -a
No LSB modules are available.
Distributor ID: ...
0
votes
0
answers
144
views
Yank to */+ not working even with `gtk-vim`
Edit: I am trying to copy to clipboard by yanking to either * or + but none of them is working. If I type :reg I can't see any of them assigned.
I already have gtk-vim installed and running vim --...
1
vote
2
answers
2k
views
How do I remap keys in Ubuntu-16?
I've been using Ubuntu for about a month now and have recently started using Vim.
I would really like to know how to swap the Caps_Lock and Escape keys but am not sure how.
I'm using Ubuntu 16.04.1 ...
1
vote
1
answer
2k
views
How to use cut command inside vim [closed]
I know this should be very simple but due to some reason I am not able to get this working.
say I have a simple file with multiple columns of data, I just want to get second column and remove other ...
4
votes
4
answers
3k
views
Unable to copy text from the terminal to external programs
Aim: I want to copy my public ssh key generated on AWS Server to my github account.
I have little experience with Ubuntu.
I use the ssh command from my laptop to connect to the AWS Server.
The ...
3
votes
0
answers
325
views
In some files, vim jumps to the last location on my last edit. In other files this does not happen
I have just updated Ubuntu 14.04.5 LTS with Software Updater.
After restarting, apparently something has changed on vim:
Previously, when opening a file with vim, then :q, and then opening it again, ...
0
votes
1
answer
708
views
Ubuntu 17.04 vim colors
I just installed Ubuntu 17.04. After setting up vim I noticed my colors are wrong. Here's what I mean:
You can see that system background is showing through the vim background in places where there ...
2
votes
0
answers
82
views
`vim` takes me to lockout screen ( possibly X?)
This just happened and I can keep reproducing it. If I type vim, or with any file name, I get taken to the lockout screen.
Was only doing this in new windows. The tabs and tmux sessions that I had ...
0
votes
2
answers
2k
views
Vim not using 256 color, ncurses-term installed, "xterm-256color: command not found"
First I want to say I am using Ubuntu Mate 16.04.
I'm trying to get the solarized colorscheme to work in vim but am running into problems. It works fine in gvim, but I seem to only be getting 8 color ...
0
votes
0
answers
963
views
How to use Vim as the default text editor in Ubuntu but using Tilix as default terminal for it?
I am currently using Vim as the default text editor in Ubuntu Gnome 16.04. However, Vim opens by default with Gnome Terminal, and I would like to know if it is possible that Vim would open directly ...
0
votes
0
answers
93
views
GVim crashes when opened by clicking
I have been a user of GVim for many years now. I recently upgraded from Ubuntu 16.10 to 17.04. I recall during the upgrade that it asked me if I wanted to keep my .vimrc file, I said yes (because why ...
6
votes
1
answer
6k
views
Is there any way to write italic or bold in vim
Is there any way to write italic and/or bold in Vim?
5
votes
4
answers
16k
views
Problem installing vim
I tried installing VIM using terminal command sudo apt-get install vim but it didn't install and I got this message:
You might want to run 'apt-get -f install' to correct these:
The following ...
12
votes
1
answer
151k
views
vim: command not found
I'm trying to install openflow in Ubuntu, but I encounter a problem when installing regression suite. I follow the instruction from openflow website with the below lines
To update the OF_ROOT ...
2
votes
5
answers
11k
views
"E21: cannot make changes" when editing resolv.conf
A few hours earlier I bought a beaglebone and now I am trying to add nameserver 8.8.8.8 to /etc/resolv.conf. However when I open it with vim and try to add my nameserver, it gives me E21: cannot make ...
0
votes
0
answers
264
views
How to fix dpkg error code (1) while trying to install vim?
While installing vim, I am getting these errors:
Errors were encountered while processing:
grub-efi-amd64
grub-efi-amd64-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)
I am facing ...
0
votes
1
answer
808
views
vim plugin doesn't show in PlugInstall
I'm currently trying to customize my vim setup, which involves installing new plugins.
So I've edited my ~/.vimrc in order to install those plugins:
call plug#begin('~/.vim/plugin/bundle') ...
0
votes
1
answer
377
views
Ubuntu Minecraft Server Terminal Displaying Odd Characters
When players chat on my Ubuntu Minecraft server they can see the chat clearly in the game and it's fine. However when I look at the terminal all I see is 1 bracket for each time they enter something ...
-1
votes
1
answer
110
views
Add keybinding in Vim
I am using vim pretty often with my work. I am a web developer in Django. I would like to build a keybinding so that each time it is executed it will print the line import ipdb; ipdb.set_trace(). ...
1
vote
0
answers
239
views
Trying to install vim, but encountering error
I'm trying to install vim using the following code:
sudo apt install vim
as suggested by -bash when typing in:
$ vim
However when I type in the first command and tell it that, yes I do want it to ...
3
votes
1
answer
13k
views
How to change syntax color in vim? [duplicate]
I have Ubuntu 16.04 LTS. But vim is not showing the proper syntax colors and also the mode in which you are like insert mode. So can anyone help me how to solve the issue?
0
votes
1
answer
2k
views
What's the difference between auto and manual modes in update-alternatives?
I installed vim and ran update-alternatives. Then I installed vim-full and ran it again. I noticed that there are two entries for vim.basic: one in auto mode, and one in manual.
What's the difference ...
0
votes
0
answers
69
views
Vim in /usr/local Keeps Getting Overwritten After apt-get upgrade
I have manually compiled vim following the instructions on https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source. I changed the configure step to include --prefix=/usr/local and then ...
0
votes
1
answer
724
views
Compile vim from source on Ubuntu 16.04 with python failure
I am trying to compile vim from source with python or python3, but they are never present after installation. I am following the instructions from youcompleteme wiki and have installed VIM - Vi ...
0
votes
0
answers
355
views
Vim from source with Python2.7
I installed vim80 from GitHub with the configuration settings
--with-features=huge
--enable-multibyte
--enable-pythoninterp=yes
--with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/...
1
vote
1
answer
1k
views
Spacevim does not have colors in Terminator
Spacevim doesn't have colors in Terminator (Ubuntu 16.10), but it does have colors in other terminals apps, such as Gnome Terminal, or XTerm:
One at the top is Terminator, and Gnome Terminal on the ...
5
votes
1
answer
6k
views
In vimrc, how can I chain multiple instructions in one Leader command
In my .vimrc I have:
map <Leader>c :GitGutterToggle<CR>
map <Leader>n :set invnumber<CR>
Is there any way I can combine these two into one Leader entry?
For example:
map &...