0

I have the following ~/.vim/filetype.vim:

augroup filetypedetect
  au BufRead,BufNewFile *?Script.sml let maplocalleader = "h" | source /home/gergely/HOL/tools/vim/hol.vim
  " recognise pre-munger files as latex source
  au BufRead,BufNewFile *.htex setlocal filetype=htex syntax=tex
  "Uncomment the line below to automatically load Unicode
  au BufRead,BufNewFile *?Script.sml source /home/gergely/HOL/tools/vim/holabs.vim
  "Uncomment the line below to fold proofs
  "au BufRead,BufNewFile *?Script.sml setlocal foldmethod=marker foldmarker=Proof,QED foldnestmax=1
augroup END

This is the HOL vim plugin . I want to edit *Script.sml files.

Now, when I write a ~/.vimrc file with the tip of this answer vim stops to read the plugin, which I recognise by the syntax highlighting stopped.

if system('uname -r') =~ "Microsoft"
  augroup Yank
    autocmd!
    autocmd TextYankPost * :call system('clip.exe ',@")
  augroup END
endif

I wanted to use that .vimrc to make it possible to copy to the clipboard in a Windows Terminal for a WSL Linux using ctrl-c.

How can I make the two coexist, the HOL vim plugin and this clipboard extension in vimrc?

2
  • 1
    I don’t have the reference off-hand, but when you dont have a vimrc you get the defualts vimrc (:help defaults I think). You can runtime it or copy over bits or what have you. The most important for you are probably filetype plugin indent on and syntax enable
    – D. Ben Knoble
    Commented May 18, 2021 at 11:58
  • 1
    :help defaults is indeed the correct reference.
    – Rich
    Commented May 18, 2021 at 13:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.