Questions tagged [vimrc]

Vim reads initialization commands from a file called vimrc on startup. This can be used to set settings, define functions, execute autocommands, and more.

Filter by
Sorted by
Tagged with
3 votes
0 answers
157 views

How can I work around the inability to save macros in ViEmu? [closed]

I would like to be able to save my ViEmu macros between sessions of Visual Studio 2013. This feature was requested in 2010 and apparently almost made the cut for ViEmu 2.5: I was wondering if ...
Andrew's user avatar
  • 131
13 votes
9 answers
33k views

Colorscheme's background not correct in terminal

I imported the solarized colorscheme and palette. My terminal has the correct colors and background, gvim has the correct colors and background, but vim has an incorrectly colored background. The text ...
Oberdiear's user avatar
  • 191
111 votes
8 answers
35k views

How do I debug my vimrc file?

I have a problem in Vim, and I think it may be in my vimrc file (or have been told it could be my vimrc file). How do I verify this? If it is my vimrc file, how do I know where exactly the problem ...
Martin Tournoij's user avatar
4 votes
2 answers
3k views

How can I get vim to not auto-wrap pasted text? [duplicate]

I am pasting several lines of text into vim at once (from another application, so I am using the OS's copy and paste and insert mode in vim). The longest of these lines is below: " :PluginClean -...
Greg's user avatar
  • 857
13 votes
1 answer
3k views

Why does the order of :set bg=dark and :set bg=light matter?

While trying to match up my terminal's colour palette and GVim's I noticed this: When I open GVim and Vim, I see: (That's the same file, my vimrc.) If I do :set t_Co=256, nothing happens in GVim (...
muru's user avatar
  • 24.9k
12 votes
1 answer
360 views

Prevent Vim from recording events for certain filetypes

To add to this stackoverflow question, what should one put in their .vimrc to ensure 'private editing' of certain file extensions (e.g. .gpg files). Without compromising the effectiveness of the ...
jyalim's user avatar
  • 531
3 votes
2 answers
327 views

Quickfix window not displaying stderr messages?

After running :make, the quickfix window displays the compile command and other stdout messages from the makefile, but it doesn't display any errors. Everything but stderr messages are displaying. How ...
CharlesL's user avatar
  • 631
2 votes
1 answer
1k views

How can I have (g)vim start in insert mode by default (when opening a .txt file)? [duplicate]

I often just need to create a notes.txt file in Windows to just quickly paste some text from some other place, save it from the gvim UI, and close the file. I want to be able to perform this operation ...
John Sonderson's user avatar
31 votes
3 answers
10k views

How can I redefine plugin key mappings?

I have installed a plugin that doesn't provide a mechanism to disable the key mappings it defines. I want to redefine one of the mappings (<leader>cc) defined by the plugin for my own pursope, I'...
toro2k's user avatar
  • 4,902
12 votes
7 answers
13k views

How can I copy/paste new text without auto-indentation at every new line?

How I paste now: Right-click/Copy or simply highlight. Right-click/Paste or Middle Click or CTRL+SHFT+V Indents appear at increasing intervals: 0, 2, 4, 6, + Question at hand: From prior research, ...
user avatar
5 votes
1 answer
5k views

Set an option dependent on the filetype [duplicate]

How to configure on the .vimrc file to use a particular set options for a particular filetype, but others for a different filetype? For example, I want to enable expand tab (set tabs to be spaces) ...
Khelben's user avatar
  • 3,187
21 votes
2 answers
4k views

How to define a custom popup / menu in vimrc?

Assigning every useful function to a key works well for frequently used tools, but there are some operations I use so rarely, that I would prefer to assign them to some popup menu defined in my vimrc. ...
ideasman42's user avatar
  • 3,733
7 votes
1 answer
1k views

Sharing vimrc options in different computers [closed]

Can I easily keep my vimrc files consistent across multiple computers? I have different computers (laptop, desktop home and desktop work) and I want to keep my Vim configuration consistent, ...
Khelben's user avatar
  • 3,187
26 votes
5 answers
2k views

GitHub for .vimrc and plugins

I know many people store their .vimrc on GitHub to make it easier to get right to work on new machines, and that makes complete sense to me. Including plugins, however, is problematic, because the ...
Tom's user avatar
  • 1,240
44 votes
1 answer
26k views

Why do I need both a vimrc and a gvimrc?

There seems to be two ways to store preferences specific to gvim: Keep an .vimrc file for vim and a .gvimrc file for gvim specific additions. Keep all settings in .vimrc and wrap gvim specific ...
Caleb's user avatar
  • 2,245
4 votes
1 answer
86 views

How do I get rid of <filename>.project.vim files?

It seems like any time I edit a file with gvim it creates a litany of files I don't want or seem to need. I understand the <filename>.~ files are backups of the file before I started editing and ...
Caleb's user avatar
  • 2,245
13 votes
3 answers
455 views

UI to personalize a vimrc without writing one from scratch

Vim is so infinitely configurable. However, devising a vimrc is a daunting task for novices and intermediate users. Basically, you're expected to develop one from a blank slate by reading the ...
200_success's user avatar
  • 9,559
18 votes
2 answers
1k views

How do I make Vim use a default filename when not given any filenames?

I rarely, if ever, just open vim without filenames. Often enough, I want to test something out, usually a quick throwaway script, and I usually name them test.sh (or some variant thereof, like test.py)...
muru's user avatar
  • 24.9k
15 votes
2 answers
9k views

How can I modify Vim to work with a different keyboard layout?

I type with a non-QWERTY keyboard layout. Many of the keys Vim uses are now on the home row, but some key bindings just don't work, the most obvious one being the hjkl keys. How and where can I ...
Earthliŋ's user avatar
  • 313
104 votes
2 answers
87k views

What is the purpose of swap files?

When I edit files, Vim tends to create files named .filename.swp, which I find annoying. From vim -h, I see that the -n option suppresses the creation of swap files. Is there a vimrc directive that ...
200_success's user avatar
  • 9,559
11 votes
2 answers
452 views

Is it possible to use vim's clientserver functionality to keep settings synchronized?

I usually have multiple instances of vim running on the same machine. When I make a change to my vimrc I can just :source ~/.vimrc (with an easy mapping or an autocmd). But in order to have all ...
xthrd's user avatar
  • 5,320
40 votes
6 answers
4k views

Applying settings to a directory tree only

At my work we use a standard ts of 2; my personal preference is 4, which is what I use for my hobby projects, and this other project we inherited has the convention of ts=8. There are also some other ...
Martin Tournoij's user avatar
60 votes
3 answers
11k views

How do I reload my vimrc without leaving Vim?

When I do a change in my .vimrc, I usually exit Vim and open it again. Is there an easier way to reload the new .vimrc changes?
thameera's user avatar
  • 17.5k

1
33 34 35 36
37