Vim's configuration file.

learn more… | top users | synonyms

0
votes
1answer
92 views

Map keys in Vim

I want to map e to mean end of line. I tried the following mapping in my vimrc: map $ e $ is the default end of line command. However, this doesn't work. I'm wondering what the problem is. ...
1
vote
1answer
174 views

How do I use inoremap with multiple characters?

I am new to ViM customization. I am almost done getting autocompletion to work as I would like. Here is the line of interest: inoremap <expr> i (pumvisible() ? '' : 'i<C-n>') . ...
3
votes
1answer
656 views

Difference between user complete and omni complete in vim

I'm using neocomplcache in Vim 7.3. When entering some code I'd expect it to suggest completions based on the class of the variable: $db = new MembersDatabase(); $db-> /* Sugest addMember, ...
7
votes
3answers
284 views

vim can not execute unix command with :! due to shell changing

Our company uses red hat linux system and allocate everyone an account in /home. Unfortunately, our system is using tsch, which is not favorable for me. Moreover, as I do not have the super user ...
1
vote
1answer
477 views

git commit --amend not recognizing valid vimrc options

This is the error I am getting, when I do git commit --amend Error detected while processing /root/.vimrc: line 193: E518: Unknown option: foldmethod=indent line 194: E518: Unknown option: ...
5
votes
1answer
1k views

Vim: remove line numbers and colorcolumn from quickfix window

In my vimrc I have both set number and set colorcolumn=80, so now when I open a quickfix window, I see both line numbers and the color column. Is there some way to disable these settings for quickfix ...
7
votes
0answers
391 views

What's the meaning of “rc” in filenames such as .vimrc and .bashrc? [duplicate]

There are many file with a name containing "rc", but what's the meaning of "rc"?
2
votes
2answers
2k views

Vim colorschemes not changing background in Ubuntu terminal

I have the following .vimrc: set nocompatible " Use vim defaults "set ls=2 " Always show status line set showcmd " Show incomplete commands set ...
0
votes
1answer
599 views

Why do vim's StatusLine and StatusLineNC do not have the same background color?

With the same StatusLine and StatusLineNC highlight colors, when I open multiple windows, the active window's status line always has a lighter color text. I'm using PuTTY, the TERM is set to ...
1
vote
3answers
131 views

Using a session-specific .vimrc

I share accounts with other developers for test environments. The .vimrc on some of these accounts sets rows and columns, changing my terminal size, which drives me nuts. Is there a way I can set a ...
1
vote
1answer
3k views

Why does VIM say there are trailing characters on this command?

I am trying to write a beautify CSS command in vim that sorts and alphabetizes all of the CSS properties as well as checks to see if there is not a space after the colon and inserts one. Here is my ...
4
votes
1answer
837 views

Symlink to .vimrc on windows makes file readonly upon write. Why?

I've put my .vimrc file in a central location (dropbox folder, also a hg repository). Under Windows 7, I've symlinked to it from my home folder (strangely enough I had to do it as an administrator, ...
1
vote
1answer
334 views

Vim: make text go red or screen flash after 80 column mark?

Is there a way to make Vim warn me after a line has exceeded n characters? Something simple like a screen flash or the text go bold red or something. !! Bonus points if n can be made a variable ...
2
votes
1answer
2k views

How do I get vim to show trailing whitespace, but use blank spaces for tabs?

I want trailing whitespace to show as ., and tabs to show as blank spaces instead of ^I. I thought the solution would be easy: set listchars=tab: ,trail:. set list but that doesn't quite work: ...
4
votes
2answers
289 views

In vim, background color changes on scrolling

Occasionally I get a weird error with the background color in vim when scrolling up in a long file. The background over the text is correct, but everywhere there is no printable character the ...
1
vote
1answer
361 views

Convert functions in vimrc to autoload functions?

My .vimrc is split across multiple files in a vimrc.d directory and within those files are global setting, variables and functions based on a certain functionality, like Diff, Color, Folding, etc. ...
2
votes
1answer
319 views

vim: mapping <control-j> key

When I'm in insert mode, I sometimes want to be able to move around without using the arrow keys, and without having to go back into normal mode. So in my vimrc I've set up key bindings to do this: ...
11
votes
4answers
2k views

put `.vimrc` into the `.vim` folder

Is it possible to put the .vimrc into the .vim folder so that I only have to sync the whole folder and not folder and file to other computers?
2
votes
2answers
312 views

include all vim files in a folder

For my .bashrc I have a lot of small snippet files in .config/bash, like 10-prompt.sh and so on. In my actual .bashrc, I just have the following: configdir="$HOME/.config/bash" for file in ...
3
votes
4answers
4k views

Always use :set paste, Is it a good idea?

In a terminal vim, pasting clipboard data often messes up the code indent. I just knew if I uses :set paste the indent is not broken. Though, after pasting data, should I do :set nopaste again? What ...
0
votes
1answer
30 views

what is worth vimxfer

So I readed someones vimrc file (or at least I think it is) with maps like this: nmap <leader>r :r $HOME/.vimxfer<cr> nmap <leader>w :'a<leader>.w! $HOME/.vimxfer<cr> ...
5
votes
3answers
4k views

Can't Copy to Clipboard from Vim

I'm running Vim 7.3 under Linux Mint 13 (using MATE) and I'm not able to save text to the system clipboard. I run Vim in the terminal and copy text from the terminal with CTRLINSERT. When I select ...
1
vote
2answers
228 views

Vim Overlength highlighting for certain filetypes only

I'm using the following in my .vimrc to highlight lines that over 80 characters long: highlight OverLength ctermbg=red ctermfg=white guibg=#592929 match OverLength /\%81v.\+/ This affects all of my ...
2
votes
1answer
257 views

How do I set the cursor to stop when it hits the end of a line in Vim?

(Disclamer: I'm new to Vim.) I've mistakenly managed to enable cursor movements to travel anywhere on the screen, i.e. beyond end of lines. This makes it very tedious to spot redundant whitespaces, ...
2
votes
3answers
2k views

Where are these non-default Vim settings stored if not in my .vimrc file?

So when I press :set I see a bunch of settings that are not on my ~/.vimrc file. (My guess is they're settings I've set years ago and don't remember). So I do :version and get a path $VIM/vimrc, ...
1
vote
2answers
664 views

Vim reduce delay after issuing a command

I have mappings within my .vimrc to open or switch to commonly used applications. Use Case: I have 10 open applications and I'm in MacVim. It's faster to issue <Leader>sc which is mapped to map ...
3
votes
1answer
1k views

Vim: How to change the current item highlight color when substituting

I have changed my Vim colours so when I do a /search, every match is highlighted in bright yellow. This makes matches much easier to see. However, when I perform a substitution with the confirm flag ...
3
votes
0answers
2k views

How to make vim display unicode [closed]

I am trying to work with a utf-8 encoded xml file in vim 7.3 running on ubuntu. ASCII characters display normally but vim gives me gibberish instead of the unicode characters. After trying the ...
1
vote
3answers
123 views

VIM disable highlighting upon search deletion

I recently learned a new shortcut in VIM that I find extremely useful. d/search_text Which will delete everything up to, but not including, "search_text", from the current position. However, the ...
11
votes
5answers
3k views

Vim configuration slow in Terminal & iTerm2 but not in MacVim

Ideally, I want to use Vim from Terminal or iTerm2. However, it becomes unbearably slow so I had to resort to using MacVim. There is nothing wrong with MacVim, however my workflow would be much ...
4
votes
2answers
7k views

Transparent background of Vim editor within the xfce-4 terminal

Is there a way to have a transparent Vim session within the xfce-4 terminal?
0
votes
5answers
753 views

Vim creating files

Is there any setting for vimrc that changes the permissions that it sets on the file if it's creating a file? For example, if I create a file now it's 664, but I would like it to default to 755. ...
1
vote
1answer
278 views

MacVim - keyboard shortcut to change tab left

What is the command for changing to the tab to the left? "gt" is changing to the right, but I can't find the command for going the other way. Thanks
2
votes
3answers
703 views

Should I learn Vim without mapping keys?

I have been using vim for a few months its been a love/hate relationship. I love the concept of modal editing and never having the need to move you hands from the keyboard. The problem is that a lot ...
0
votes
1answer
275 views

Getting man path through Vim

So, I've set up Vim as my default man viewer. I also have NERDTree starting up automatically - but I could really do without NERDTree showing the location the man pages every time I check man. I've ...
1
vote
1answer
205 views

Opening files from Eclipse in gvim skips vimrc and gvimrc

When I try to open a file in an Eclipse project in gvim (using Eclipse's "open with -> other"), gvim seems to skip loading the global gvimrc and vimrc files and opens a bare white window with the ...
1
vote
1answer
40 views

How to show characters when using the change “c” command

I know there is a vim setting that allows you to show characters when using the change command, I just can't find what it is. Ex: "This is a<ci"> string" Inside the <> is where I use ...
0
votes
1answer
224 views

set file type in vim according to the hashbang line

In vim, how can I set the file type not only according to the extension, but according to the #! line at the beginning? For instance, I would like vim to recognize files as coffee-script files when ...
6
votes
5answers
1k views

Disable mouse clicks in gvim on ubuntu

How do I make gvim ignore mouse clicks. I'm really sick of the trackpad making my cursor all over the place. I use xubuntu if that means anything.
3
votes
1answer
2k views

How can I set the default font for gvim on Windows?

I use gvim on Windows. By default it uses the Fixedsys font, but I would like to use Consolas as the default font instead. I tried to set it using the menu option; it worked but it was reset the next ...
1
vote
4answers
710 views

Vim Tagbar is empty after installing CoffeeTags

I'm having the hardest time getting CoffeeTags to run in Vim. As the website suggests, I've installed the CoffeeTags gem and appended the configuration to my ~/.vimrc. When I open Tagbar it's empty. ...
6
votes
1answer
356 views

How to prevent a VIM file from becoming read-only when edited via a Windows symbolic link?

I've set nobackup and nowritebackup per this question - VIM destroys symbolic links under Windows However, whenever I modify the file via the link, the target file is set to read-only. How can I ...
1
vote
3answers
881 views

In vim, how I can set a local match only for a specific filetype?

in vim, I can set local configuration as setlocal number How I can set a local match only for specific filetype? I use this: autocmd! BufEnter *.py,.vimrc,*.sh,*.c* :match ColorColumn ...
1
vote
1answer
68 views

jump to <++> keeping fold

to jump in vim, I use nnoremap <c-j> /<++><cr>c/+>/e<cr> but, when the <++> are in a close fold, the <c-j> delete all fold, for this I change to nnoremap ...
0
votes
2answers
237 views

How do i get rid of a trailing $ when using vim?

A $ shows up at the end of every line when I'm using vim and I'm not able to figure out what in my vimrc is causing this. Heres a picture and my entire vimrc below it. What could it be? set ...
4
votes
2answers
189 views

How do I specify custom settings for vim based on file path

More specifically, I want to disable backup and swap file creation in vim, but only when opening/editing files that are on a specific remote volume or a specific folder. So, how do I go about ...
0
votes
2answers
88 views

Stop VIM backup file on only one file

Is it possible to stop VIM from automatically creating a backup for only a specific file? I have a running todo list I keep on my desktop, and I don't get any use out of the ~todo that constantly ...
11
votes
3answers
1k views

vim : toggle number with relativenumber

with setl nu! I can toggle number (on/off), similar with relativenumber setl rnu! how I can toggle {off,number,relativenumber} ?
0
votes
1answer
80 views

map a command with vim

How can I map a command in vim which does something like: :command (I write here and press enter) (Executes another command with the things that I wrote) or :badd my_buffer_name :b my_buffer_name ...
1
vote
0answers
57 views

Vimrc for different gnome-terminal profile?

I want to load different VIM color schemes for different gnome-terminal profiles. It's indeed two questions: How to know the active profile name in a gnome-terminal session? How to test with environ ...