Vim's configuration file.
0
votes
1answer
11 views
Can I make the font size in my NERDTree window smaller than in all other windows of Vim?
Can I make the font size in my NERDTree window smaller than in all other windows of gvim?
I like large font size of 15 but I'd like the folder tree window of NERDTree to be 12 - is this possible to ...
1
vote
1answer
37 views
Vim is putting two tabs whenever I punch in tab
I have the following settings to have two-space sized tab stops:
:set tabstop=2
:set noexpandtab
:set shiftwidth=2
However, every time I hit Tab, two 2-space-width tabs go in. I just want a ...
4
votes
2answers
38 views
Vim joining lines during wraping
I am using formatoptions to format my files. But if I have a new line character in my tex file, Vim joins the lines, removing this character. How to define in Vim the hard wraping without joining ...
0
votes
2answers
22 views
vim c/c++ ftplugin scripts
I make some additions to the regular runtime in my vim configuration. I add to rtp a directory where there are ftplugin directory, in which I have two files: c.vim and cpp.vim. In these files I ...
0
votes
0answers
30 views
Vim display invisible characters
I am trying to display invisible characters in Vim by the following in my vimrc
set list
set listchars=tab:▒░,trail:▓
But every time it shows me the wrong characters. I have encoding=utf-8. I set ...
2
votes
1answer
22 views
Is it possible to restrict modeline in vim to only allow certain settings?
Is there a way to configure vim to enable 'modeline' (and by extension, setting 'modelines' to be non-zero), but restricting the parsing capability of modelines in files?
I want to enable setting of ...
1
vote
1answer
33 views
Vim: execute command with range silently
According to the vim documentation, the :silent command can be used to avoid the hit-enter prompt.
The problem is that I want to silent a command that accepts a range as input, and this does not work ...
1
vote
1answer
76 views
Is there a simple setting that make Vim find filetype more smart?
Vim does recognize filetype smartly according to the name of the file and the
modeline.
However it cannot deal with this case: I have a file without any special special
suffix, say somefile, which is ...
2
votes
2answers
83 views
Bash-like code completion in vim?
I'm currently using superTab for completions in Vim. However, I'd like the completions to be more like bash. For example, if I'm typing
st
and the possible completions are
struct, string
I'd ...
1
vote
2answers
48 views
How can I set foldlevelstart in vim to just fold nothing initially, still allowing zr to work immediately?
In vim, I typically set foldmethod to indent for most file types. In general, I like files to open with all folds open. However, it is useful to start immediately using zm to start closing folds ...
0
votes
1answer
26 views
Vim highlighting stuck messed up for specific file
I am using JSLint and Syntastic plugins for Vim, and I am having an issue where a specific file is stuck having broken highlighting and JSLinting, foo/bar.js. However, if I change the path such that ...
2
votes
1answer
34 views
Vim - How do I detect that the buffer is loaded in the quickfix window?
Various plugins that I use load their own results into a buffer in the quickfix window. For example, ack.vim loads it's search results there.
I would like to turn off various things like spell ...
1
vote
2answers
143 views
Telling Vim to use custom .vimrc is easy, but how to tell it to use alternative path instead of ~/.vim?
I can use vim -u filename to use filename instead of my default .vimrc. I am using this method when switching user contexts (su) to use my .vimrc even though running as superuser.
How can I achieve ...
1
vote
1answer
52 views
What is ..vimrc.un~ and which Vim component creates it why?
As of late I often find a file named ..vimrc.un~ in the folder in which I edit a file. Where does this file come from?
I am using Vim 7.3 with plugins pathogen, nerdtree, vim-eunuch, vim-surround, ...
9
votes
1answer
715 views
How can I make the Sign Column show up all the time even if no Signs have been added to it?
I've just added the Git Gutter plugin for Vim which shows lines added/modified/deleted according to git diff. It uses the Sign Column to show characters next to each line.
At the moment the column ...
2
votes
1answer
49 views
Vim - Prevent NERDTree opening when invoked by git
Nice and simple, I'd like for NERDTree not to get involved when vim is invoked by git, for example when authoring a commit message or dealing with a rebase.
Presumably this is achievable by way of ...
1
vote
1answer
97 views
Vim has unexpected key presses on startup, what could be causing this?
Whenever I open a file with vim, the vim session starts with 2c having been automatically/programmatically 'pressed'. This means that if I start off trying to move down the file by pressing j, then ...
1
vote
2answers
87 views
How can I test for plugins and only include them if they exist in .vimrc?
In my .vimrc I am trying to use ftplugin and obviously use some commands relating to that under the assumption that it was loaded successfully. However, I have now encountered a few old machines that ...
0
votes
2answers
53 views
Best way to sync vimrc files
What is the best way to sync my vimrc to multiple computers, I have multiple different linux and windows installations that I would like it to be synced to and would prefer to rely on some sort of ...
6
votes
1answer
107 views
How to have VIM show unclosed parenthesis?
Is there a way that I can change my .vimrc file so that unclosed parenthesis/brackets/braces are highlighted?
For instance the following would highlight the parenthesis after the word main:
public ...
0
votes
2answers
263 views
Vim color scheme not showing up properly in Mountain Lion's Terminal.app
EDIT: See my comment below before investing too much time.
I've read a ton of related questions on SE and have had no success. Everyone elses' problems seem to be solved by changing the terminal to ...
3
votes
3answers
140 views
Swap file error message while trying to edit .vimrc file?
Everytime I try to open the .vimrc file I am getting this message .I am using the vimtutor in another terminal but I don't think I have opened up any extra .vimrc file . Why do I see this error and ...
0
votes
1answer
78 views
“No mouse support: mouse=a” error in vim
I am running a particular script and getting the following error :
Error detected while processing /home/subhrcho/.vimrc:
line 42:
E538: No mouse support: mouse=a
This is the relevant ...
3
votes
2answers
53 views
vim coding templates
I recently started learning vim and, I'm curious, what's the best way to setup a sort of bare-bones template for specific types of files?
For example: say I wanted to automatically load some C ...
0
votes
2answers
53 views
How to change language specific plugins in vim?
I'm writing an SML program and I'm trying to change the size of indents. If I add the following to my .vimrc file
set tabstop=8
set shiftwidth=8
set expandtab
It is not reflected in my actual ...
1
vote
1answer
63 views
Vim: How do you remap the functionality of CTRL-W to a different key?
I'd like to map CTRL-W to something else, but I'd also like to retain the functionality of CTRL-W, for resizing windows, moving between splits, etc. So I'd like to move it to something like CTRL-Q.
...
3
votes
2answers
92 views
vim shortcut to go from command mode back to normal mode
I use nnoremap ; : to go to command mode.
Is there oposite shortcut that i can add to my .vimrc so that i won't press ESC every time to go back to normal mode?
1
vote
1answer
371 views
vim-powerline colors are out of whack in urxvt
I have attached two images showing what my vim-powerline looks like.
As you can see, something has happened to the colors and I cannot figure out how to fix it.
I'm running Fedora 17 on a clean ...
0
votes
1answer
57 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
57 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>') . ...
1
vote
1answer
147 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
135 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 ...
0
votes
1answer
82 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: ...
2
votes
1answer
148 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 ...
5
votes
1answer
176 views
What's the meaning of “rc” in filenames such as .vimrc and .bashrc?
There are many file with a name containing "rc", but what's the meaning of "rc"?
2
votes
2answers
421 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
161 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
67 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 ...
0
votes
1answer
171 views
Why does VIM say there is trailing whitespace 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 ...
2
votes
1answer
315 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, ...
0
votes
1answer
136 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 ...
1
vote
1answer
385 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
128 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
210 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. ...
-1
votes
1answer
137 views
Does anyone have any good GREEN vim color schemes? [closed]
Looking for something based in greens, lime green, blue-green, pale yellow.
2
votes
1answer
106 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:
...
3
votes
3answers
467 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
133 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 ...
1
vote
4answers
493 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
24 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>
...