vim (Vi IMproved) is a text editor supporting different editing modes.

learn more… | top users | synonyms

1
vote
0answers
7 views

Installing vim locally on a cluster: can't find syntax

Unfortunately, the school I currently work at has one of the wonkiest, worst-configured clusters I've ever used. And the IT department is totally incompetent and blames the users for basic issues. ...
0
votes
0answers
3 views

Neocomplete conflict with auto line-breaking in vim

I've found a conflict between automatic line breaks in vim and the neocomplete Vundle plugin. When neocomplete is off, then my set textwidth=80 option works correctly in that the a line break is ...
1
vote
3answers
51 views

How to select text with mouse scrolling in vim?

Sometimes I want to copy some content on remote host in vim, which will last for more than 1 page. But when clicked with left-click-button of mouse, and scrolling down, I find I was stuck at the first ...
0
votes
1answer
18 views

Vim auto line-breaking not working as expected (update: problem with neocomplete)

I'm trying to configure vim so that the text breaks automatically at 80 characters. I know the way to do this is with set textwidth=80 However, the lines don't automatically break when I typed ...
6
votes
3answers
725 views

viewing info documentation with vim

I'm trying to use the ManPageView addon to view info documentation within vim. Although I find ManPageView very useful for, well, viewing manpages, its info-reading functionality doesn't seem to work ...
2
votes
0answers
7 views

How can I print from vim using the native KDE print dialogue?

I'm using vim from a terminal emulator, and I'd like to be able to print using KDE's native print dialogue. This would let me select options such as printer, collating, number of copies and pages per ...
12
votes
3answers
9k views

How to get VIM to display 256 colors properly

I'm trying to get 256 color theme files to work with VIM under xterm. This is peaksea how it looks for me: How it should look: I've tried following the tips on the wiki page to no avail. set ...
6
votes
4answers
3k views

Copy-paste for vim is not working when mouse (:set mouse=a) is on?

I was trying to copy paste something from vim to another application and also, from that application to vim using right click with mouse and then copy and paste (or with Ctrl+v and Ctrl+c and also ...
0
votes
0answers
7 views

Syntastic, Vim & Android: get them play well together

I've got a problem configuring my development environment for android. I'm migrating away from Android Studio due to continious issues that I have no desire to solve anymore. I'm a long-time VIM ...
0
votes
2answers
18 views

Is there a sudoedit equivalent for vimdiff?

I'm trying to get into the habit of editing root-owned files with sudoedit, instead of sudo vim. This has a few advantages, one of which is that it uses my user's ~/.vimrc. Is there an equivalent, ...
0
votes
1answer
28 views

Unable to install vim plugins

I am unable to install any vim plugins on nixOS running the command: nix-env -i vimplugin-Syntastic gives these as the last 3 lines of output: output path ...
52
votes
8answers
9k views

Exit vim more quickly

I use Vim mainly for quick edits rather than long work sessions. In that sense, I find the keyboard sequence for quitting especially laborious: Esc, Shift + ;, w, q, Enter. How to quit Vim (possibly ...
0
votes
2answers
37 views

How to weave the words of a string into a block of strings in vim?

Given a string and a block of strings e.g. String: Use three words. Block: This is the first string of another block of strings. This is the second string of another block of strings. This is the ...
1
vote
1answer
34 views

How can I have my .vimrc detect what OS I'm using?

Since I upgraded my Ubuntu to version 14 I've had a lot of problems with sharing my .vimrc file between Ubuntu and OSX. The following commands no longer work and in fact gives errors: set filetype ...
2
votes
2answers
50 views

Vim - Automatically changing the pair of a changed HTML tag

How can I configure Vim so that when I change one member of a matching pair of HTML tags, the other is automatically changed to match? For example: given <span>content</span>, I want to ...
1
vote
0answers
24 views

visual mode/highlighting/selecting text on uzbl?

Is there a way to do a vim-like visual mode to select text with uzbl? Or any way to select text in uzbl with the keyboard? I installed arch-linux recently, and I haven't gotten my touchpad working. ...
1
vote
2answers
32 views

`Delete` key doesn't work on vim insert mode for deleting previously typed content

I opened vim in my iterm2. Firstly, I typed something on insert mode, like Hello At this stage, if I didn't exit from insert mode, delete key works and can delete the whole word if I want. If I ...
0
votes
1answer
20 views

vim: found /var/log or similar

On vim for search an exact word i type /\<port\> in this case it return every occurence of port ,how to found /var/adm or /var/log entries? I have tried /\<\/var/\adm/> but no ...
0
votes
0answers
23 views

How to generete allegro5 tags for vim with ctags?

I was recently working on project with GTK2 in vim (with OmniCppComplete plugin). so I generated tags with ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --sort=yes /usr/include/gkt-2.0/ I did so ...
2
votes
2answers
37 views

Set default permissions by file type (at least in Vim) [duplicate]

When I create a new script, I always have to manually add executable permissions with chmod +x foo.sh. My default permissions are set to 644, and but I'd like any file with extensions like .sh .py to ...
9
votes
3answers
433 views

How to `locate` multiple files and open them in vim?

Suppose that I have a file named filename123.txt and it is the single file that is named so, and I can locate it with the command locate filename123. And it returns only this file. Now I want to open ...
2
votes
4answers
2k views

Is it possible to execute a VIM script in a non-interactive mode?

The Gnats bug tracker has a command (edit-pr) that opens a ticket in $EDITOR. My $EDITOR is VIM, and when this command opens the ticket in $EDITOR, I'd like to automatically perform some scripted ...
5
votes
2answers
694 views

VIM jump from one xml tag to the closing one

Is there a shortcut to jump from , e.g <XX> to </XX> ? I already give it a try with '%' , but it doesn't work for this situation.
14
votes
3answers
2k views

How different is Elvis from Vim?

I've been using Slackware for a while now, which ships with Elvis as its default editor. Most other Linux distributions seem to ship with Vim, instead of Elvis. Having gotten quite used to Elvis, ...
2
votes
1answer
31 views

Yank all function declarations

Something I often have to do is make sure I have prototypes for all my functions in my C code at the top of file. What would be a way to quickly select all the function declarations in a .c file using ...
0
votes
1answer
51 views

Run a Vim command from a bash script

This is related to a question I asked earlier but I would like to keep it separate in case anyone else can find use in it. I have a command that I am running on a file called dummy.out from the ...
2
votes
2answers
56 views

Bash Scripting VIM commands

I have a few files that I have an annoyingly repetitive group of VIM commands to apply to. They are basic VIM commands just to delete some lines which are not supported by the process I need the files ...
1
vote
1answer
29 views

What does >… mean in vim and how to substitute a single whitespace for it?

I know that when :set list is used whitespace is shown as .. But what does it mean when a whitespace symbol is preceded by >, e.g. >., >.., or >...? And how do I remove it and leave only ...
1
vote
1answer
44 views

My terminal is pure white // removal of the things spf13 has done to my Ubuntu

I have installed spf13 by using the command: curl http://j.mp/spf13-vim3 -L -o - | sh I didn't liked what I got, so I tried to get rid of it. I managed to get to my previous VIM configuration, but ...
0
votes
1answer
15 views

vim color changing between | |

I'm editing some rst files. In the math section, the color changes between | |. Why is this so? How can I change my rst.vim file to not change color between | |? Thank you in advance.
2
votes
1answer
34 views

Is it possible to make VIM emphasize found text?

As vim wiki's stated we can look up strings by using *. But by default, looked up string is not being emphasized. Is it possible to configure vim that the strings will be emphasized when looked up ...
10
votes
5answers
501 views

vim: hide first n letters of all lines in a file

I am analyzing log file using vim and the format looks like this YYYY-MM-DD HH:MM:SS.USEC PID Name LogText Since Most of the times I don't care about date and time. I want to hide them and just ...
1
vote
2answers
64 views

How can I invoke vi instead of vim [duplicate]

I want to use vi for better pasting. When I use vi I get vim When I type /usr/bin/vi I still get vim This is on my Max OSX 10.10 Yosemite
2
votes
2answers
268 views

tmux vim colorscheme background is not showing

I have installed tmux but now text mode vim colorschemes do not fill the background colour properly. Here is how it looks with colorscheme xoria256 in the normal Ubuntu 14.10 terminal: And here ...
2
votes
1answer
463 views

vim: hide status line in the bottom

Sometimes I work with really small terminal windows and need every piece of space available. So I want to hide the vim status line. I already set laststatus=0 this hides one of the status lines. But ...
2
votes
4answers
71 views

Substitute all occurrences of pattern with first matched group

I have to go from this: text match$something_here and match$xxx blablabla text match$something_else_here and match$xxx blablabla ... to this: text match$something_here and match$something_here ...
0
votes
0answers
19 views

Open an existing file in another tab/window while using gvim --remote-tab filename in one vim file.(Using Vim plugin script))

I am writing a vim plugin which maps a key to the function which opens and highlights the text in another file with the same text (if present) at the current cursor position in the current file. But ...
8
votes
4answers
13k views

What causes swap files to be created?

As part of the program I wrote, I constantly read and write data from files. I noticed that as part of doing so, I am inadvertently creating swap .swp files. What do you think is going on? What would ...
4
votes
5answers
2k views

vi shows as vim

When I type vi into a terminal it shows the following display: Note that it says vim not vi, I'm sure I haven't downloaded vim yet and that this is actually vi not vim: for example the arrow keys ...
1
vote
4answers
47 views

Search and replace two words with ex command

I want to search and replace 2 words with 2 other words with one g/.../s/.../.../g command. For example to replace word 'car' with 'truck' and 'cat' with 'dog' with one ex command in Vim.
1
vote
1answer
21 views

some POSIX Bracket Expressions not working

For example when I'm trying to find and replace something using g/[:digit:]/s/1/2/g Vim showing error: Pattern not found: [:digit:], while the string contains digits. Following POSIX Bracket ...
4
votes
2answers
4k views

Vim Error E138: Can't write viminfo file $HOME/.viminfo!

I'm afraid I've run into something rather strange. When I open a file normally, vim README.txt, everything is fine. But upon sudo vim README.txt, the file renders blank, and gives me a E138: Can't ...
0
votes
0answers
25 views

Set Environment Variable for Ranger File Manager

I've recently stumbled across ranger file manager and immediately took a liking to it. However, there is still a problem I couldn't figure out the solution to: How is it possible to change environment ...
0
votes
1answer
22 views

Using options with :tabe in vim

I have a file open in Vim. I'd like to open another file in a tab, using the :tabe command. However, I'd also like to open this file with the -M option, in order to avoid modification and writing of ...
1
vote
3answers
74 views

Vim syntax highlighting fails with autosession

Since I've installed this VIM autosession manager (which does its job) syntax highlighting gets killed on the first buffer change after starting vim. I can restore it with :syntax on but I ...
0
votes
1answer
88 views

vim - “Press ENTER or type command to continue” right after loading only?

Recently my vim has developed the habit of displaying Press ENTER or type command to continue the first time I do certain things right after I open it. For example, if I'm at my shell prompt and type ...
24
votes
6answers
2k views

Why is it risky to give sudo vim access to ordinary users?

I'd like to create a new user and give him sudo access. To be specific, I want him to use sudo vim and edit httpd.conf. I wrote this in sudoers: user ALL=(ALL) /usr/bin/vim ...
16
votes
3answers
7k views

tmux, TERM and 256 colours support

Introduction My question arises from the necessity of understanding why I have now (after multiple trials) Terminal and tmux supporting 256 colours and tput colors telling me there are only 8 of ...
2
votes
0answers
17 views

Problem using Ctrl+Arrow keys in Vim when using Byobu with tmux

In Vim, I had set the Ctrl+Arrow keys to skip words. This works just fine when running Vim inside the gnome-terminal. However, when using byobu (tmux), it shows weird behavior : it deletes ...
2
votes
1answer
31 views

Disable or remove default vim keybinding

Is there a way to disable or remove a default vim keybinding? For example, if I wanted <S-k> (shift-k) to do nothing, how would I achieve this?