Vim is an open-source text editor which is typically run from the command line. Questions should relate to using Vim on Ubuntu.

learn more… | top users | synonyms

1
vote
3answers
2k 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 ...
14
votes
4answers
4k views

How do I redirect command output to vim in bash?

I am trying to redirect the output of a bash command into a new file. If I try the pipe as below : ls -la | vim Bash shows me the errors : Vim: Error reading input, exiting... Vim: preserving ...
1
vote
2answers
111 views

Using “dd” in Vi (delete multi lines) not accepted if number of lines > file length

I often edit a file locally then cut and paste it into a remote ssh session inside a vi session. The first step is to delete the entire contents by doing something like 9999dd Which will delete ...
2
votes
2answers
3k views

How to install and use jedi-vim python IDE for vim on ubuntu

How to install jedi-vim python plugin on vim installed on ubuntu and use it's features from remote terminal window. I have gone through documentation as describe but my vim acts in the same normal was ...
3
votes
1answer
211 views

Vim doesn't have 256 colors

I've been experimenting with different colorschemes in vim lately. My problem is that the colors used by the schemes only use the 16 colors in my Profile Preferences, even though my terminal supports ...
4
votes
1answer
2k views

Why is my vimtutor blank?

I want to learn Vim. The vast majority of people advise me to use vimtutor. I downloaded the package and ran it, but I just get given a blank screen. I see on Youtube that there should be tons of ...
1
vote
1answer
49 views

Script to open terminal in particular directory, in particular workspace, then VIM to a particular file

Bonus: vsplit to another file. ;) I have 9 workspaces, and often have multiple terminals running VIM on different files. The setup is pretty standard for a project—but I have to go about opening ...
0
votes
1answer
38 views

Is it possible to have a unique theme for Vim in Ubuntu Server

I recently started managing my own Ubuntu Server and I'm constantly using Vim to edit my files and I was wondering if it was possible to install a them to use overtime I login to my server? The ...
0
votes
1answer
85 views

make the line bold or highlight on find command on vim

I know by /foo you can find and go on foo. So what I am looking for is highlighting that line. I mean when vim find foo and the courser points to foo, also highlight that line which include foo.
1
vote
0answers
263 views

key word remap enter carriage return vim command line

In my .vimrc file I have :imap ii <CR> which allows me to hit ii for enter/carriage return in vim but now i would like to set that same configuration in my .inputrc so that i can just hit ...
4
votes
3answers
3k views

How to execute a shell-command in Vim, and have the result printed below?

I'd like to edit shell commands from vim, and execute them from vim. Currently I use !!sh (pipes current line to command sh), but this removes the line itself. Is it possible to execute the command ...
0
votes
1answer
17 views

Remove spaces between tags in an html file in vim

I have a badly formatted html file that I am editing. In several places, there is unnecessary space between tags. See below for example: <b> Bold Text </b> I want to remove this ...
0
votes
1answer
32 views

"+y not copyes to clipboard

Trying to copy piece of text to system clipboard. I do visual select then pres " then + then y. Then have message 7 lines yanked. When I press p data is pasted in vim, but when I'm trying to paste ...
4
votes
2answers
3k views

What's the easiest way to get vim with python 3 support?

I have ubuntu 14.04 installed and vim in its repos is compiled without python 3 support. Because of that python-mode plugin can't work with python 3 code. What's the easiest way to get vim with python ...
0
votes
1answer
15 views

Jump to corresponding html tag in vim

I am editing an html file in vim. How do I jump to a corresponding tag? So, from <b>, go to </b>, etc. % takes me to the corresponding closing element i.e. from < to > or from ( to ...
0
votes
0answers
10 views

Remove a tag using emmet plugin for vim

I have been using emmet for vim for some time now. Quite useful. I have used .class1>b>em to expand quite often. I have the following code: <li><b>Point 1</b></li> I just ...
0
votes
1answer
21 views

How to install easy_align.vim?

I have vi in my linux, moreover I have the file easy_align.vim in ~/.vim/plugin/ But when I am opening vi using vi <file-name>. The alignment is not working. Do I explicitly install vim as vi ...
-1
votes
1answer
24 views

My .viminfo file doesn't have a writing permissions, how should i grant it?

How do you change the permissions, so you can write to a file?
0
votes
1answer
14 views

How do you get FakeVim in the Ubuntu SDK to use ~/.vim/plugin/colemak.vim?

I have a custom layout for vim, that remaps the keys to fit my colemak keyboard layout. In the ubuntu SDK, fakevim does not use the custom layout defined in ~/.vim/colemak.vim. How can get fakevim ...
0
votes
0answers
30 views

g++ and vim on Ubuntu phone

Can i install g++ and vim on my ubuntu phone? I have tried running sudo apt-get install vim g++ from the terminal app, but neither were in the repositories.
3
votes
2answers
57 views

Funny TTY/Terminal behavior when sudo-ing as a user?

I set up an Ubuntu VPS from Digital Ocean recently. When I log in as root, I'm able to navigate around the terminal properly When I sudo as any other user, I get some extremely strange terminal ...
1
vote
1answer
33 views

When exiting Byobu, close all non-exited vim sessions

I have configured Byobu to open a dozen text files at startup: new-session -n memo /home/nico/bin/vim-my-memo.sh; new-window -n client1 /home/nico/bin/vim-client1.sh; [...] It works well, but ...
1
vote
1answer
27 views

Vim in shell allows <alt>[a-z] to circumvent having to press <escape> to get out of INSERT mode. How can I apply this to Gui implimentations of Vim?

Vim in shell allows <alt>[a-z] to circumvent having to press Esc to get out of INSERT mode. For example, Open up a terminal and set its editing mode away from emacs, to vi set -o vi Now ...
0
votes
0answers
13 views

Key behaviour in vi editor [duplicate]

I have noticed strange key behaviour in my vi editor. During insert mode key Home returns cursor to line beginning (that was expected) and inserts one line above current one and writes letter H: ...
1
vote
1answer
42 views

How to apply Vim color scheme to all users?

I installed a new color scheme for my vim editor and have put an entry in ~/.vimrc to start vim everytime with this color scheme. But the problem is it applies to vim sessions opened ONLY with sudo. ...
0
votes
0answers
27 views

How to change toolbar color in gvim?

I've been customizing my gvim but I'm currently stuck since google searches doesn't seen to give me answers about the topic above.
2
votes
1answer
21 views

tabbing with vim

I made the mistake of posting this on the unix echange originally beore realizing ubuntu had a separate site. I'm using Ubuntu with vim as my text editor of choice. I know some people set shortcuts ...
0
votes
0answers
9 views

Can VIM (plugin) give a warning if dead keys are enabled?

I often switch between dead keys and composed key text input/entry. That's easily done by the icon in the top panel. For VIM dead keys make no sense. Is there a plugin for VIM that can give me a ...
0
votes
0answers
78 views

vim binary with all libraries statically linked

I want to build vim with all libraries, which vim depends on, statically linked. Vim version is sufficient to run YouCompleteMe. I use the following flags with configure script: $./configure ...
1
vote
2answers
40 views

vim: changing variable value line by line

Lets say I typed the following a + 1 =b and a+1=c I need 2 more expressions like that but I want to increase the value of 1 to 3, so I copy pasted the expression above 2 more times and manually ...
1
vote
1answer
27 views

Vim macro broken after switching from Gnome Terminal to Byobu

In my .vimrc I have this line to quickly insert a </p> line: let @l='^[I</p>^M^[^[OH^[OB' I was working great in gnome-terminal, but in byobu it adds an extra line containing H. How to ...
0
votes
2answers
60 views

How can I update vim in ubuntu 14.04LTS

I have vim version: 2:7.4.052-1ubuntu3 installed. How do I update to the latest version using the terminal?
2
votes
0answers
76 views

Vim does not load colorscheme from .vimrc when started from tmux

I got a very simple startup script, that starts a gnome-terminal with a running tmux session. #!/usr/bin/env bash gnome-terminal -e "tmux" --window --full-screen When I run vim inside this ...
3
votes
1answer
93 views

Why does vi start vim but typing vim says vim needs to be installed?

When I type vi into terminal, VIM starts up. But when I type vim into terminal, the terminal says The program 'vim' can be found in the following packages: and lists different varieties of vim, as if ...
6
votes
3answers
562 views

How to copy from vim to google chrome? [duplicate]

I want to select all contents of a file and copy it to google chrome. I have tried shift-ctrl-c but it isn't working.
23
votes
10answers
14k views

Vim in tmux display wrong colors

I installed Ubuntu 11.10. Then downloaded Solarized theme for Gnome Terminal. From terminal my vim looks good: plugin vim-powerline displays correctly and syntax is highlighted with proper colors. But ...
8
votes
3answers
1k views

Can I get italics in gnome-terminal?

After a lot of searching I cannot find a way to get gnome-terminal to display italic fonts. I'm running version 3.6.2. Specifically I would like vim to display comments in italics; I've added ...
1
vote
4answers
19k views

Installing vim text editor on ubuntu

just installed LAMP server and need to use vim editor to edit php.ini the cli command 'sudo apt-get install vim' gives me the following error: <Package 'vim' is not available but is refered to by ...
0
votes
1answer
22 views

GVim extra linespace

I recently installed GVim and set the font to DejaVu Sans Mono size 11, but I noticed that there are 2 pixel lines between the lines, making the lines look apart. With linespace set to -2, the spacing ...
0
votes
0answers
80 views

How to install and use vim without messing up with write mode

The terminal app works fine, I can run vi using it. The problem is that I've already get used to vim and don't want to learn all the vi-vim differences just for editing plaintext. I assume there must ...
38
votes
1answer
41k views

What is the difference between the different vim packages available in Ubuntu

The difference between vim-gtk and vim-gnome has been discussed here. Ubuntu usually offers more than these two options for vim : vim-nox vim-athena vim-* It is not clear which vim package ...
0
votes
1answer
24 views

Vim mksession not saving split windows

I'm trying to save a Vim session that contains 2 panels in a vertically split layout. I have tried using mksession and also the vim-session plugin, but whenever I reload a session, the split window ...
2
votes
2answers
225 views

Daily builds for VIM

Is there any PPA that allows to be up to date with the latest changes in VIM, even they are buggy or not? I would like to know that I use the latest VIM build even it is unstable. Also, the ...
0
votes
0answers
45 views

What is my problem in VIM?

I am adding to PATH in VIM in terminal but I'm getting an error. I followed this guy's instructions carefully and even though he didnt get the error i did. I was following Android Development for ...
0
votes
0answers
33 views

Need help removing a program

I'd installed vim using apt-get, but in my infinite wisdom, I decided to uninstall it and try installing from source. I don't know why, but the end result was kind of borked up. I'm trying to ...
0
votes
2answers
32 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
0answers
12 views

vim plugin not activating

I had installed a scala plugin but it is not activating on a .scala file. Here is my .vim directory: 11:49:43/clustering $find ~/.vim /Users/steve/.vim /Users/steve/.vim/.netrwhist ...
0
votes
1answer
39 views

Changing background colour of selected search in vim in gnome terminal

Having hlsearch enabled, if I use something like :%s/search term/replacement term/gc vim will highlight all occurrences of the search term by using black foreground on yellow background, but for the ...
17
votes
3answers
11k views

vim is not remembering last position

My Ubuntu LTS 12.04 has vim editor. If I open a file, move to a paragraph and reopen vim, then the cursor goes to beginning of the file always. This is not the expected behavior. How the vim can ...
5
votes
2answers
16k views

What is the difference between Vi and Vim?

This might sound like an idiotic question. I would appreciate it if someone can let a newbie know what the differences are between vi and vim. I've heard vim is a successor to vi but whenever I try to ...