Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change location of vim yankring history file

The yankring plugin for Vim creates a file in my home directory called yankring_history_v2.txt. How do I tell the plugin to store this file in another location?

like image 976
cydonian Avatar asked Feb 21 '13 19:02

cydonian


People also ask

How do I change the default vimrc path?

You can change those default paths in src/os_unix.h. While at it, you might want to consider changing the location of the vimrc file and also the second vimrc file which is typically under ~/.vim, so you might want to update that one.

How do I use Vim to find old files in Linux?

Easiest way on vim. Nice! I mapped that expression as "nmap bo :browse oldfiles<CR>" (without the quotations) in my ~/.vimrc. Simply typing that mapping (bo) in Normal mode executes that command There is mru.vim, which adds the :MRU command.

Where is vimrc stored on MacOSX?

Yes, it is store under the .vim/ folder, which is created by MacOSX after I updated to Big Sur. What I want is simply this when I put this line in ~/.vimrc it works, while in ~/.vim/.vimrc it's not. So my questions are: What's the first file Vim read so it knows Oh, so Mr. .vimrc your home is at $HOME (or ~)?

Where do I put Vim 8?

Vim 8 is all in /usr/local. Then I created a new directory in $HOME called ".vim8". I have all my Vim 7 stuff in $HOME/.vim/, and I want a clean directory for Vim 8 in $HOME/.vim8/.


1 Answers

You can also change the file's name with yankring_history_file. For example, if you want it to be a hidden file in your home directory, leave yankring_history_dir as-is, and add this to your .vimrc:

let g:yankring_history_file = '.yankring_history'
like image 139
Kankaristo Avatar answered Oct 01 '22 10:10

Kankaristo