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

82
votes
4answers
57k 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 ...
80
votes
5answers
63k 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 ...
67
votes
12answers
6k 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 ...
55
votes
4answers
37k 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 ...
38
votes
1answer
42k 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 ...
36
votes
17answers
49k 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?
33
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.
30
votes
5answers
12k 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.
28
votes
6answers
88k 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 ...
27
votes
5answers
4k 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.
27
votes
4answers
13k 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 ...
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 ...
21
votes
3answers
5k 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 ...
21
votes
2answers
11k 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 ...
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 ...
17
votes
5answers
6k 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?
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 ...
13
votes
6answers
18k 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? ...
12
votes
3answers
15k 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.
10
votes
3answers
5k 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 ...
10
votes
3answers
1k 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, ...
10
votes
1answer
28k 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 ...
9
votes
2answers
8k 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: ...
9
votes
3answers
7k 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
6k 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
5k 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
1answer
5k 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 ...
9
votes
3answers
13k 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 ...
9
votes
4answers
3k views

Using gvim as editor for Thunderbird

Can I somehow use gvim to compose my email messages in Thunderbird?
9
votes
1answer
1k 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 ...
8
votes
3answers
748 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
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
2answers
3k 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?
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
4answers
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 ...
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 ...
8
votes
4answers
6k 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.
8
votes
1answer
5k 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) ...
8
votes
1answer
5k 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 = ...
8
votes
1answer
517 views

Vim: Move left at the beginning of a line should go to above line

In usual text editors, when you move your cursor left at the beginning of a line, the cursor goes up at the end of the above line. Is it possible to get this behavior in Vim?
8
votes
1answer
2k views

How do I make GVim use the icon in my icon theme?

Instead of my pretty Faenza icon, it's using a rather ugly one.
7
votes
4answers
26k views

How to edit files in a terminal with vim? [closed]

It is not always possible to edit and create files in a terminal , and I would like to get answers of the basics of manipulating files in a terminal using vim under Ubuntu Linux. Specific questions I ...
7
votes
6answers
10k views

Cannot install vim

I am running Ubuntu 11.10, as Xubuntu, in an AMD 64 pc, configured as dual boot with Windows 7. I tried installing vim with this: sudo apt-get install vim I got this error message: The following ...
7
votes
3answers
8k 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 ...
7
votes
2answers
2k views

.viminfo owned by root?

The .viminfo file in my home directory is owned by root. Could anyone please explain how that could have happened without me asking it? $ ls -la | grep .viminfo -rw------- 1 root root 4175 ...
6
votes
3answers
4k views

Replacing vi by vim

In my college our Admin has replaced vi by vim. So how do I replace vi by vim so that, when I type vi in terminal, then vim should get opened. I know doing so is silly, but I am asking it just out ...
6
votes
2answers
2k views

vim/gedit delete words between character

I have a huge file with the entries like the one below: <option value="201">Medical</option> <option value="203">Finance</option> <option value="205">Tax ...
6
votes
3answers
566 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.
6
votes
3answers
2k views

Getting Quickly to use Gvim instead of Gedit

How do I get Quickly to use Gvim (or just vim in a terminal) as its default text editor instead of Gedit? If this can be done, I must be doing it wrong... Ubuntu 10.10 AMD64.
6
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 ...