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:
parent
d744b6e98f
commit
7ace838534
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user