Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
OpenWalnut Core
OpenWalnut Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 44
    • Issues 44
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • OpenWalnut
  • OpenWalnut CoreOpenWalnut Core
  • Wiki
  • EditorConfiguration

EditorConfiguration

Last edited by Alexander Wiebel Jul 09, 2017
Page history

Editor Configuration

In this article, we provide some editor configuration files which comply to our programming style. Feel free to download and use them.

VIM

Here is an example configuration file for VIM. It is configures the maximum line-width, indent-width, automatic white-space removal and the doxygen toolkit.

set tabstop=4
set softtabstop=4
set shiftwidth=4

" Enable spellchecking the comments
set spelllang=en

" Syntax based folding
set foldmethod=syntax
normal! zR

" Compilation
let &mp='make -C ../build/debug'

" Length of lines should be limited to 150
set textwidth=145
set wrapmargin=145
set wrap
set formatoptions+=t    " wrap them automatically

" trim trailing spaces
let  g:trimwhitepsace_enable = 1
if !exists('g:trimwhitepsace_enable') | let  g:trimwhitepsace_enable = 0    | endif
func! TrimWhiteSpace()
  exe "normal mz"
  %s/\s\+$//ge
  exe "normal `z"
  exe "normal :delmarks z\n"
endfunc
autocmd FileType c,cpp,java,php,vo_base,python,bash,sh,glsl autocmd BufWritePre  :call TrimWhiteSpace()

" Tune DoxygenToolkit
let g:DoxygenToolkit_briefTag_pre=""
let g:DoxygenToolkit_startCommentTag = "/**"
let g:DoxygenToolkit_startCommentBlock = "/*"
let g:DoxygenToolkit_paramTag_pre = "\\param "
let g:DoxygenToolkit_returnTag = "\\return "
let g:DoxygenToolkit_fileTag = "\\file "
let g:DoxygenToolkit_authorTag = "\\author "
let g:DoxygenToolkit_dateTag = "\\date "
let g:DoxygenToolkit_blockTag = "\\name "
let g:DoxygenToolkit_classTag = "\\class "
let g:doxygenToolkit_templateParamTag_pre = "\\tparam "

Eclipse

In Eclipse IDE, you can import the attached style definitions: codeStyleDefinition_OpenWalnut_eclipse.xml

Additional information

If you want to enable spell checking (for comments and string literals) this page could help if you use emacs, eclipse or vim: http://stackoverflow.com/questions/1289765/spell-checker-for-comments-strings-maybe-more

Clone repository
  • DeveloperTools
  • DiffusionIndices
  • Documentation
  • Downloads
  • EditorConfiguration
  • FAQ
  • FiberSimilarityMetrics
  • FirstSteps
  • Getting_OpenWalnut
  • Glossary
  • HowtoDocumentCode
  • IllustrativeConnectivityVisualization
  • InstallMSYS2
  • InstallMinGW
  • InstallVisualStudio
View All Pages