Questions tagged [vimrc]

The vimrc file contains optional runtime configuration settings to initialize Vim when it starts.

36 questions
94
votes
7 answers

vi, getting multiple "Sorry, the command is not available in this version..." after reinstall

From my .vimrc, getting: line 16: E319: Sorry, the command is not available in this version: filetype on line 17: E319: Sorry, the command is not available in this version: filetype plugin on line 18: E319: Sorry, the command is not available…
33
votes
1 answer

vimrc file comments - double-quotes vs two double-quotes

I'm going through a .vimrc file and there everything is written like this : - " Better copy & paste " When you want to paste large blocks of code into vim, press F2 before you " paste. At the bottom you should see ``-- INSERT (paste) --``. "" set…
24
votes
3 answers

Can't find path to ~/.vimrc file

I've read plenty of post on how to change the tab length in my vim editor, but only temporary changes. I want to make the configuration permanent and my understanding is that I can configure it in the file mentioned above. I've tried: vim…
6
votes
3 answers

Setup vimrc with solarized color theme

I just started with vim in ubuntu, and have some trouble setting up my .vimrc file. This is what I currently have: "============= Solarized color theme ============= …
6
votes
2 answers

Ubuntu won't let me edit or delete .vimrc file

I wanted to add set mouse=a to the .vimrc file to add point and click cursor, but the /etc/vim/vimrc file is read-only and won't allow me to edit or delete it. I tried to uninstall and reinstall vim but the .vimrc file remained…
Tistayu
  • 115
  • 2
  • 8
5
votes
1 answer

In vimrc, how can I chain multiple instructions in one Leader command

In my .vimrc I have: map c :GitGutterToggle map n :set invnumber Is there any way I can combine these two into one Leader entry? For example: map c :GitGutterToggle && :set invnumber I've tried the above, and…
Kevin
  • 151
5
votes
2 answers

vim in 14.04 (Trusty) starts up in Replace mode

I just deployed a handful of 14.04 systems and I'm noticing that whenever I vim something, vim is already in replace mode. As I'm used to being in command mode on starting, this is rather disorienting. Any idea why? I don't see any obvious culprits…
4
votes
3 answers

vim mapping from q! to Q!

I was trying to map 'q!' to 'Q!' in .vimrc ? I tried the following but not working. :command Q! q! Please provide any suggestion to mitigate this issue. Thank you.
Bhaiti
  • 61
4
votes
1 answer

Why do I get these .vimrc errors in Ubuntu 14 after upgrade from Ubuntu 13?

I get errors for all these commands when I try to use vim (though vim then works): autocmd BufWritePre *.rb :%s/\s\+$//e set filetype off filetype plugin on filetype indent on syntax on " Turn on syntax highlighting match ExtraWhitespace…
4
votes
2 answers

Is there a command to move a cursor to a specific line when creating a new file in vim?

I am new to ubuntu. I am using vim for quite sometime now. I came across autocmd BufNewFile command to automatically add some text when a file with some particular etension is created.I have attached the pic of how it looks after that command. But I…
3
votes
0 answers

In some files, vim jumps to the last location on my last edit. In other files this does not happen

I have just updated Ubuntu 14.04.5 LTS with Software Updater. After restarting, apparently something has changed on vim: Previously, when opening a file with vim, then :q, and then opening it again, it automatically jumped to the last line I was…
Dave
  • 202
3
votes
1 answer

vim cursor color change only applied upon movement

In my .vimrc I have the following (based upon a tip on the vim Wikia): if &term =~ "xterm\\|rxvt" " use an red cursor in insert mode let &t_SI = "\]12;red\x7" " use an orange-ish cursor otherwise let &t_EI = "\]12;\#FFA560\x7" …
Chan-Ho Suh
  • 7,582
  • 4
  • 43
  • 74
2
votes
1 answer

When I press : in vim, it enters insert mode not command mode?

I cannot enter command mode by typing :. What's more , whatever key I press, Vim will enter insert mode and type the word I've just typed. i.e. I type j, and the cursor doesn't move downwards but Vim enters insert mode and types the letter j on the…
2
votes
1 answer

How to set Vim keyboard mapping for start of command

I often write the active Vim buffer with :w, then reload the buffer with :e to reset the undo/redo history. I do this so often, I've updated my .vimrc file with a command mapping for :we, to do both in one step: " Reset undo/redo buffer on…
2
votes
0 answers

Vim shortcuts won't work in tmux

I'm starting with tmux and i'm with some difficulties. I searched and didn't find anything that helped. When I open VIM in a tmux's session, the shift + hjkl doesn't work. I searched for a solution and found one that said to me to remap the command.…
1
2 3