I deleted every files and dir in ~/.vim/. I know some dir and files is needed. Fortunately I have my vimrc file. But I don't know which files and dir are needed.

Can I create theme automatically?

  • No files are "needed" in ~/.vim. What kind of files do you need there? Mar 11 '19 at 7:35

I think :h 'runtimepath' might help your answer your question. The directory ~/.vim is a part of 'runtimepath' by default on Unix systems.

The help states the following:

This is a list of directories which will be searched for runtime files:

  filetype.vim  filetypes by file name |new-filetype|
  scripts.vim   filetypes by file contents |new-filetype-scripts|
  autoload/     automatically loaded scripts |autoload-functions|
  colors/       color scheme files |:colorscheme|
  compiler/     compiler files |:compiler|
  doc/          documentation |write-local-help|
  ftplugin/     filetype plugins |write-filetype-plugin|
  indent/       indent scripts |indent-expression|
  keymap/       key mapping files |mbyte-keymap|
  lang/         menu translations |:menutrans|
  menu.vim      GUI menus |menu.vim|
  pack/         packages |:packadd|
  plugin/       plugin scripts |write-plugin|
  print/        files for printing |postscript-print-encoding|
  spell/        spell checking files |spell|
  syntax/       yntax files |mysyntaxfile|
  tutor/        files for vimtutor |tutor|

None of these directories have to exist, they are just a way to configure vim and these directories in ~/.vim are just user defined configurations. The built-in configurations live in other runtimepath directories like $VIMRUNTIME.

So if you added some configurations by yourself and didn't versioned them (in git for example) then you'll have lost these settings but that will not prevent Vim from working properly.

About your last sentence "Can I create a theme automatically?" I think that would deserve a question on its own with more clarifications about what you mean exactly but the files used to define a colorscheme can live in ~/.vim/colors. Now I don't know what you mean by creating a colorscheme automatically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.