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

1
vote
2answers
18 views

Compile a LaTeX file from Vim and not from terminal

I am compiling my LaTeX files from terminal and it gets a little annoying to go every time in terminal and use: xelatex "file-path" Is there a way to do this from inside Vim?
1
vote
2answers
99 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?
1
vote
2answers
40 views

Open an existing file in Vim

I would like to open a file that already exists while already in Vim. What is the command to do this?
0
votes
1answer
13 views

Install colortheme in Vim

I am a new user of Linux Ubuntu and I am trying to copy and paste a colortheme in Vim's folder color but it seems to be owned by root and I can't paste it in there. What can I do?
1
vote
2answers
65 views

Replace a specific section of code

I don't know what could do this, sed, vim, whatever. Lets say I have 30 functions, to keep it simple, i'll show 3 #first function AddOne = [ a+1==b, b+1==c ] # second function ...
1
vote
1answer
35 views

How do I set gvim as default application? [duplicate]

I compiled and installed vim 7.4 in Ubuntu 12.04. I want to set gvim as the default application for all text and C/C++ files. I tried : Right click > Open With Other Application. But couldn't find ...
1
vote
3answers
54 views

Deleting 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 ...
4
votes
1answer
63 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 ...
1
vote
1answer
80 views

Window contents corrupt when scrolling in Chrome and vim/gvim

I am running 14.04 as a guest on a Win8.1 host (over VirtualBox 4.3.17), 3D acceleration is enabled. Since upgrading from 12.10 I have noticed that text/content will sometimes corrupt when I scroll a ...
0
votes
1answer
32 views

View .deb package files in vim

vim is capable of reading compressed files (for common methods, at least). However, it sees Debian package files as binary gibberish. The Archive Manager tool can, however, open package files and show ...
0
votes
1answer
54 views

vim NERDTree | Auto fresh the directory pane

How can you auto refresh the directory panes automatically in vim NERDTree? I know you can press R to refresh manually but I want to have it refresh automatically. This is particularly helpful when ...
1
vote
0answers
48 views

key word remap enter carriage return vim command line

In my .vimrc file I have :imap ii <CR> which allows me to hit ii for enter/carriage return in vim but now i would like to set that same configuration in my .inputrc so that i can just hit ...
2
votes
1answer
57 views

Is there a PPA for gvim > 7.4.338?

The breakindent feature is the greatest thing ever, but it's in 7.4.338. The latest version in the Ubuntu repos is just 7.4, I think. I notice Arch has a package for it, but I can't seem to find one ...
0
votes
1answer
57 views

Why won't Vim source my .vimrc at startup?

I have modified my ~/.vimrc significantly (although some of my initial modifications I made in the system-wide /etc/vim/vimrc). It probably doesn't matter either way since I am really the only user ...
-1
votes
1answer
34 views

how to search tags not matching pattern

In my xml file, i have many location tags. eg: ...
0
votes
1answer
116 views

Why do I get these .vimrc errors in Ubuntu 14 after upgrade from Ubuntu 13?

I get errors for all these commands when I try to use vim (though vim then works): autocmd BufWritePre *.rb :%s/\s\+$//e set filetype off filetype plugin on filetype indent on syntax on " Turn on ...
1
vote
0answers
164 views

vi issue in SSH TTYs to Ubuntu 14.04.1 LTS

After upgrading my server to Ubuntu 14.04.1 LTS, I can no longer use the vi editor to edit anything in an SSH terminal (I access the server by launching ssh sessions from Cygwin running on Windows). ...
7
votes
4answers
620 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 ...
1
vote
1answer
151 views

Uninstalled vim, now can't install it again

I have removeded vim-tiny to get full installation following this tutorial and now I can't install vim by: $ sudo apt-get install vim Reading package lists... Done Building dependency tree ...
1
vote
2answers
36 views

how does ! effect sort in vim

I am trying to sort the contents in my text file using the command :1,$sort This results in lines arranged in order based on the starting character - symbols, capital letters and then small letters ...
3
votes
2answers
60 views

Is it possible to edit Textboxes in a browser using VIM or a VIM-Style-Editor?

Is it possible to edit Textboxes in a browser using VIM or a VIM-Style-Editor? (On Ubuntu of course)
3
votes
1answer
107 views

how to re-use last vi command

How does one re-use a just-executed command in vim? For example, I open a file with: vi myTestFile Then in normal mode, I search for a word using: /mysearchword\c <Enter> Now I want to ...
0
votes
0answers
41 views

Console Mode VIM 256 Color Support

This question is about using the console mode (i.e. ctrl+alt+f1) and not about using a terminal emulator. When running from a terminal emulator, my VIM uses 256 colors without a problem. I've tried a ...
3
votes
1answer
197 views

vim command does not work

I am trying to open vim on my Ubuntu 14.04 64 bit by entering the command in the terminal : vim But i get the response : The program 'vim' can be found in the following packages: * vim * ...
3
votes
2answers
125 views

Switch off search highlighting in gVim

When I do search in gVim (package gnome-vim), the search results are highlighted. How can I turn-off this highlighting when I don't need it any longer? Now it looks like persistent.
3
votes
1answer
64 views

Vim-LaTeX runs evince instead of xdvi

I have installed the Vim-LaTeX plugin, which is great for editing LaTeX documents in Vim. However, I have one problem with viewing the output file. The tutorial says to use the \lv command. However, ...
1
vote
1answer
98 views

Gnome-terminal vim gruvbox [closed]

Just installed gruvbox color scheme for Vim on Ubuntu, but the color scheme is not fully supported in the terminal. It works fine on a fedora box. Do I need any additional settings?
2
votes
1answer
71 views

Vim No GUI and clipboard

I have Gnome Ubuntu 14.04 and I reinstalled vim (without GUI, I did not enable gui because I don't think I need it) and replaced netrw with the latest to have :Lexplorer. Now when I use vim's File ...
0
votes
1answer
249 views

Need good example of .vimrc file [closed]

I wanted to start using Vim, and need to create .vimrc configuration file for it. Where can I find some ready to use, good quality examples with described every option?
-1
votes
1answer
175 views

Vundle - Plugins installed but not loading

I've installed vundle on my ubuntu box but when I load vim none of the plugins load. My .vimrc from my home directory [some commented lines edited out]: runtime! debian.vim set nocompatible ...
1
vote
1answer
44 views

Pair Programming in Ubuntu SDK?

How do you do collaborative code editing, aka pair programming, in the Ubuntu SDK? I heard you can do this in Vim, and I wonder if the Vim functionality in QtCreator makes this possible.
0
votes
1answer
28 views

make the line bold or highlight on find command on vim

I know by /foo you can find and go on foo. So what I am looking for is highlighting that line. I mean when vim find foo and the courser points to foo, also highlight that line which include foo.
1
vote
1answer
25 views

Navigate vim help with CTRL-]

I am using Ubuntu 14.04 with default settings for shell. When I use gnome-terminal to open vim help, it does not work when I hit CTRL-] when being on a tag (note that this works with tty1). Vim help ...
3
votes
0answers
69 views

How to transform Vim configuration into Emacs one?

I need to setup Emacs editor by preparing the ~/.emacs configuration file. I have been using Vim for years and now I want to switch to Emacs for various reasons that are out of scope of this post. To ...
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.
1
vote
2answers
813 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
2answers
51 views

Why is vim's colorscheme not coloring the entire window?

Only the portions of the terminal with text on it is colored. Not sure how to describe it, please see the attached screenshot.
0
votes
1answer
32 views

go back to vim's default color

I read this :highlight Normal ctermfg=grey ctermbg=darkblue from http://stackoverflow.com/questions/1117526/setting-the-vim-background-colors But I change the darkblue to white!! What I done? OMG? ...
4
votes
3answers
209 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 ...
2
votes
1answer
122 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 ...
0
votes
2answers
55 views

go on the line where a variable define on any editor

Is there any add-on or ability on geany or any known linux editor for this purpose : when you click on one variable . The mouse coursor goes to when it initialize. My code is c language. what I am ...
0
votes
1answer
244 views

Trying to map <Ctrl>+<hjkl> to <Left Down Up Right> globally (Vim-like arrow keys) with xmodmap

I am trying to map Ctrl+H,J,K,L to arrow keys Left,Down,Up,Right, respectively, on Ubuntu OS (globally, not inside Vim). I've attempted the solution posted here, but the modifier commands are not ...
1
vote
2answers
97 views

Unable to run shell script inside VI/VIM

I am trying to run a shell-script say test from vim #!/bin/sh echo good morning Now when I am using :!% I am getting a pop like shell returned 1 Press ENTER or type command to continue instead ...
0
votes
1answer
100 views

Can't start gvim from the launcher

I don't know why I've been having so many problems with gvim lately, but now I can't start it from the launcher. I click on it, and it glows and pulsates for awhile, but after a few seconds it stops ...
0
votes
1answer
51 views

Gvim doesn't show up in the nautilus context menu for .c and .h files

Most of the time I can browse the file system with the file browser, right-click on a file and top item in the menu "Open with Gvim", but when I right-click on a .c or .h file, it says "Open with ...
2
votes
3answers
53 views

Resuming a vim session I have accidentally Disconnected from

I came across an unusual problem today, I was using vim, had created a new alias in bash, and wanted to try it out. so I ctrl-z, exec bash (I do this because I don't like nesting it with bash. and my ...
0
votes
1answer
21 views

Color code of s file in vim

I am writing a .s file in vim. When the string '8d' is written, it is coloured in yellow. Why? Does '8d' have any particular meaning in machine code?
2
votes
0answers
67 views

How to disable Lazy Preempt in kernel

I'm relatively new to Linux and working on getting a real-time kernel up and running for robot applications. I'm on Ubuntu 14.04, using kernel 3.14.3 and the 3.14.3-rt5 real-time patch. Also using ...
2
votes
1answer
643 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) ...
2
votes
1answer
234 views

Why is my vimtutor blank?

I want to learn Vim. The vast majority of people advise me to use vimtutor. I downloaded the package and ran it, but I just get given a blank screen. I see on Youtube that there should be tons of ...