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.

Vim is a configurable text editor most commonly used as a command line application. It is free open-source software in active development, and the full version is available in Ubuntu repositories. A minimal version is installed by default.

Resources:


Helpful question for beginners: http://askubuntu.com/questions/252760/how-do-i-save-files-edited-with-vim

820 questions
281
votes
8 answers

vi shortcut to delete "until the next X character"

I understand that vi has shortcut keys to delete characters, words and lines with various options. However, I could not find this: delete from the cursor to the next specified character For example, I might type du" expecting the editor to…
kctang
  • 2,913
240
votes
7 answers

What is the difference between Vi and Vim?

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 open vi in Ubuntu it opens vim instead.
Ethylene
  • 2,501
226
votes
2 answers

How to change visudo editor from nano to vim?

When I use visudo, it always opens it with nano editor. How to change the editor to vim?
dedunu
  • 9,556
188
votes
5 answers

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 applications and shells in Ubuntu?
171
votes
1 answer

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, e.g.: vim-nox vim-athena vim-* It is not clear which vim package have which dependecies and which one is preferable…
Dilawar
  • 1,811
140
votes
15 answers

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 achieve this? I'm a vim user, unlike the other people…
user8838
133
votes
7 answers

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 files... Vim: Finished. I know that I can open Vim and…
faizal
  • 3,037
123
votes
11 answers

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 remember last read position after closing a file? I…
103
votes
4 answers

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 the file is written.
dan0
  • 1,033
101
votes
5 answers

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-transparent aubergine background color is used. How do I…
David Siegel
  • 9,022
94
votes
7 answers

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 line 18: E319: Sorry, the command is not available…
93
votes
1 answer

What are the differences between vim.basic and vim.tiny?

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) came up asking for an editor, but I noticed that it…
talles
  • 2,065
79
votes
12 answers

How to learn vim on a high level?

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 advanced vim user?
Zango
  • 5,133
71
votes
6 answers

Unable to copy from vim to system clipboard

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: $ vim --version | grep clip +clientserver +clipboard +cmdline_compl…
gc5
  • 1,141
70
votes
13 answers

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 when I run tmux and there run vim - syntax…
dhuCerbin
  • 801
1
2 3
54 55