1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

update formatoptions for certain filetypes

This commit is contained in:
jdhao 2021-06-17 00:21:15 +08:00
parent d744b6e98f
commit 7ace838534
3 changed files with 7 additions and 4 deletions

View File

@ -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 <Enter>
set formatoptions-=o
set formatoptions-=r
nnoremap <silent> <buffer> <F9> :call <SID>compile_run_cpp()<CR>
function! s:compile_run_cpp() abort

View File

@ -1,5 +1,6 @@
" Disable inserting comment leader after hitting o or O
" Disable inserting comment leader after hitting o or O or <Enter>
set formatoptions-=o
set formatoptions-=r
set tabstop=2 " number of visual spaces per TAB
set softtabstop=2 " number of spaces in tab when editing

View File

@ -1,7 +1,5 @@
" Disable inserting comment leader after hitting o or O
" Disable inserting comment leader after hitting o or O or <Enter>
set formatoptions-=o
" Disable inserting comment leader after hitting <Enter> in insert mode
set formatoptions-=r
" Set the folding related options for vim script. Setting folding option in