Skip to content

Commit

Permalink
Add style config for vim
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Aug 16, 2018
1 parent a5a0b3c commit 6b2e659
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
37 changes: 37 additions & 0 deletions fortran.vim
@@ -0,0 +1,37 @@
" To adhere to the style guidelines in ABIN
" (3-space indentation, not tabs)
" please place this file in ~/.vim/ftplugin/
" (you might need to create that directory)
"
" Also, copy content from file "vimrc" to your ~/.vimrc file
"
" $ cat vimrc >> ~/.vimrc

let s:extfname = expand("%:e")
if s:extfname ==? "f90"
let fortran_free_source=1
unlet! fortran_fixed_source
else
let fortran_fixed_source=1
unlet! fortran_free_source
endif
let s:extfname = expand("%:e")
if s:extfname ==? "f95"
let fortran_free_source=1
unlet! fortran_fixed_source
endif
let s:extfname = expand("%:e")
if s:extfname ==? "F90"
let fortran_free_source=1
unlet! fortran_fixed_source
endif
let s:extfname = expand("%:e")
if s:extfname ==? "F95"
let fortran_free_source=1
unlet! fortran_fixed_source
endif

set expandtab
set shiftwidth=3
set softtabstop=3

6 changes: 6 additions & 0 deletions vimrc
@@ -0,0 +1,6 @@
filetype plugin on
:let fortran_free_source=1
syntax on

filetype indent on
filetype indent plugin on

0 comments on commit 6b2e659

Please sign in to comment.