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.

504 questions
121
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,130
  • 2
  • 27
  • 27
121
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
  • 2,984
  • 4
  • 27
  • 30
108
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,722
  • 3
  • 14
  • 13
105
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,192
  • 5
  • 42
  • 52
99
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,519
  • 1
  • 12
  • 18
82
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,145
  • 12
  • 52
  • 62
76
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
  • 917
  • 1
  • 9
  • 13
72
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
  • 883
  • 1
  • 7
  • 10
66
votes
7 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,607
  • 4
  • 18
  • 23
65
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,711
  • 3
  • 31
  • 30
63
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,167
  • 3
  • 14
  • 9
55
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?
Pierre-Antoine LaFayette
  • 1,097
  • 1
  • 10
  • 16
51
votes
5 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,329
  • 12
  • 35
  • 41
42
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…
30
votes
1 answer

Can't run Vimdiff (7.4) on Windows 7

I recently installed the 7.4 version of gVim on a Windows 7 machine. Trying to diff two files from the context-sensitive menu on Windows Explorer, I keep getting the error messages: E810: Cannot read or write temp files E97: Cannot create…
ysap
  • 2,620
  • 12
  • 50
  • 74
1
2 3
33 34