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

learn more… | top users | synonyms

8
votes
1answer
119 views
+50

Vim spell punctuation for ⸮

I am finding myself using the point d'irony (⸮) more and more. However, vim spelling does not recognise it as a valid punctuation character. How can I add it to vim so that the spelling works?
3
votes
3answers
173 views

Method for storing/remembering one liner commands

Often when configuring and adjusting unix-based systems I use a lot of one-line commands that are difficult to remember. For example, to determine what version of ntp (the time server) is running, you ...
4
votes
0answers
241 views

Vim Copy to System Clipboard without overwriting the defualt register(")

When I use "+y to copy to the system clipboard, the selected content is copied to the + register as well as the default(") register. How can I ensure that the content is copied only to the + register ...
1
vote
1answer
33 views

Vim - statusline and links

Given this situation: cd ~/temp ln -s /var/lib/alsa alsa cd alsa pwd -> /home/<username>/temp/alsa But if I open some file in the directory output of pwd, the vim statusline gives me: ...
2
votes
1answer
18 views

Reverse global and local marks in vi/vim

How can I reverse the capitalization convention of marks in vi/vim? Normally a lower-case mark like "a" means is local to the current file, but upper case marks like "A" are global to the session. ...
5
votes
3answers
679 views

vim - how can i do a 'change word' using the current paste buffer

I have some text in my paste buffer, e.g. I did a yw (yank word) and now I have 'foo' in my buffer. I now go to the word 'bar' and I want to replace it with my paste buffer. To replace the text ...
0
votes
1answer
15 views

Can I get my iTerm key-combos working in tmux?

I have some shortcut keys defined in iTerm, and I use them for key-mappings in Vim. For example, I map Ctrl-Enter to send a ^[O2P escape code, which I then use to define a Ctrl-Enter key-mapping in ...
0
votes
1answer
23 views

Cursor keys do not jump over tabs in Vim

When I step over a tab with the cursor keys (h and l), the cursor does not jump over the tab, it just goes one space at a time. This is annoying because I am not sure if there is a tab there or ...
6
votes
1answer
52 views

Change inside comments with Vim

Is there a way to change inside of a comment with Vim? I know you can change inside brackets and quotes with i] and i". For example, If you are on a quote you can press, ci"my new textESC And ...
-2
votes
1answer
48 views

Why are there several keys unbound in vim?

There are several keys that are unbound in vi/vim, such as g, q, v and #. Is there a particular reason why these keys are unbound? Can I just use them however I want or will I be breaking certain ...
4
votes
1answer
310 views

Vi: On startup, highlight tags and display tags in a preview window

I am using vi as a note-taking and outlining tool. I am constructing the "tags" file by myself. What I would like to do is that when I open my notes or outline file, vi reads the tags present in this ...
1
vote
0answers
50 views

Terminal colors for Vim Airline and Tmux Tmuxline

When using Vim on its own with Vundle and Airline the theme appears normally: When I have loaded it up in Tmuxline, the theme uses different colors and even Vim looks different: Here's my Tmux ...
1
vote
2answers
31 views

Random colored column?

For whatever reason, the first column is highlighted and I can't figure out why. I have not messed with my vimrc file, nor any zsh options. This column is only highlighted only with, "aliases.zsh", ...
1
vote
1answer
384 views

Configuring Vim with clientserver and clipboard

On OS X I have vim working just fine from homebrew. The default homebrew install compiles vim with these flags. ./configure --prefix=/usr/local --mandir=/usr/local/Cellar/vim/7.4.161/share/man ...
7
votes
2answers
103 views

How do I only undo pasted text in vim?

TL;DR; version - How do I undo text that was pasted in from my OS copy buffer without undoing other text that was typed in since I went into insert mode? Longer description: Put something in your ...
1
vote
2answers
30 views

How to open chapters of Vim user manual in Vim

I opened the Vim user manual with the :h user-manual | only command (to open it in one window) and now I want to enter/open the separate text files. I tried to put my cursor over a section, such as ...
2
votes
3answers
66 views

Find and change certain LaTeX coding in vim, using regular expressions?

How can I change the following LaTeX coding: \cite{1,3-7,9} to \cite{1,3,4,5,6,7,9} in vim? I would prefer to use regular expressions.
2
votes
1answer
24 views

Vim: Exit single character replace mode with <C-C> when using `nnoremap <C-C> <silent> <C-C>`

I've become far too trained to use <C-C> to return to normal mode. I understand there is a difference between <C-C> and <ESC> but that's beside the point of this question. I use the ...
10
votes
4answers
1k views

How can I paste (overwriting) with vim?

In vim I use yy and p all the time to yank and paste lines. However, if I want to replace one line multiple places in the file, I can't use yy p dd p because the dd deletes the line to the clipboard ...
5
votes
2answers
33 views

Color coding html color sequeces in vim

It it possible to setup syntax highlighting in vim so that a html color sequence is colored in that color, e.g. #FF0000 would show up as red. I'd also be ok with it underlining the text that color ...
10
votes
4answers
20k views

How do I quit from Vi?

I started Vi on my Ubuntu machine. However I don't know Vi, and now I can not quit. I see the editor and I can write text, at the bottom line there is a label "recording". How do I quit from Vi?
0
votes
1answer
647 views

How to install vim-gtk in debian wheezy

this is the terminal trace root@wheezy:/home/me# sudo apt-get install vim-gtk Reading package lists... Done Building dependency tree Reading state information... Done ...
-2
votes
0answers
22 views

vim switches split afer entering/leaving a folder

I'm using vim as a browser/navigator (e.g., with :e ./). Now, when I enter/leave a folder (e.g. with -), vim switches to another split. This does not occur always, but often enough to irritate me ...
1
vote
2answers
31 views

How can I replace ^I into tab spaces in vim editor for .java file?

When I open my .java file in vim, I could see a couple of lines prefixed with one / more ^I characters. It looks like tabs in Eclipse that has got converted into ^I. I would like to replace a single ...
1
vote
1answer
37 views

Vim delay when using Ctrl+C, but only in SQL files

I'm working on a side project with both JavaScript and SQL source files. When I'm editing the JavaScript, Vim behaves normally. However, when I'm editing the SQL files, there's about a one-second ...
1
vote
1answer
16 views

Using vim-latex with latexmk and evince results in garbled text (GLib-GObject-CRITICAL)

When I compile a latex file in vim with the vim-latex plugin with \ll usinglatexmk, my vim terminal text content gets littered with error messages like the following dispersed through the text: ...
1
vote
2answers
87 views

Vim: join lines by replacing ^M

I have a file which has embedded ^M characters. I wish to join the lines at the ^M character. ie: change this: ^M être, ^M étant, ^M ...
1
vote
0answers
13 views

how to create a v.imrc [duplicate]

I created a macro in vim and stores in key s. example let @s='sample'. I want to write this macro in q.vimrc. How can this possible?. please give a simple sample program.
1
vote
2answers
344 views

How to fix weird vim polluting the terminal behaviour on arrow keys and on delete in insert mode?

My terminal gets polluted by B, C,A,D when I try to navigate within vim using arrow keys and on delete using backspace it only scrolls back without deleting the characters on screen while the ...
1
vote
0answers
32 views

How to make a vimrc? [closed]

I made a macro and stored in key 's' and stored by using like that: :let @s='macro_name' I want to write this macro in q.vimrc (for the use of my collegues). How is this possible?
2
votes
2answers
91 views

How do I change the colour of text matching a regex in vim?

Suppose I want to make all text that matches some regex persistently and automatically (and without affecting / searches) appear in a different color. How would I do this in vim 7.4?
1
vote
1answer
308 views

Vim colorscheme background not filling terminal

I am using vim with lxterminal, and the colorscheme kolor, and I am experiencing an issue where vim's background color does not fill the entire terminal. It can be seen clearly at the bottom of ...
0
votes
2answers
35 views

Skip search and replace after a heading in Vim

I have to replace a pattern, but I don't want to replace it after a particular word. This is my program: :vnoremap ::silent! call Bib() function! Bib() %s/\s*\n*{\\&}\s*\n*/ /g ...
3
votes
2answers
585 views

How to enable vim addon packages?

I have installed vim-nox as well as vim-latexsuite and vim-outliner on Ubuntu 12.10. There's nothing wrong with Vim but neither of the add-on packages does anything. What do I have to do to in order ...
6
votes
5answers
2k views

Indent several lines with VIM?

For eample, I'm editing this code: <html> <body> <script> var a = 10; a += 100; </script> </body> </html> now I need to indent the script line: ...
1
vote
2answers
65 views

How do I open all files in the current directory and all subdirectories using vim?

So far I've been using vim */** which seems to open all files in subdirectories but not those in the current directory, and vim * which opens all files in the current directory. But how do I open all ...
2
votes
1answer
119 views

How to reload a file in vim?

Various editors like gedit detect if the file is changed and asks to reload it. Sometimes in vim when I got many files to edit, I sometimes end up opening same file in different tabs for quick look ...
1
vote
2answers
30 views

refresh changed content of file opened in vi(m)

I have a config-file that I keep open in vim, but that sometimes gets changed on disk, without these changes being reflected on the terminal. Can I refresh the content on the screen without closing ...
1
vote
1answer
30 views

Can you further integrate and present sequential moreutils vipe command output in vim using successive splits etc?

I have used the moreutils suite a few times and I find it makes you think further about base utilities and is insightful(and fun). For instance, vipe allows running an editor - like vim - in the ...
3
votes
2answers
33 views

Keymaping for re-indent source code in Vim

I have key mapping in my ~/.vimrc file that re-indents edited source code on the fly. It looks like as follows: " press F4 to fix indentation in whole file; overwrites marker 'q' position noremap ...
6
votes
4answers
5k views

Auto indent / format code for Vim?

I'm trying to use Vim more and more when I can. One of my biggest grip between Vim and an IDE like Aptana is the ability to auto indent. Is there a means of auto formatting code (HTML, CSS, PHP) so ...
1
vote
2answers
29 views

Specifying height for vertical splits in vim

Usually I am editing two files, A and B, split horizontally. I set it up, so that one buffer would only occupy the first 2 lines at the top of the screen, and the rest is for the other buffer. ...
25
votes
5answers
3k views

Why does `ESC` move the cursor back in vim?

In vim, when I hit ESC to return to command mode, the cursor moves one character to the left. This is not what I would hope for, occasional I immediately hit l to move back to that spot, perhaps to ...
11
votes
4answers
554 views

How am I supposed to edit files on a network with Vim?

Currently I'm doing it by SSHing into a server, and executing Vim on the server. This has the benefit of not having to deal with cumbersome syntax of opening files from a remote server over SCP, and, ...
1
vote
1answer
724 views

vim install on freebsd has taken 5 hours and counting

Ok, so installed portmaster and I'm trying with it, I'm hoping it won't take time. So I've been up all night and my vim installation is still going on. I have an amazon ec2 freebsd server setup. I ...
5
votes
0answers
163 views

Bash inside Vim not working properly

In MacVim I'm using Conque to run bash commands inside Vim. I have a problem with the text navigation while using Conque. If I'm at the end of a line of text and press down Alt← I skip a word to the ...
8
votes
4answers
2k views

How do I make Vim behave like “tail -f”?

I would like to know if there is a way to make Vim behave like tail -f. Even the best Vim plugin I've found so far doesn't do what I expect. I really want to see the file update in real-time. Even ...
1
vote
1answer
73 views

Show status lines of vim and tmux on the same line

I would like to figure out a way to get my vim statusline and tmux statusline on the same line if such a thing is possible and not immensely difficult (ideally, the vim prompt, or whatever it's called ...
3
votes
1answer
139 views

VIM as c++ IDE - autocomplete

I'm still learning C++, but I know already some stuff. I used to use Visual Studio, but after I switched to Debian, I was working with Code Blocks. Recently I heard about using VIM as IDE and started ...
6
votes
1answer
83 views

Can I specify the layout of a vsplit command?

When I do the :vsplit command, it always opens the new file on the left side of the screen. Is there a way I can specify I want the new file to open to the right?