The vimrc tag has no wiki summary.
1
vote
2answers
24 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 ...
1
vote
1answer
26 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, ...
0
votes
4answers
66 views
VIM: Where are these non-default settings store 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, ...
0
votes
2answers
55 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 ...
0
votes
1answer
71 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 ...
0
votes
0answers
99 views
How to make vim display unicode
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
55 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 ...
3
votes
1answer
269 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 ...
1
vote
2answers
315 views
Transparent background of Vim editor
Is there a way to have a transparent Vim session within the xfce-4 terminal?
0
votes
5answers
122 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
77 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
170 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
88 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
67 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
31 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
93 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 ...
1
vote
4answers
115 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.
0
votes
1answer
94 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
2answers
192 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.
...
3
votes
0answers
65 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
2answers
110 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
30 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
120 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 ...
3
votes
2answers
56 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
57 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 ...
10
votes
2answers
264 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
54 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
35 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 ...
0
votes
1answer
161 views
How do I get correct indentation for HTML and Javascript in gVim?
I've been using vim and gVim for over a year. I use it mainly for editing of HTML, PHP, Python and Javascript.
Every time I've tried to set some automatic type of indentation I've got into troubles. ...
0
votes
1answer
487 views
Are vimrc and viminfo the same files but with different names?
Are .vimrc and .viminfo the same files but with different names?
In every tutorial there are advices to change .vimrc, but I don't have this file, only .viminfo. Are they the same?
1
vote
3answers
211 views
Gvim paste using Control+Shift+V, while leaving Visual Block Mode Control+V
Is there a way to map paste to control+shift+v, and leave visual block mode as control+v in gvim?
I use both quite often.
0
votes
1answer
203 views
What does sts stand for in a .vimrc?
I've been searching around, but the term vimrc sts has yet to lead me to an actual explanation of the value. Many people talk about using it for tabs/indenting, but what does it stand for? Is it soft ...
0
votes
1answer
259 views
How to get Vim in cygwin/Windows to underline the CursorLine properly?
Here is a portion of my .vimrc :
set background=dark
set cul
hi CursorLine term=underline cterm=underline gui=underline
On Linux, vim displays fine and the cursor line is underlined with a thin ...
1
vote
1answer
74 views
GVim Specify Directory for :browse open Command
I have added the line:
:browse open
to my vimrc file, but have been unsuccessful in getting GVim to open a file browser starting in a specified directory. In particular, I would like to know if it ...
0
votes
2answers
283 views
How to set color scheme for VIM in Mac Terminal?
It seems that the VIM color scheme is conflict with Mac Terminal's setting.
I want to change the highlight search color. And it's OK by setting in VIM ESC mode.
(:hi search ctermbg=4)
However, it's ...
0
votes
2answers
190 views
Corrupt vimrc file
I installed janus for my macvim (I am running Snow Leopard) and everytime I go to edit the ~/.vimrc file I get these errors:
Error detected while processing function Edit:
line 7:
E319: Sorry, the ...
1
vote
1answer
96 views
Can I set the horizontal scroll offset in Vim?
I would like to always see a little bit of context when the lines are to long, like:
set scrolloff=5
Is possible?
0
votes
1answer
197 views
~/.vim folder has gone after vim reinstall (Ubuntu 10.10)
I had a problem with an arrow keys in Ubuntu (known as the A B C D problem). All advices I have found does not help me to resolve this bug. So, I deside to reinstall vim totaly. After I install it ...
1
vote
2answers
256 views
Split up .vimrc, where to put what?
I've go a bunch of filetype dependent autocommands in my .vimrc, some of which are syntax related.
I'd like to put these in separate file throughout my .vim/ tree, eg. some tex syntax would go in ...
0
votes
3answers
311 views
Mapping keys in VIM on Mac
Thanks to Mark for answering my original question, but it seems I am stuck once again.
I'm trying to reassign the keys for switching between Windows to be more intuitive. I've found that you should ...
4
votes
1answer
670 views
vim not loading _vimrc file when launched from git bash
I have downloaded and installed git for windows (msysgit) and frequently used the included git bash. Whenever I run vim from git bash my _vimrc file is not loaded because there is syntax highlighting ...
2
votes
1answer
66 views
Two different Windows installations running the same colorscheme, different results
I recently copied over my Vim settings to a new Windows computer.
I use a tweaked version of the molokai vim theme that I named "molokai-mine". Here's what it should look like:
On my new ...
1
vote
1answer
166 views
Running gVim on a USB Drive
How could I run gVim on a USB drive (I can't install software on the computer) preferably I'd like to load it on the USB drive with a mac (so I can't install an exe - but I could use a pc) and also ...
5
votes
1answer
134 views
Time of day as conditional in Vim
I'm working on improving my .vimrc, and I want to have command inside of it that depends upon whether it is night or day. I'd like to have something like the following in the end:
if isNightTime
" ...
0
votes
0answers
131 views
How to avoid NERDTree saving a 'NERDTree_1' file when autosaving
I'm using MacVim and to save all opened files when the window loses focus I have the following in my .vimrc file:
au FocusLost * :silent wa
This works great except it also saves my current ...
1
vote
1answer
279 views
Customize autoindent settings in VIMRC file
I have autoindent enabled in my .vimrc file but have run into an annoying bug/feature. For example, when I'm tabbed in 3 times, and I hit return, the new line is also tabbed in 3 times. Then when I ...
1
vote
1answer
486 views
vim - set relativenumber not working from vimrc, only works when set in buffer
For the life of me, I cannot figure out why set relativenumber does not load when set in my .vimrc file. Other settings, like set number and setting the color scheme work perfectly. If I want ...
3
votes
6answers
668 views
How can I make .vimrc read from an external file?
I'd like to modify my .vimrc to read the value of a variable from an external file. How can I do this?
Specifically, a friend and I share a git repo with our .vim files, but there are a few small ...
1
vote
2answers
417 views
How to set syntax specific settings in my VIMRC?
I work with several languages and markups in vim every day (ruby, python, javascript, CSS, HTML, etc), and would like to have different settings for each buffer when I fire up my editor. How can I ...
12
votes
6answers
1k views
How to make VIM settings computer-dependent in .vimrc?
I share my VIM configuration file between several computers. However, I want some settings to be specific for certain computers.
For example, font sizes on the high-res laptop should be different to ...