Questions tagged [gvim]

All about the VIM editor in one of its graphical incarnations.

gVim is the graphical version of the editor. It is available on Windows, OS X, Linux, OS/2, Amiga, and many other operating systems.

506 questions
134
votes
4 answers

How to setup a line length marker in vim/gvim?

Some GUI text editors have a vertical line which serves as line length marker (it helps keeping lines shorter than 80 chars in source code files). Is is possible to have something similar in vim/gvim? I know about ruler vim option, but it is not…
vtest
  • 5,358
124
votes
4 answers

How to get vim to open multiple files into tabs at once

Is it possible to get vim to open multiple files into tabs, similar to the way the args command will open multiple files into buffers? Doing something like :tabe ./* results in the error "E77: Too many file names", even though the number of…
Ash
  • 3,064
  • 4
  • 30
  • 31
113
votes
1 answer

How to make Vim spellcheck remember a new word

I'm using gVim for LaTeX editing. I write lots of scientific documents with words that the vim dictionary does not know. When running through spell checking I come across words that I know are spelled correctly, how do I add those words to the…
Andrew Redd
  • 1,772
107
votes
3 answers

How do I find the encoding of the current buffer in vim?

Say I am editing some file with vim (or gvim). I have no idea about the file's encoding and I want to know whether it is in UTF-8 or ISO-8859-1 or whatever? Can I somehow tell vim to show me what encoding is used?
innaM
  • 10,412
102
votes
9 answers

How can I get (g)Vim to display the character count of the current file?

I like to write tutorials and articles for a programming forum I frequent. This forum has a character limit per post. I've used Notepad++ in the past to write posts and it keeps a live character count in the status bar. I'm starting to use gVim…
OwenP
  • 1,559
84
votes
11 answers

Vim: How to synchronize NERDTree with current opened tab file path?

When I open a new tab with different path from the previous file in VIM, NERDTree will still remains the same directory hierarchy of the previous file. Is there a sync shortcut to change the current root directory to the new opened file's directory?
Jichao
  • 7,940
77
votes
10 answers

How to remove this symbol "^@" with vim?

I have some files that are corrupted with this symbol: ^@ It's not part of the string; it's not searchable. How do I substitute this symbol with nothing, or how do I delete this symbol? Here is an example line from one…
mrt181
  • 955
77
votes
5 answers

Where does VIM (gvim/macvim) keep swap files for unsaved/unnamed buffers?

Where does VIM (gvim/macvim) keep swap files for unsaved/unnamed buffers? (If it does so at all). Background: Throughout a semi intense seminar I was taking notes in an unnamed/unsaved MacVim buffer when the MacBook ran out of juice and powered…
davur
  • 927
70
votes
9 answers

Move cursor to beginning of non-whitespace characters in a line in Vim

In Vim, is there a way to move the cursor to the beginning of non-whitespace characters in a line? For instance, how can I move the cursor to the "S" in the second line below? First line Second line If it matters, I primarily use MacVim, but I'd…
Joe Mornin
  • 1,707
69
votes
3 answers

How do I move around and otherwise rearrange splits in vim?

So far, I've figured out swapping splits laterally via CTRL+W x, and that's pretty much it. How do I move a split anywhere in a viewport that contains multiple vertical and horizontal splits? How do I create a horizontal split that, say, spans the…
hakanensari
  • 2,237
68
votes
4 answers

How to make cut/copy/paste in GVim on Ubuntu work with Ctrl+X,Ctrl+C,Ctrl+V?

By default, the cut/copy/paste short-cuts in GVim on Ubuntu are: Cut "+x Copy "+y Paste "+gP I would like to use control key combos in GVim, like I use in Firefox and othe gnome applications. How do I configure GVim to work like other…
pcapademic
  • 3,821
58
votes
3 answers

Is there a way to move a split page to a new tab in Vim?

I have opened a file in a horizontal or vertical split and which to put it in a new tab instead. Can this be done easily?
55
votes
7 answers

How do I copy command output in vim?

For example, if I type ':pwd' to get the current working directory, I can select the text in gvim but I can't figure out how to copy it to the clipboard. If I try the same in console vim, I can't even select it with the mouse. I would like this to…
Steven
  • 2,399
43
votes
11 answers

How to start gVim maximized?

How to make gVim automatically maximize it's window when I open it? And a cross-plataform solution, I'm trying to use the same configs in a Linux and Windows machine... I've tried the hack :set lines=999 columns=999, it almost works, but the window…
32
votes
6 answers

How can I discard my undo history in vim?

Undo is nice to have in Vim. But sometimes, at a known good point, I want to erase my undo history - to be able to use u to undo individual changes, but only back to a certain point. (For instance, this might be when I last committed.) One way to…
Nathan Long
  • 27,435
1
2 3
33 34