Skip to content

Commit

Permalink
Add git, editor configurations and guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwinvis committed Nov 25, 2019
1 parent d2d9063 commit 9c75812
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# EditorConfig is awesome: https://EditorConfig.org

# Unix-style newlines with a newline ending every file
[*]
indent_style = space
indent_size = 2
tab_width = 4
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

# Set default charset
[*.py]
charset = utf-8

# Matches multiple files with brace expansion notation
# 4 space indentation
[*.{py,tex,par}]
indent_style = space
indent_size = 4

# Matches the exact file SIZE,
# and fortran files
[{SIZE,lib/Nek5000/core/*,*.{f,f90,inc,usr}}]
indent_style = space
indent_size = 4

# Tab indentation (no size specified)
[{Makefile,makefile,Makefile.*}]
indent_style = tab
indent_size = unset
tab_width = unset

# Indentation override for all JS under lib directory
# [lib/**.js]
# indent_style = space
# indent_size = 2

# Matches the exact files either package.json or .travis.yml
# [{package.json,.travis.yml}]
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app
5 changes: 5 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"{{{ Nek5000
au BufNewFile,BufRead *.usr,*.inc,SIZE set filetype=fortran
au BufNewFile,BufRead *.par set filetype=cfg
au BufNewFile,BufRead * if &syntax == '' | set syntax=fortran | endif
"}}}
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# General guidelines

* Use an editor which supports [EditorConfig](http://editorconfig.org/)
* Follow [Fortran best practices](https://www.fortran90.org/src/best-practices.html)

## Vim

Vim users could benefit by setting:
```vim
set exrc
set secure
```
which enables syntax highlighting for file extensions used in `lib/Nek5000`.

0 comments on commit 9c75812

Please sign in to comment.