From 7ace83853411c27133b5052946150dc7348954f5 Mon Sep 17 00:00:00 2001 From: jdhao Date: Thu, 17 Jun 2021 00:21:15 +0800 Subject: update formatoptions for certain filetypes --- after/ftplugin/cpp.vim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'after/ftplugin/cpp.vim') diff --git a/after/ftplugin/cpp.vim b/after/ftplugin/cpp.vim index 4d451de..4779a0e 100644 --- a/after/ftplugin/cpp.vim +++ b/after/ftplugin/cpp.vim @@ -5,6 +5,10 @@ set softtabstop=2 " number of spaces in tab when editing set shiftwidth=2 " number of spaces to use for autoindent set expandtab " expand tab to spaces so that tabs are spaces +" Disable inserting comment leader after hitting o or O or +set formatoptions-=o +set formatoptions-=r + nnoremap :call compile_run_cpp() function! s:compile_run_cpp() abort -- cgit v1.2.3