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

0
votes
0answers
18 views

Blank Screen On Boot

I tried installing LAMP using the following tutorial: http://techlimbo.blogspot.com/2012/11/how-to-install-concrete5-on-ubuntu-1204.html Upon testing if the apache install worked (directing browser ...
0
votes
0answers
15 views

How can I find the directory to clang-format

I use gvim to code and want to use clang-format as a plugin. As I read it is already integrated in vim. I just need to add this line to my .vimrc: map <C-K> :pyf ...
0
votes
0answers
15 views

Can't copy from vim to clipboard inside tmux

I am using vim vim 7.4, tmux 2.1 and ubuntu 14.04. I can yank from vim and copy to clipboard when using vim directly from my terminal with "+y. When I use vim from inside tmux, I can't yank-copy from ...
0
votes
0answers
12 views

Vim copy to clipboard not working

Trying to copy text from vim to clipboard and paste to another application. Vim should support copying to clipboard (:echo has('clipboard') returns 1) I do: in visual mode select required lines type ...
1
vote
1answer
27 views

How to redraw terminal window after wall command displays message

I have a script that will send wall notification to all open terminal sessions when battery gets bellow certain percentage,and will continue doing so every minute until power source is plugged in. ...
3
votes
5answers
448 views

Difference between Nano and Vim [closed]

I have recently started using Ubuntu and hence, the terminal. As text editor, I have used the pre-installed nano. Now I wonder whether I should install and use vim as well. What are each of those ...
0
votes
0answers
15 views

Why does ^[k appear in vim?

Occasionally my fingers will twitch in vim and these characters appear: ^[k (I'm not typing the characters, and they're not part of the text - deleting the line doesn't remove them) What are they ...
0
votes
0answers
28 views

SSH secure shell not working with vim colors

The script: 256colors2.pl when run from putty returns the correct colors, from SSH secure shell nothing happen, it doesn't open, on-screen appears nothing. user@ubuntu:~$ ./256colors2.pl ...
6
votes
2answers
30k views

Vim installation in Ubuntu 14.04

I am unable to install Vim and need help. I've tried the following: root@cbitlab1:/home/cbitlib1# sudo -s root@cbitlab1:/home/cbitlib1# apt-get install vim Reading package lists… Done Building ...
1
vote
1answer
44 views

Open all files in directory in vim

To open several files in separate tabs in vim I need to execute command vim -p file1 file2 I fave directory that contains many files and I would like to open all files with extension c in vim ...
0
votes
1answer
21 views

Text scaling / clipboard issue

I am having some difficulty understanding some issues with dia, perhaps better posted as two questions, however I do get the impression that they are related in gnome somehow; they are as follows: ...
1
vote
0answers
67 views

Bash shell doesn't display Python output

I started using vim + tmux for my programming and suddenly after accidentally smashing couple of keys [Forgive me I am a klutz] the bash shell started acting weirdly. When I run my unittest written ...
6
votes
3answers
17k views

Changing Vim editor settings?

How do I change default settings of Vim editor such as setting auto indent, setting Tab space to 4 and changing text colors? Also how to set vim as the default code editor?
23
votes
5answers
15k 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 ...
1
vote
2answers
566 views

Browse files with vim in terminal

Is there any way to open file with vim in the terminal without typing file name, but for example then I see in the directory my file, go with arrow keys or something like that? I think I saw one of ...
3
votes
1answer
3k views

Can I open two or more files in vim at once?

I have a file with the name First.txt, which I opened that by vim. Now I want to go another file which its name is Second.txt . How to open Second.txt while I do not close First.txt. How to switch ...
1
vote
1answer
382 views

I want to install vim with ruby support on Ubuntu 15.04 vivid vervet

I have installed Ubuntu 15.04 and am trying to set up my Ruby on Rails environment to program. I use vim as the IDE and it comes pre-installed without ruby support: vim --version | grep -i ruby ...
6
votes
3answers
5k 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 ...
0
votes
2answers
34 views

What does % and ! mean in Vim commands?

In Vim, :%!ls executes ls command and prints its output to the current editable file. But what do % and ! mean separately in vim? Is it possible execute ls and not put its output to document?
4
votes
2answers
1k views

running python in vim

I have tried Googling but I couldn't find anything relevant. Is it possible to program in Python on VIM and do something like :!iPython to have Python execute the code? Last time I tried that, ...
1
vote
1answer
189 views

How do I set line number in VI Editor [duplicate]

I am using the VI editor in Ubuntu and I have maximum usage of VI editor. to see the line number in vi i am using like below: :set nu I want to set it default when I open a file in vi editor, that ...
4
votes
0answers
65 views

How can I change the cursor in vim depending if I'm in insert mode or normal mode?

I'm used to working on GVim, but I want to make most of vim+tmux too. Therefore I have decided to switch to vim. But in vim the cursor style does not change depending on the mode. I use zsh and ...
0
votes
1answer
57 views

Vim-LatexSuite: /bin/bash: latex command not found

TeXLive 2015: I installed TeXLive 2015 following the simplest instruction sudo ./install-tl-ubuntu (without any options) of scottkosty/install-tl-ubuntu@GitHub. Vim-Latex-Suite: I installed ...
1
vote
1answer
47 views

Remote SSH command requires a terminal

So for one of my servers, most of what I do is edit files with vim. Is it possible to do something like ssh me@myserver vim ? When I try to do that, I get "Warning, output is not to a terminal", and ...
1
vote
1answer
145 views

Why do vim and less have such similar keybindings?

Do they share code, or is that just a tradition? Are there any other programs with similar keybindings?
3
votes
1answer
56 views

update-alternatives: error: /var/lib/dpkg/alternatives/vim corrupt: invalid status

Whenever I try to install, update, or do anything with apt-get, I always get a error message similar to this, griping about vim: 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. 1 not ...
2
votes
1answer
121 views

How to write comment in .vimrc file?

I'm going through a .vimrc file and there everything is written like this : - " Better copy & paste " When you want to paste large blocks of code into vim, press F2 before you " paste. At the ...
24
votes
3answers
120k 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 ...
0
votes
0answers
26 views

Unable to install vim 1 [duplicate]

The error I get while doing sudo apt-get install vim; I have used sudo apt-get update as well.
3
votes
0answers
28 views

I want to use Ruby built from source, and also use Gvim [duplicate]

vim-gtk and vim-gnome both have libruby1.9.1 as a package dependency (in trusty), which in turn depends on ruby1.9.1 and I fear doing sudo apt-get install vim-gtk will cause commands such as irb and ...
0
votes
1answer
29 views

Vim behavior differences in Server VS Desktop [duplicate]

I work on a number of different server version 10, 12 & 14 and use Vim extensively with only the default options and no special settings. I just deployed a small PC with Ubuntu Desktop 15 and the ...
0
votes
1answer
95 views

How can I print from Vim to pdf?

I would have thought this is rather simple, but I don't get it done: I use gVim and would like to get the text as a pdf-file. In other applications like Firefox the print-dialog shows me available ...
2
votes
3answers
3k views

Vim Syntax Highlighting Question

I have a doubt about vim, I installed the editor on my ubuntu 13.10 and everything is ok. but when I create a file ".txt, or .conf" the highlighting isn't enabled, I put "#" and " but not change ...
1
vote
0answers
49 views

cant locate vim in usr/share or /bin

Wanted to do a clean install of vim as I had messed up the usr/share/vim files quite a bit installing plugins and messing with things there, instead of creating a .vim in my home directory like I ...
12
votes
1answer
7k 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 = ...
3
votes
2answers
104 views

Getting <ctrl> + <backspace> to delete words in gnome-terminal and vim insert mode

It seems like <ctrl> + W deletes backwards one word at a time. That's great, but I'd really really this work with <ctrl> + <backspace> like most other apps. What's the best way to ...
32
votes
5answers
14k 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.
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 ...
1
vote
2answers
110 views

Setup vimrc with solarized color theme

I just started with vim in ubuntu, and have some trouble setting up my .vimrc file. This is what I currently have: "============= Solarized color theme ============= ...
12
votes
5answers
7k 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.
2
votes
3answers
59 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 ...
2
votes
2answers
180 views

VIm: using substitute command

I'm trying to use the substitute command in VIm but don't get the result I excpect: I'm editing an html file, and for example I'd like to replace all "é" characters by the é code (yes it's in ...
1
vote
1answer
32 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 ...
2
votes
2answers
36 views

Why every new file is automatically encoded with ASCII while everything is set to UTF-8?

My system locale is set to UTF-8:US, this is confirmed by running the locale command. But it is very strange that every time I type the vim FILENAME command (the file does not exist, I'm using this ...
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 ...
0
votes
1answer
207 views

Invalid eclipse home when installing Eclim

I am encountering a issue when installing the Eclim. It is not able to detect the location of the Eclipse. At the installation screen, I select the Eclipse home folder, but the Eclim installer has an ...
0
votes
1answer
50 views

Remove the blank space in vi editor created by “set nu” option

I have used vi editor several times on many different machines, but I have never seen such an behavior of set nu option. This is what my vi editor looks after I set the set nu option in .vimrc file ...
4
votes
3answers
811 views

Some of commands are not working in vim

I am just new to vim and i am following these tutorials for vim. But some of my commands are not working in Vim like:-- Capital W. f followed by a character. (To move to next same char.) Can any ...
4
votes
4answers
3k views

How to delete second column in Vim?

I have a tab-delimited file like: name1 verb1 name2 verb2 etc... I want to delete the second column. I tried editing one of these answers, but being not familiar with sed and awk, I ...
5
votes
4answers
3k views

Deleting first column with vim

I have a text file. number 1_1 \t number1_2 \t etc number 2_1 \t number2_2 \t etc I want to remove the first column of this file (corresponding to number1_1, number2_1 etc, ie the numbers before ...