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

111
votes
4answers
93k views

How can I install and use powerline plugin?

Powerline is a plug-in to display informational and beautiful statusline for vim, tmux and shell prompt for bash, zsh. Vim statusline: How can I install and setup Powerline for different ...
86
votes
5answers
76k 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-...
78
votes
5answers
54k views

vi shortcut to delete “until the next X character”

I understand that vi has shortcut keys to delete character, word and line with various options. However, I could not find this: to delete from cursor to the next specified character. I might type du"...
70
votes
12answers
7k 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 ...
50
votes
1answer
67k views

What are the differences 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 ...
43
votes
17answers
73k views

text editors in ubuntu? vim vs. emac vs. nano [closed]

I was wondering the difference between these text editors and which is best used with ubuntu? What are each of them good for? Are there better ones?
34
votes
8answers
13k views

Where can I find Vim 7.3?

Vim 7.3 is out, but not available in the sources. Where can I get an installation package for the 7.3 version? I don't want to install it manually.
33
votes
5answers
15k views

How can I change the default text editor from gedit to vim?

How can I change the default text editor from gedit to vim? When I click on a text file, I want it to open in vim under the terminal instead of gedit.
32
votes
3answers
145k views

How do I save files edited with vim?

I can't save changes after editing sudo vi /etc/network/interfaces Text before editing: auto lo iface lo inet ... Edited to: auto eth0 iface eth0 inet dhcp What key combination or sequence ...
32
votes
6answers
124k views

How to close vim from the command line?

I know this is more of a general linux question but w/e. So when I enter a program like vim in the command prompt it displays all the text in the file and I can edit it etc. But I can't figure out how ...
31
votes
5answers
18k 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 ...
30
votes
5answers
7k views

Access to the terminal while you are on Vim

Is there a way to access the terminal while using Vim? I do not like to open another terminal or save and exit the current terminal.
30
votes
4answers
18k views

Gvim GLib-GObject-WARNING in ubuntu 13.10

I upgraded from ubuntu 13.04 to ubuntu 13.10 this afternoon. And when I try starting vim form the terminal after the upgrade, I get these warnings (gvim:4054): GLib-GObject-WARNING **: Attempt to ...
29
votes
10answers
20k 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 ...
28
votes
4answers
10k 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 ...
28
votes
3answers
43k 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 ...
27
votes
3answers
7k views

How do I get vim to keep its undo history?

If I'm editing two files with vim, changing to the other file ( :bnext, :bprev ) seems to drop the undo history from the open file - hitting the 'u' key reports "Already at oldest change". For ...
24
votes
2answers
19k 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?
24
votes
3answers
15k views

How to stop Gedit, Gvim, Vim, Nano from adding End-of-File newline char?

Sometimes I want the last line of a text file to be a simple string of text with no newline character appended: ...eg. to concatenate another file to it. Several editors automatically modify my ...
19
votes
5answers
8k views

How to make Vi default?

Apparently Ubuntu 11.10 uses Vim when I type vi filename How do I force Ubuntu to use Vi instead?
18
votes
2answers
14k views

Unable to copy from vim to system clipboard

As said in the title I am unable to copy from vim to system clipboard. Viceversa works, copying from outside vim and pasting with p is ok. I have installed clipboard support, vim version is 7.3.429: ...
17
votes
3answers
7k views

How do I remap the Caps Lock and Ctrl keys?

I'd like to remap my keys such that Ctrl behaves as the Caps Lock key and vice-versa. Also, if possible I'd like the settings to be available only within the currently logged-in user. How can I ...
16
votes
1answer
10k views

What are the differences between vim.basic and vim.tiny? [duplicate]

My favorite editor is Vim, so I decided to change the default editor of my ubuntu installation with the following command: sudo update-alternatives --config editor A prompt (with listed options) ...
15
votes
6answers
29k 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? ...
15
votes
2answers
44k views

How to Display Hidden Characters in vim?

How can I configure vim to display hidden characters like tabs or spaces ONLY while those characters are typed? I do not want tabs and/or space replaced with special characters like ">" or "_" when ...
15
votes
3answers
2k views

How to display the name of file which I am currently editing with vim on terminal title?

I am editing multiple files located in the same folder, in multiple tabs, on a single terminal. pwd(directory in which I am currently working) is displayed on the top of the heading of the terminal, ...
15
votes
5answers
8k views

Is there a way to turn gvim into fullscreen mode?

Is there a way to turn gvim into fullscreen mode? I know that this is possible on OS X through MacVim, but wasn't able to find a way to do it on Ubuntu.
14
votes
1answer
8k views

Having problem with fonts in vim-airline

I wanted to install vim-airline but I am having problems with unicode fonts. I have installed it with vundle: .vimrc set encoding=utf-8 Bundle 'bling/vim-airline' let g:airline_powerline_fonts = ...
13
votes
2answers
10k views

vi, getting multiple “Sorry, the command is not available in this version…” after reinstall

From my .vimrc, getting: line 16: E319: Sorry, the command is not available in this version: filetype on line 17: E319: Sorry, the command is not available in this version: filetype plugin on ...
13
votes
3answers
19k views

What is the default vim colorscheme?

I really like the default vim colorscheme in 10.10 but I can't figure out what it's called -- I want to turn it on for my Debian box as well.
13
votes
3answers
18k views

What features does vim-tiny have?

So, the cut down vim-tiny is installed by default in Ubuntu. I don't mind using it, but I can't find documentation and most of the commands I'm used to from normal Vim don't work. So far I've ...
12
votes
2answers
42k views

Open an existing file from Vim

I would like to open a file that already exists while already in Vim. What is the command to do this?
11
votes
1answer
12k 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 ...
11
votes
1answer
3k views

Change the default editor when sudo visudo

When doing sudo visudo, the default editor is nano. I want to change it to vi or vim. I already made vim be the default application to replace gedit upon opening php, plain text, c and h files, by ...
10
votes
3answers
2k 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 ...
10
votes
4answers
4k views

Using gvim as editor for Thunderbird

Can I somehow use gvim to compose my email messages in Thunderbird?
9
votes
2answers
5k views

Exit file explorer in Vim without closing

I have been trying to figure out how to exit the file explorer in Vim. :q works, but it closes Vim as well, not just the file browser. Am I missing something or is this a bug?
9
votes
3answers
8k views

How can I customize Vim for web development and programming?

I tried already to find something for my question in [askubuntu.com] , but nothing was answering my needs. So, what i want is build vim as a very powerful and useful editor for html,css, javascript, ...
9
votes
3answers
14k views

Vim editor, how can I save a file in other directory

I'm new in the world of ubuntu and vim editor. My question is: how can I save a file on my localhost using vim? When I use the command :w I save the file, but where? And how can I change the file ...
9
votes
3answers
7k views

Insert output of a system command at the current location in vim

In vim, when I use :r !ls somefilename it inserts output of that command on a new line below the current line. If I do let @a = system("ls") and later "ap it still inserts the output on a new ...
9
votes
3answers
7k views

Why is Vim no longer installed in 12.04 desktops and is there a better alternative?

What are the reasons and alternatives to the removal of Vim from a default Ubuntu installation since Oneiric 11.10?
9
votes
3answers
6k views

How to remove gVim's fat bottom border? (and resize grip)

So my gVim has this annoying bottom border: I wish it didn't and looked more like gnome-terminal for example: Is there any way for gVim to look like that? UPDATE: There is! Here's a screenshot ...
9
votes
2answers
5k views

How can I add a PPA from a previous release?

I've been trying to get vim with the breakindent patch applied, but it's only available through Quantal, and I'm running Raring. Is there a way to force-install a PPA from a previous release? I tried ...
9
votes
1answer
2k views

unicode characters do not appear in gnome terminal for vim airline

I know this has been asked a few times but none of the answers worked for me. I use the gnome terminal as default in Ubuntu 14.10 and I can't get unicode characters to show properly, mainly in vim ...
8
votes
4answers
15k views

No Terminal Library Found when Compiling Vim

I am running Ubuntu 12.04. I'm trying to a get a particular plugin for vim working and it requires that vim has ruby support enabled (the plugin is command-t). People tell me that I must go into my ...
8
votes
3answers
938 views

Which application does the vi command open?

When you type vi in the terminal, the following output is shown ~ VIM - Vi IMproved ~ ...
8
votes
2answers
11k views

How do I get VIM to remember the line I was on when I reopen a file? [duplicate]

I just moved from RH/Fedora to Ubuntu 12.04. In RedHat, when I reopen a file with VIM, it opens with the cursor on the line it was on when I closed the file. However, what I am seeing now is that ...
8
votes
2answers
3k views

Is it possible to find out what options packages were compiled with?

I am interested in knowing which options are used to compile vim in the package "vim" as I am trying to compile vim from source on another system, not running Debian/Ubuntu, and would like it to work ...
8
votes
3answers
5k views

command-t vim “Could not load C extension”

When I hit \t to use the Command-T extension in VIM, I get the error command-t.vim could not load the C extension I'm not sure how to go about fixing this... any suggestions? Thanks I am using ...
8
votes
5answers
4k views

Add Vim to Unity launcher?

Please can someone explain how to add a launcher icon in Unity (along the left side) for Vim - or any other terminal-based application? I press alt+f2, type vim, and drag the icon to the left ... but ...