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

65
votes
5answers
51k 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 ...
62
votes
12answers
5k 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 ...
54
votes
2answers
36k 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 ...
32
votes
4answers
25k 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 ...
32
votes
8answers
12k 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.
29
votes
17answers
33k 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?
27
votes
5answers
2k 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
9k 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.
24
votes
4answers
9k 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 ...
24
votes
1answer
24k 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 ...
20
votes
6answers
60k 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 ...
18
votes
2answers
8k 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 ...
18
votes
8answers
10k 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 ...
16
votes
3answers
3k 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 ...
15
votes
5answers
5k 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?
12
votes
3answers
7k 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 ...
12
votes
3answers
12k 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
4k 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 ...
9
votes
3answers
5k 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
4answers
11k 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? ...
9
votes
2answers
623 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, ...
9
votes
1answer
3k 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 ...
8
votes
4answers
803 views

how to redirect bash command output to vim

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 ...
8
votes
3answers
579 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
3answers
5k 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?
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
4k 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
3answers
4k 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 ...
8
votes
4answers
3k 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
4answers
2k views

Using gvim as editor for Thunderbird

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

How can I easily retab html files according to some sane default?

I have some html files that I'd like to retab that look like this: <header> <div class="wrapper"> <img src="images/logo.png"> <div ...
6
votes
4answers
4k 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.
6
votes
4answers
243 views

How to prevent Ubuntu from making auto-updates?

I have the following problem. Recently I have installed vim (which I compiled myself, as the one in the Ubuntu repositories are old). With it I installed Cscope and You-Complete-Me plugins. Now ...
6
votes
2answers
542 views

Vim keybindings for nautilus

Is there a way to configure nautilus to use vim keybdings. By vim keybindings I am not saying just h j k l but other things like regex search on filenames too. I know I can simply use a command ...
6
votes
2answers
1k 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 ...
5
votes
8answers
922 views

Cloning Textmate's functionality with Vim

Tips and advice on how to clone Textmate's functionality in Ubuntu. I've done some research on this in the past and I know this information is valuable to the community.
5
votes
3answers
353 views

Is it possible to customize/configure Ubuntu to have Vim-like features?

After using Vim for few years a realised that I can do this faster without the mouse. Is it possible to customise/configure Ubuntu to have Vim-like features?
5
votes
3answers
4k 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 ...
5
votes
2answers
1k views

How to compile Vim with GUI?

I want to learn how to compile vim from the sources, because there are some additions that I want to add, and learn how to deal with this situations, but until now I didn't have success doing it, I ...
5
votes
4answers
6k views

How can I update vim to a newer version than 11.04's repo version (7.3.35)

Ubuntu 11.04 comes with vim 7.3.35 in the repos, and this version has a bug which is preventing me from using the Command-T plugin (the bug is http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614336) ...