Questions tagged [vimrc]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
990 views

My vim theme (gruvbox) is not being applied

im trying to set this theme for vim: https://vimawesome.com/plugin/gruvbox . I have installed it: I added the Plug to .vimrc Plug 'morhetz/gruvbox' From a opened vim editor I executed the command: :...
4 votes
2 answers
178 views

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 ...
0 votes
1 answer
148 views

How to clear terminal history

I'm writing as expansion to this blog: How to clear the terminal history from vim? I have this in my vimrc: autocmd FileType python map <buffer> <F9> :w<CR>:exec '!python3' ...
2 votes
0 answers
364 views

Access to system clipboard with vim 8.1.2269 on 20.04

I work with vim on Ubuntu 20.04 installed from the official repositories: $ apt policy vim vim: Installed: 2:8.1.2269-1ubuntu5 Candidate: 2:8.1.2269-1ubuntu5 Version table: *** 2:8.1.2269-...
0 votes
1 answer
422 views

How to customize vim editor using someone else's customization?

I downloaded a file that would help me customize my vim editor here in the section on "Customizing Vim". I now have the file in /home/double_toned as vimrc. Now when I type vim in the command line, I ...
0 votes
0 answers
158 views

YouCompleteMe - Path of file

I would like to know settings that disable showing the path after dash. It is disturbing and not necessary. I tried to search on google on YouCompleteMe doc, but unsuccessful. I have no idea which ...
6 votes
2 answers
2k views

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 ...
  • 93
0 votes
1 answer
801 views

How do I find the <Insert> key mapping in Vim so that I can create a similar map on MacOS?

So, for me, the Insert key toggle was driving me to distraction on Mac since Ubuntu is my main OS. I had to hunt down the key mapping and duplicate it in macvim. How I've done this so far is to do: ...
1 vote
1 answer
1k views

Vim test if options are valid before setting

I use my .vimrc on a number of different machines, which all have significantly different versions of vim. Most versions boot up fine, but one of them has reports this (doctored) list of errors on ...
2 votes
1 answer
2k views

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 ...
3 votes
0 answers
264 views

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, ...
  • 192
0 votes
1 answer
692 views

vim plugin doesn't show in PlugInstall

I'm currently trying to customize my vim setup, which involves installing new plugins. So I've edited my ~/.vimrc in order to install those plugins: call plug#begin('~/.vim/plugin/bundle') ...
3 votes
1 answer
5k views

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

In my .vimrc I have: map <Leader>c :GitGutterToggle<CR> map <Leader>n :set invnumber<CR> Is there any way I can combine these two into one Leader entry? For example: map &...
  • 131
1 vote
0 answers
103 views

Ubuntu 14.04 Server Vim Configuration

I am new to Vim, however I am learning to love it. As a former/current Windows user, there is one shortcut that I depend on and would like to configure in Vim. On windows I can use ctrl-[arrow left] ...
0 votes
1 answer
3k views

VIM,Vundle, You Complete me

I'm trying to use you complete me in vim. Here are the steps I've taken sudo apt-get install vim sudo apt-get install git sudo apt-get install clang-3.5 sudo git clone "https://github.com/...
  • 11
2 votes
1 answer
382 views

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 ...
2 votes
0 answers
456 views

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 ...
23 votes
3 answers
55k views

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 ...
6 votes
3 answers
15k views

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 ============= "...
32 votes
1 answer
29k views

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 ...
2 votes
1 answer
68 views

tabbing with vim

I made the mistake of posting this on the unix echange originally beore realizing ubuntu had a separate site. I'm using Ubuntu with vim as my text editor of choice. I know some people set shortcuts ...
  • 23
3 votes
3 answers
2k views

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.
  • 51
1 vote
1 answer
638 views

How can I create help tags for vim plugins from packages?

I have installed the vim-latexsuite and vim-outliner packages, which are addons for vim. Both come with documentation files, that are installed into the /usr/share/vim/addons/doc directory. Issuing ...
user avatar
2 votes
1 answer
1k views

Vim - Set number command on startup

What is the file to edit, to show lines number on startup using vim ?
1 vote
1 answer
4k views

Why won't Vim source my .vimrc at startup?

Note: edited to provide more info. I have modified my ~/.vimrc significantly (although some of my initial modifications I made in the system-wide /etc/vim/vimrc). It probably doesn't matter either ...
4 votes
1 answer
7k views

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 ...
2 votes
1 answer
27k views

Need good example of .vimrc file [closed]

I wanted to start using Vim, and need to create .vimrc configuration file for it. Where can I find some ready to use, good quality examples with described every option?
user avatar
1 vote
1 answer
2k views

Vundle - Plugins installed but not loading

I've installed vundle on my ubuntu box but when I load vim none of the plugins load. My .vimrc from my home directory [some commented lines edited out]: runtime! debian.vim set nocompatible ...
2 votes
1 answer
706 views

How to transform Vim configuration into Emacs one? [closed]

I need to setup Emacs editor by preparing the ~/.emacs configuration file. I have been using Vim for years and now I want to switch to Emacs for various reasons that are out of scope of this post. To ...
user avatar
1 vote
1 answer
792 views

go back to vim's default color

I read this :highlight Normal ctermfg=grey ctermbg=darkblue from https://stackoverflow.com/questions/1117526/setting-the-vim-background-colors But I change the darkblue to white!! What I done? OMG? ...
5 votes
2 answers
2k views

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 ...
1 vote
2 answers
18k views

VI won't let me save my vimrc file

I have changed the permissions to allow for: -rwxrwxr-- 1 root root 2214 Oct 4 09:45 vimrc and it still won't let me save to the file. I only have one user on this box and it has admin rights. ...
  • 115
3 votes
1 answer
839 views

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 = "\<Esc>]12;red\x7" " use an ...
  • 7,544
78 votes
6 answers
72k views

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 ...