Skip to content

Commit 7c62e07

Browse files
author
Fotios Lindiakos
committed
Added .vimrc for coding standards and updated README so people know how to use it
1 parent 0718ff2 commit 7c62e07

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.vimrc

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
" Some basic vim options to make it work better
2+
set nocompatible
3+
syntax on
4+
filetype on
5+
filetype plugin indent on
6+
7+
" Set tabbing options
8+
autocmd FileType ruby,yaml setlocal expandtab autoindent shiftwidth=2 softtabstop=2
9+
" Trim trailing whitespace from Ruby and Yaml files
10+
autocmd BufWritePre *.rb,*.yml,*.yaml :%s/\s\+$//e
11+
12+
"flag problematic whitespace (trailing and spaces before tabs)
13+
"Note you get the same by doing let c_space_errors=1 but
14+
"this rule really applies to everything.
15+
highlight RedundantSpaces term=standout ctermbg=red guibg=red
16+
match RedundantSpaces /\s\+$\| \+\ze\t/ "\ze sets end of match so only spaces highlighted

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ comments. For more information about OpenShift, visit https://openshift.redhat.
1414
or the OpenShift forum
1515
https://openshift.redhat.com/community/forums/openshift.
1616

17+
Coding Standards
18+
----------------
19+
We are following the GitHub Ruby styleguide (https://github.com/styleguide/ruby)
20+
21+
If you use vim, we've included a .vimrc in the root of this project.
22+
In order to use it, install https://github.com/MarcWeber/vim-addon-local-vimrc

0 commit comments

Comments
 (0)