Skip to content

Commit

Permalink
Move common cc options to ftplugin
Browse files Browse the repository at this point in the history
  • Loading branch information
gauravjuvekar committed Feb 19, 2022
1 parent bdc2538 commit b6a8c1a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
9 changes: 9 additions & 0 deletions after/ftplugin/c.vim
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@ hi link Member Variable
set cindent
set cino+=(0,W1s,u0,U0,:0,g0.5s,h0.5s,N-s

set autoindent
set smarttab
set softtabstop=4
set tabstop=4
set shiftwidth=4
set expandtab
set textwidth=80
set colorcolumn=80,100,120

9 changes: 9 additions & 0 deletions after/ftplugin/cpp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@ setlocal matchpairs+=<:>
set cindent
set cino+=(0,W1s,u0,U0,:0,g0.5s,h0.5s,N-s

set autoindent
set smarttab
set softtabstop=4
set tabstop=4
set shiftwidth=4
set expandtab
set textwidth=80
set colorcolumn=80,100,120

16 changes: 8 additions & 8 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ set incsearch
nnoremap <F4> :set hlsearch!<CR>
" Alignments and indents
set autoindent
set smarttab
set softtabstop=4
set tabstop=4
set shiftwidth=4
set expandtab
set textwidth=80
set colorcolumn=80,100,120
" set autoindent
" set smarttab
" set softtabstop=4
" set tabstop=4
" set shiftwidth=4
" set expandtab
" set textwidth=80
" set colorcolumn=80,100,120

au VimEnter * if &diff | execute 'windo set wrap' | endif

Expand Down

0 comments on commit b6a8c1a

Please sign in to comment.