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
0 answers
27 views

Edit GVim's Desktop File to Launch with Custom Config

I've created a config file for GVim, which located at $HOME/.config/vim/gvimrc. And in my .zshenv I have export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/gvimrc" | source $MYVIMRC' On ...
Saurabh's user avatar
  • 141
2 votes
2 answers
266 views

Vim Editor Undo

In Vim Editor while in normal mode when I enter 'u' it undoes all the changes made in last session instead of one line. Can anybody help regarding this.
Yash Bajpai's user avatar
-1 votes
1 answer
3k 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: :...
josanangel's user avatar
4 votes
2 answers
286 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 ...
K. Chidambaram's user avatar
0 votes
1 answer
247 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' ...
Jozef Remiš's user avatar
2 votes
0 answers
524 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-...
Luís de Sousa's user avatar
0 votes
1 answer
513 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 ...
badavadapav's user avatar
0 votes
0 answers
168 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 ...
Jan Machálek's user avatar
6 votes
2 answers
3k 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 ...
Tistayu's user avatar
  • 113
0 votes
1 answer
1k 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: ...
NonYaBidnezz's user avatar
1 vote
1 answer
2k 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 ...
Zoey Hewll's user avatar
2 votes
1 answer
3k 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 ...
doUWannaBuildASnowMan's user avatar
3 votes
0 answers
321 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, ...
Dave's user avatar
  • 202
0 votes
1 answer
796 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') ...
Vic Tor's user avatar
5 votes
1 answer
6k 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 &...
Kevin's user avatar
  • 151
1 vote
0 answers
105 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] ...
Brett Holman's user avatar
0 votes
1 answer
4k 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/...
John G's user avatar
  • 11
2 votes
1 answer
417 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 ...
Huw Walters's user avatar
2 votes
0 answers
573 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 ...
Paulo Daniel's user avatar
25 votes
3 answers
59k 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 ...
Øystein Seel's user avatar
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 ============= "...
Alfons Ingomar's user avatar
32 votes
1 answer
30k 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 ...
Amit Upadhyay's user avatar
2 votes
1 answer
76 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 ...
EMP7705's user avatar
  • 23
4 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.
Bhaiti's user avatar
  • 61
1 vote
1 answer
705 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 ?
Antoine Orsoni's user avatar
1 vote
1 answer
5k 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 ...
Sammy Black's user avatar
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 ...
Michael Durrant's user avatar
2 votes
1 answer
28k 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 ...
CS Student's user avatar
2 votes
1 answer
738 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
888 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? ...
Mohammad Reza Rezwani's user avatar
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 ...
Mikey T.K.'s user avatar
1 vote
2 answers
19k 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. ...
zombiedad's user avatar
  • 125
3 votes
1 answer
858 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 ...
Chan-Ho Suh's user avatar
  • 7,562
87 votes
7 answers
80k 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 ...
Michael Durrant's user avatar