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
12 votes
1 answer
305 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 ...
user avatar
  • 491
3 votes
2 answers
297 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 ...
user avatar
  • 611
2 votes
1 answer
996 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 ...
user avatar
31 votes
3 answers
9k 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'...
user avatar
  • 4,512
11 votes
7 answers
9k 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
4k 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) ...
user avatar
  • 2,707
19 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. ...
user avatar
  • 3,413
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, ...
user avatar
  • 2,707
25 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 ...
user avatar
  • 1,210
42 votes
1 answer
24k 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 ...
user avatar
  • 2,135
5 votes
1 answer
82 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 ...
user avatar
  • 2,135
12 votes
3 answers
436 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 ...
user avatar
  • 8,819
18 votes
2 answers
992 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)...
user avatar
  • 23.9k
15 votes
2 answers
6k 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 ...
user avatar
  • 313
102 votes
2 answers
77k 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 ...
user avatar
  • 8,819
11 votes
2 answers
394 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 ...
user avatar
  • 4,730
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 ...
user avatar
58 votes
3 answers
9k 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?
user avatar
  • 15.7k

1
30 31 32 33
34